Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

We customize the messages only in DEV to keep it small in prod.

We skip some messages that are not really errors but more like information.

@sebmarkbage sebmarkbage requested a review from eps1lon March 6, 2025 18:06
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Mar 6, 2025
@react-sizebot
Copy link

react-sizebot commented Mar 6, 2025

Comparing: 99e1024...16c46fa

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.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 518.54 kB 518.54 kB = 92.45 kB 92.45 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.21% 590.37 kB 591.62 kB +0.23% 105.10 kB 105.34 kB
facebook-www/ReactDOM-prod.classic.js +0.15% 643.21 kB 644.18 kB +0.20% 113.09 kB 113.31 kB
facebook-www/ReactDOM-prod.modern.js +0.15% 633.53 kB 634.50 kB +0.20% 111.52 kB 111.75 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-dom/cjs/react-dom-client.production.js +0.21% 590.37 kB 591.62 kB +0.23% 105.10 kB 105.34 kB
oss-experimental/react-dom/cjs/react-dom-unstable_testing.production.js +0.21% 605.10 kB 606.35 kB +0.21% 108.71 kB 108.94 kB
test_utils/ReactAllWarnings.js = 63.88 kB 63.65 kB = 16.01 kB 15.93 kB

Generated by 🚫 dangerJS against 65f67e5

@@ -3911,6 +3922,7 @@ function commitGestureOnRoot(
pendingTransitionTypes,
flushGestureMutations,
flushGestureAnimations,
reportViewTransitionError,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to run this in the context of finishedWork or is that not a relevant Owner of a potential error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

finishedWork is just the HostRoot so it has no owner at all.

In general these errors has no owner at all. There are other warnings we can add earlier to prevent some of these errors from happening in the first place. For example, we should have a warning when two ViewTransition components are mounted with the same name. Even if they don't happen to be part of the current transition and those could have owners.

Comment on lines +1570 to +1591
'This can happen if a Navigation is blocked on React itself. ' +
"Such as if it's resolved inside useEffect. " +
'This can be solved by moving the resolution to useLayoutEffect.',
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not following this one. Any chance we can manually trigger this scenario in the fixture?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If this switches to useEffect instead of useLayoutEffect it should trigger it.

https://github.com/facebook/react/blob/main/fixtures/view-transition/src/components/App.js#L84-L86

Since the navigation should be blocked by the commit and the navigation blocks the commit from preceding the timing of unblocking the navigation needs to be in useLayoutEffect.

Copy link
Member

@rickhanlonii rickhanlonii left a comment

Choose a reason for hiding this comment

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

sick

@sebmarkbage sebmarkbage merged commit ca8f91f into facebook:main Mar 12, 2025
194 checks passed
github-actions bot pushed a commit that referenced this pull request Mar 12, 2025
We customize the messages only in DEV to keep it small in prod.

We skip some messages that are not really errors but more like
information.

DiffTrain build for [ca8f91f](ca8f91f)
sebmarkbage added a commit to sebmarkbage/react that referenced this pull request Mar 12, 2025
…2540)

We customize the messages only in DEV to keep it small in prod.

We skip some messages that are not really errors but more like
information.
huozhi pushed a commit to vercel/next.js that referenced this pull request Mar 12, 2025
sebmarkbage added a commit that referenced this pull request Mar 12, 2025
Follow up to #32540.

We do allow gestures to be cancelled early (we call skipTransition) if
the gesture stops before it has even started.

This happens in the fixture when we auto-scroll.
github-actions bot pushed a commit that referenced this pull request Mar 12, 2025
Follow up to #32540.

We do allow gestures to be cancelled early (we call skipTransition) if
the gesture stops before it has even started.

This happens in the fixture when we auto-scroll.

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

5 participants