Skip to content

Filtering and sorting#684

Merged
glen-cheney merged 2 commits into
feat/grid-lanesfrom
phase-2
Apr 25, 2026
Merged

Filtering and sorting#684
glen-cheney merged 2 commits into
feat/grid-lanesfrom
phase-2

Conversation

@glen-cheney
Copy link
Copy Markdown
Owner

@glen-cheney glen-cheney commented Apr 25, 2026

Phase 2 from #660


This pull request introduces several improvements and refactors to the GridLanes component, focusing on enhancing native view transition support, improving initialization and cleanup, and adding comprehensive tests. The most important changes are summarized below.


GridLanes View Transition & State Management Enhancements:

  • Refactored the GridLanes class to use native View Transitions API for smooth DOM updates, including methods for tracking active transitions, flushing pending removals, and finalizing movement state. Added granular state management for initialization, sorting, filtering, and transition lifecycle. (packages/shuffle/src/grid-lanes.ts, [1] [2] [3]
  • Updated CSS custom properties to use consistent naming (e.g., --shuffle-speed, --shuffle-easing) and ensured they're properly set and removed during initialization and destruction. (packages/shuffle/src/grid-lanes.ts, [1] [2]

GridLanesItem Improvements:

  • Added an isHidden getter and a dispose() method to GridLanesItem for improved visibility tracking and cleanup of DOM state and styles when items are destroyed. (packages/shuffle/src/grid-lanes-item.ts, [1] [2]
  • Ensured that view-transition-name is set to a unique ID when showing items and reset to 'none' when hiding, supporting correct view transitions. (packages/shuffle/src/grid-lanes-item.ts, packages/shuffle/src/grid-lanes-item.tsR31-R46)

Test Coverage:

  • Added a comprehensive test suite for GridLanes, covering initialization, legacy options tolerance, assignment of transition metadata, parsing of data-groups, filter modes, and correct use of view transitions. (packages/shuffle/src/test/grid-lanes.core.test.ts, packages/shuffle/src/test/grid-lanes.core.test.tsR1-R218)

Lint & Tooling Updates:

  • Updated .oxlintrc.json to allow no-void as a statement and disabled a false-positive unicorn rule for NodeList. (.oxlintrc.json, [1] [2]
  • Added a VSCode workspace setting to auto-approve running npx tsc in the terminal. (.vscode/settings.json, .vscode/settings.jsonR1-R5)

These changes collectively modernize the GridLanes component, improve its reliability and developer experience, and ensure robust test coverage for new and existing features.

@glen-cheney glen-cheney merged commit dd67ad9 into feat/grid-lanes Apr 25, 2026
1 check passed
@glen-cheney glen-cheney deleted the phase-2 branch April 25, 2026 16:57
@glen-cheney glen-cheney linked an issue Apr 25, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant