Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Mar 26, 2025

Stacked on #32734

In React a ViewTransition class of "none" doesn't just mean that it has no class but also that it has no ViewTransition name. The default (null | undefined) means that it has no specific class but should run with the default built-in animation. This adds this as an explicit string called "auto" as well.

That way you can do <ViewTransition default="foo" enter="auto"> to override the "foo" just for the "enter" trigger to be the default built-in animation. Where as if you just specified null it would be like not specifying enter at all which would trigger "foo".

@react-sizebot
Copy link

react-sizebot commented Mar 26, 2025

Comparing: e0c99c4...3c13686

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 +0.11% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 515.00 kB 515.00 kB = 91.74 kB 91.74 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.11% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.02% 614.66 kB 614.76 kB +0.02% 108.74 kB 108.76 kB
facebook-www/ReactDOM-prod.classic.js +0.01% 646.38 kB 646.48 kB +0.02% 114.25 kB 114.27 kB
facebook-www/ReactDOM-prod.modern.js +0.02% 636.66 kB 636.76 kB +0.02% 112.68 kB 112.69 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 3c13686

@sebmarkbage sebmarkbage merged commit fceb0f8 into facebook:main Mar 26, 2025
2 of 4 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 26, 2025
Stacked on #32734

In React a ViewTransition class of `"none"` doesn't just mean that it
has no class but also that it has no ViewTransition name. The default
(`null | undefined`) means that it has no specific class but should run
with the default built-in animation. This adds this as an explicit
string called `"auto"` as well.

That way you can do `<ViewTransition default="foo" enter="auto">` to
override the "foo" just for the "enter" trigger to be the default
built-in animation. Where as if you just specified `null` it would be
like not specifying enter at all which would trigger "foo".

DiffTrain build for [fceb0f8](fceb0f8)
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.

4 participants