Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Sep 28, 2025

We're showing too much noise in the side-panel when selecting a Suspense boundary. The interesting thing to see directly is the "Suspended by".

The "props" are mostly useless because the "name" prop is already in the tree. I'm now also showing it in the title bar of the selected element panel. The "children" and "fallback" props are just the thing that you can see in the tree view anyway.

The "state" is this weird section with just one field in it, which we already have duplicated in the top toolbar as well. We can just delete this. I make sure to show the icon and a "suspended..." section while the boundary is still loading but now yet resuspended by force suspending.

While still loading:

Screenshot 2025-09-27 at 11 54 37 PM

After loading:

Screenshot 2025-09-27 at 11 54 53 PM

Resuspended after loading:

Screenshot 2025-09-27 at 11 55 07 PM

@sebmarkbage sebmarkbage requested a review from eps1lon September 28, 2025 03:57
@meta-cla meta-cla bot added the CLA Signed label Sep 28, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Sep 28, 2025
Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

The "children" and "fallback" props are just the thing that you can see in the tree view anyway.

You'd have to suspend to see the fallback. The components tree only gives you the parent tree not what the actual children were for this Suspense.

State I can get behind even though I wanted to show if boundaries are still dehydrated. Props of Suspense I used plenty and doesn't warrant removal IMO.

This PR also assumes that inspected element and tree are next to each other. That may be the case for the Components tab (if scroll is aligned). But not for the Suspense tab. Even in the Components tab it requires effort to line up the inspected element pane with the selected element in the tree which is quite busy.

@sebmarkbage
Copy link
Collaborator Author

I could get behind showing it in the Components tab but it's just too much for the Suspense tab which means you'd have to switch anyway. The important bit is what suspended and who rendered it and I need to be able to get to the "who rendered it link" below too. If it's below the "rendered by" then it's too hard to scroll to the bottom. If it's above, then falls below the fold in the simple cases where we could just show it all on screen.

The thing is that I recently just added formatting of the children anyway so until recently it was super hard to use the children props for anything it due to the poor formatting anyway. I've never used it. It seems like such an edge case for normal use that it's ok to hide it behind some steps.

@sebmarkbage
Copy link
Collaborator Author

Even if we add it back in some form later, I don't want it there now for the initial introduction to this tool.

@sebmarkbage
Copy link
Collaborator Author

As a compromise I moved props below Suspended by and made them read only.

Screenshot 2025-10-02 at 2 37 35 PM

@sebmarkbage sebmarkbage merged commit c825f03 into facebook:main Oct 2, 2025
240 of 241 checks passed
sebmarkbage added a commit that referenced this pull request Oct 2, 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.

2 participants