Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Aug 11, 2025

No description provided.

@meta-cla meta-cla bot added the CLA Signed label Aug 11, 2025
);
// We snapshot each step once so it doesn't regress.d
snapshots.push(print(store));
snapshots.push(print(store, false, null, false));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are flipping between null rects and [] rects. Need to double check if intentional and if we can avoid that by rewriting tests.

Copy link
Collaborator Author

@eps1lon eps1lon Aug 11, 2025

Choose a reason for hiding this comment

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

In this test we're moving Host components from primary content to fallbacks. This means we move rect attribution to the shell which means rects change between tests. This test is really just for the Component tree so we can safely ignore Suspense tree at the moment.

Printing the Suspense tree in the store already proofed helpful though: a9e9cae (#34170)

@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 11, 2025
}
const fiberInstance = suspenseNode.instance;
if (fiberInstance.kind !== FIBER_INSTANCE) {
// TODO: Resizes of filtered Suspense nodes are currently dropped.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to figure out how to get IDs for filtered nodes. IDs of filtered instances are hidden on purpose so I need to double check if it's safe to use the ID here.

@eps1lon eps1lon force-pushed the sebbie/frontend-rects branch 3 times, most recently from 3de6916 to 64b14f1 Compare August 11, 2025 18:02
@eps1lon eps1lon force-pushed the sebbie/frontend-rects branch from 64b14f1 to a9e9cae Compare August 11, 2025 18:05
@eps1lon eps1lon requested a review from sebmarkbage August 11, 2025 18:08
@eps1lon eps1lon marked this pull request as ready for review August 11, 2025 18:08
// just use the Fiber anyway.
newSuspenseNode.rects = measureInstance(newInstance);
// Fallbacks get attributed to the parent so we only measure if we're
// showing primary content.
Copy link
Collaborator

Choose a reason for hiding this comment

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

So I intentionally measured them even for the fallback state so that if it's stuck like that you at least have something to click on and to show where it's going on.

Once it resolves it should stay on the resolved rect. It's a little weird when you have inner suspense in fallbacks because they could potentially overlap with the old content but those are weird regardless.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Technically it should probably resize if in fallback state and it has never ever been in content state but I didn't bother tracking that.

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

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

I think we probably should still keep measuring the fallback for a SuspenseNode that mounts in fallback state and maybe fix any issues with update erasing that.

But stamping to unblock the store.

@eps1lon eps1lon merged commit de06211 into facebook:main Aug 12, 2025
244 checks passed
@eps1lon eps1lon deleted the sebbie/frontend-rects branch August 12, 2025 14:48
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.

2 participants