Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

If an inner Offscreen commits an unhide, but an outer Offscreen is still hidden but they're controlling the same DOM node then we shouldn't unhide the DOM node yet.

This keeps track of whether we're directly inside a hidden offscreen. It might be better to just do the tree search instead of keeping the stack state since it's a rare case. Although this hide/unhide path does trigger a lot of times even when there's no change.

This was technically a bug with Suspense too but it doesn't appear because a suspended Suspense boundary never commits its partial state. If it did, it would trigger this same path. But it can happen with an outer Activity and inner Suspense.

@meta-cla meta-cla bot added the CLA Signed label Oct 12, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 12, 2025
@react-sizebot
Copy link

Comparing: ead9218...fb7a66f

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 +0.07% 604.98 kB 605.42 kB +0.07% 107.14 kB 107.22 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.07% 663.95 kB 664.39 kB +0.06% 117.03 kB 117.09 kB
facebook-www/ReactDOM-prod.classic.js +0.07% 687.81 kB 688.26 kB +0.05% 121.07 kB 121.13 kB
facebook-www/ReactDOM-prod.modern.js +0.07% 678.24 kB 678.69 kB +0.05% 119.42 kB 119.48 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against fb7a66f

@sebmarkbage sebmarkbage merged commit 1d68bce into facebook:main Oct 12, 2025
246 of 247 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 12, 2025
…den (#34821)

If an inner Offscreen commits an unhide, but an outer Offscreen is still
hidden but they're controlling the same DOM node then we shouldn't
unhide the DOM node yet.

This keeps track of whether we're directly inside a hidden offscreen. It
might be better to just do the tree search instead of keeping the stack
state since it's a rare case. Although this hide/unhide path does
trigger a lot of times even when there's no change.

This was technically a bug with Suspense too but it doesn't appear
because a suspended Suspense boundary never commits its partial state.
If it did, it would trigger this same path. But it can happen with an
outer Activity and inner Suspense.

DiffTrain build for [1d68bce](1d68bce)
github-actions bot pushed a commit that referenced this pull request Oct 12, 2025
…den (#34821)

If an inner Offscreen commits an unhide, but an outer Offscreen is still
hidden but they're controlling the same DOM node then we shouldn't
unhide the DOM node yet.

This keeps track of whether we're directly inside a hidden offscreen. It
might be better to just do the tree search instead of keeping the stack
state since it's a rare case. Although this hide/unhide path does
trigger a lot of times even when there's no change.

This was technically a bug with Suspense too but it doesn't appear
because a suspended Suspense boundary never commits its partial state.
If it did, it would trigger this same path. But it can happen with an
outer Activity and inner Suspense.

DiffTrain build for [1d68bce](1d68bce)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Oct 13, 2025
…den (facebook#34821)

If an inner Offscreen commits an unhide, but an outer Offscreen is still
hidden but they're controlling the same DOM node then we shouldn't
unhide the DOM node yet.

This keeps track of whether we're directly inside a hidden offscreen. It
might be better to just do the tree search instead of keeping the stack
state since it's a rare case. Although this hide/unhide path does
trigger a lot of times even when there's no change.

This was technically a bug with Suspense too but it doesn't appear
because a suspended Suspense boundary never commits its partial state.
If it did, it would trigger this same path. But it can happen with an
outer Activity and inner Suspense.

DiffTrain build for [1d68bce](facebook@1d68bce)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Oct 13, 2025
…den (facebook#34821)

If an inner Offscreen commits an unhide, but an outer Offscreen is still
hidden but they're controlling the same DOM node then we shouldn't
unhide the DOM node yet.

This keeps track of whether we're directly inside a hidden offscreen. It
might be better to just do the tree search instead of keeping the stack
state since it's a rare case. Although this hide/unhide path does
trigger a lot of times even when there's no change.

This was technically a bug with Suspense too but it doesn't appear
because a suspended Suspense boundary never commits its partial state.
If it did, it would trigger this same path. But it can happen with an
outer Activity and inner Suspense.

DiffTrain build for [1d68bce](facebook@1d68bce)
sebmarkbage pushed a commit to vercel/next.js that referenced this pull request Oct 14, 2025
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