Skip to content

Add forwards fill mode to animations in view transition fixture - #34502

Merged
sebmarkbage merged 1 commit into
react:mainfrom
sebmarkbage:fillmode
Sep 16, 2025
Merged

Add forwards fill mode to animations in view transition fixture#34502
sebmarkbage merged 1 commit into
react:mainfrom
sebmarkbage:fillmode

Conversation

@sebmarkbage

@sebmarkbage sebmarkbage commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

It turns out that View Transitions can sometimes overshoot and then we need to ensure it fills. It can otherwise sometimes flash in Chrome.

This is something users might hit as well.

It turns out that View Transitions can sometimes overshoot and then we
need to ensure it fills.
@meta-cla meta-cla Bot added the CLA Signed label Sep 16, 2025
@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Sep 16, 2025
@react-sizebot

Copy link
Copy Markdown

Comparing: 348a4e2...b17bdc3

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 534.32 kB 534.32 kB = 94.32 kB 94.32 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 663.64 kB 663.64 kB = 117.01 kB 117.01 kB
facebook-www/ReactDOM-prod.classic.js = 687.59 kB 687.59 kB = 121.04 kB 121.04 kB
facebook-www/ReactDOM-prod.modern.js = 678.02 kB 678.02 kB = 119.39 kB 119.39 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against b17bdc3

@jackpope

Copy link
Copy Markdown
Collaborator

Is there any documentation on this from Chrome? If so we could consider docs section for trouble shooting linking out to resources like it.

People may assume a React bug and not use the feature instead of investigating things like a CSS animation edge case.

@sebmarkbage

sebmarkbage commented Sep 16, 2025

Copy link
Copy Markdown
Contributor Author

I think it's because the animation used here is 0.25s and a lot of the default ones are 0.3s. Since the animations keep playing until all of them have completed and the view transition finishes, it happened to kept looping for 0.05s. It was just more noticeable in Chrome.

That's probably just a general view transition gotcha to document.

It can be hard to have an animation shorter than the default since you have to override all of them.

@sebmarkbage
sebmarkbage merged commit 5e0c951 into react:main Sep 16, 2025
247 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants