Repository navigation
fix(tile-manager): add the view transition rules - #2648
Open
adrianptrv wants to merge 3 commits into
Open
adrianptrv wants to merge 3 commits into
adrianptrv wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The transition helper still uses the global document instead of document-specific stylesheets, and the reconnect test leaves the manager and its observers outside fixture cleanup.
2 open issues
What changed in this PR
This PR addresses #2608 by making Tile Manager’s view-transition styling independent of global themes, so applications using custom Sass themes receive the same animations.
Changes:
- Moves the existing transition rules into a component-owned stylesheet.
- Adopts the stylesheet on connection and restores it before transitions if the application removes it.
- Updates animation tests, the component specification, and the changelog.
| File | Description |
|---|---|
src/styles/themes/base/_view-transitions.scss |
Removes the theme-owned transition mixin. |
src/styles/themes/base/_theme.scss |
Removes the transition mixin import and inclusion. |
src/components/tile-manager/transitions.ts |
Adds stylesheet adoption before tile transitions. |
src/components/tile-manager/tile-manager.ts |
Adopts transition styles when the manager connects. |
src/components/tile-manager/tile-manager.spec.ts |
Tests adoption, restoration, overrides, and theme-independent fading. |
src/components/tile-manager/tile-dnd.spec.ts |
Tests drag-ghost animation without loading a theme. |
src/components/tile-manager/themes/view-transitions.base.scss |
Houses the unchanged transition rules. |
src/components/tile-manager/spec.md |
Documents stylesheet ownership and related test scenarios. |
CHANGELOG.md |
Records the custom-theme transition fix. |
Review effort: Balanced
This branch has not been deployed
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.

What changed
src/components/tile-manager/themes/view-transitions.base.scss, unchanged.document.adoptedStyleSheets), so they no longer depend on the theme.Type of Change
Related Issues
Closes #2608
Testing
Steps for testing:
Turn off "Reduce motion" in the OS first, or the transitions are skipped.
npm startand open a Tile Manager story. The theme no longer contains the rules, so this is the same situation as an app with a custom Sass theme.trueas soon as the story loads, before any transition:document.adoptedStyleSheets.some(s => [...s.cssRules].some(r => r.cssText.includes('igc-tile-resize')))document.adoptedStyleSheets = [], then maximize a tile. The transition still looks right, and the check from step 6 returnstrueagain.Checklist
CHANGELOG.mdentry under[Unreleased]