Support nested ViewTransition enter/exit animations and fix named static subtree flag check#36140
Closed
zeyap wants to merge 5 commits intofacebook:mainfrom
Closed
Support nested ViewTransition enter/exit animations and fix named static subtree flag check#36140zeyap wants to merge 5 commits intofacebook:mainfrom
zeyap wants to merge 5 commits intofacebook:mainfrom
Conversation
…riggers based on transition types
…ter transitions The commitEnterViewTransitions walk was only checking for ViewTransitionStatic in subtreeFlags, causing it to skip subtrees that only contained ViewTransitionNamedStatic children. This meant nested named view transitions would not fire their enter animations.
|
Comparing: 3cb2c42...3b017d0 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
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.
Summary
enterandexitanimations on nested<ViewTransition>components when they specify type-based (object map) transition configs, gated behind theenableViewTransitionNestedfeature flag (from Support nested ViewTransition enter/exit animations based on transition types behind flag #36135)ViewTransitioncallback testscommitEnterViewTransitionsto includeViewTransitionNamedStaticin the subtree flags check, so nested named view transitions correctly fire their enter animationsDetails
Building on the work in #36135, this includes an additional fix: the
commitEnterViewTransitionstree walk was only checking forViewTransitionStaticinsubtreeFlags, which caused it to skip subtrees containing onlyViewTransitionNamedStaticchildren. This meant nested named view transitions would silently fail to animate on enter. The fix addsViewTransitionNamedStaticto the bitwise check.Test Plan
ReactDOMViewTransitiontests cover callback behavior