Repository navigation
perf(tile-manager): name tiles only during their transitions and skip drag hit tests - #2566
Merged
Merged
Conversation
… drag hit tests - Give tiles a view-transition-name only while a swap, restore, maximize or resize transition of their manager runs, so a transition no longer captures the tiles of other or nested managers. Tiles keep an author's inline name. - Isolate the tile and its base. The tile stays a stacking context, the content keeps its z-index under the resize handles, and the handles drop from z-index 11111 to 1. - Drag: keep the match while the pointer stays in its box, so most moves skip elementsFromPoint. getActiveViewTransition() falls back to the library's own transitions in browsers without document.activeViewTransition. - ProjectBoard story: name the cards with a transition type rule, only where ViewTransition types exist.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the tile-manager transition and drag optimizations.
No open issues 🎉
What changed in this PR
This PR reduces tile-manager transition and drag overhead by limiting automatic transition names to participating tiles and avoiding repeated hit tests while the pointer remains inside its current target.
Changes:
- Scope tile transition names to manager operations, preserve author-defined inline names, and track library transitions when the browser lacks
activeViewTransition. - Reuse drag targets within their bounds and isolate tile stacking so resize handles remain above content.
- Update regression tests, the ProjectBoard example, specifications, and migration notes.
| File | Description |
|---|---|
stories/tile-manager.stories.ts |
Names board cards through transition-type CSS rules. |
src/internals/testing/helpers.spec.ts |
Adds a helper to simulate missing active-transition support. |
src/internals/directives/drag.ts |
Reuses matched targets to skip repeated hit tests. |
src/internals/directives/drag.spec.ts |
Tests target reuse and transition handling. |
src/components/tile-manager/transitions.ts |
Holds tile names during transitions and releases them afterward. |
src/components/tile-manager/tile.ts |
Removes permanent automatic transition names. |
src/components/tile-manager/tile-manager.spec.ts |
Tests stacking, temporary names, and author-name preservation. |
src/components/tile-manager/tile-ghost-util.ts |
Clarifies the duplicate transition-name comment. |
src/components/tile-manager/tile-dnd.spec.ts |
Tests name lifetimes during swaps and canceled-drag restoration. |
src/components/tile-manager/themes/tile.base.scss |
Isolates tile stacking and positions handles above content. |
src/components/tile-manager/themes/shared/tile/tile.common.scss |
Removes the oversized resize-handle z-index. |
src/components/tile-manager/spec.md |
Documents transition naming, stacking, and drag-target behavior. |
src/components/tile-manager/position.ts |
Uses scoped tile transitions for swaps and restoration. |
src/animations/view-transition.ts |
Tracks library transitions as a browser-support fallback. |
src/animations/view-transition.spec.ts |
Tests fallback tracking and reduced-motion behavior. |
CHANGELOG.md |
Records behavior changes and application migration guidance. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Checklist
CHANGELOG.mdentry under[Unreleased]