Skip to content

perf(tile-manager): name tiles only during their transitions and skip drag hit tests - #2566

Merged
rkaraivanov merged 1 commit into
masterfrom
rkaraivanov/tile-manager-transition-names
Nov 2, 2026
Merged

rkaraivanov merged 1 commit into
masterfrom
rkaraivanov/tile-manager-transition-names

Conversation

@rkaraivanov

Copy link
Copy Markdown
Member

Description

  • 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.

Type of Change

  • Refactoring (code improvements without functional changes)

Checklist

  • My code follows the project's coding standards
  • I have tested my changes locally
  • I have updated documentation if needed
  • I have added a CHANGELOG.md entry under [Unreleased]

… 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@rkaraivanov
rkaraivanov merged commit c413d77 into master Nov 2, 2026
8 checks passed
@rkaraivanov
rkaraivanov deleted the rkaraivanov/tile-manager-transition-names branch November 2, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants