Uh oh!
There was an error while loading. Please reload this page.
[DevTools] Fix WhatChanged scrolling out of view in profiler sidebar - #36244
Conversation
377ecab to
fed7c37Compare2f354f0 to
632176dCompare0a0376c to
162b730CompareKertsu
commented
Apr 25, 2026
4644160 to
80f014aCompare8e40685 to
8bb467fCompare1298a24 to
d5ba16eCompareddcda66 to
7027ebaCompare4723b2c to
2ecadebCompare2ecadeb to
4fdf488Compare
hoxyq
left a comment
There was a problem hiding this comment.
Thanks for highlighting the issue! Can we just put the WhatChanged and badges in a sticky subheader, same like we do it for the component name?
Without any expand / collapse mechanics, I think that should address the issue?
| // $FlowFixMe[missing-local-annot] | ||
| const handleKeyDown = event => { | ||
| if (event.key === 'Enter' || event.key === ' ') { | ||
| // Prevent the browser from scrolling down when Space is pressed | ||
| if (event.key === ' ') { | ||
| event.preventDefault(); | ||
| } | ||
| toggleCollapsedVal(); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Please add annotation to this callback
hoxyq
commented
Jun 23, 2026
Also, please see failed Flow jobs, you can reproduce it locally with |
Kertsu
commented
Jun 26, 2026
Thanks for the feedback, @hoxyq! Yes, that was my original instinct too. Just lift The reason I added the collapse mechanic is for cases where That said, I understand this adds interaction complexity that may not be in line with the existing DevTools patterns. Happy to drop it and go with the simpler non-collapsible sticky subheader if you think the tradeoff is acceptable. Just want to make sure we're aligned before I push another revision. |
4fdf488 to
ff7fb87Compared1d15d2 to
0645d41Compare
hoxyq
left a comment
There was a problem hiding this comment.
The reason I added the collapse mechanic is for cases where WhatChanged becomes tall, e.g. when a component has many changed hooks or props, the subheader can take up a significant portion of the sidebar height, leaving little room for the commit list. The collapsible lets users trade that context off for more list space when they need it.
That should be fine as long as the whole view is scrollable. If the user wants to see the full commit list, they can scroll. Essentially, the main information in this UI is what caused the render and component's information, the commit list is secondary.
hoxyq
commented
Jul 6, 2026
Could you please attach a screenshot / screencast of the new behaviour? Also, if possible, please add an e2e test that will cover this new UI. You can find examples in |
Kertsu
commented
Jul 6, 2026
Ooh okay, I see. Thanks for this. Will be making some changes! |
Kertsu
commented
Jul 6, 2026
Yup, sure. Thanks for the reference. |
0645d41 to
2b51ab3Compare
For the badges and what changed, I just used dummy data for manual testing. This is how it looks like. Let me know what you think, @hoxyq 🙌🏻 with.commit.list.container.mov |
Previously, WhatChanged and InspectedElementBadges were rendered in the same scrollable container as the commit list. When a component had many render timestamps, scrolling through the commit history also scrolled the render summary out of view, requiring users to repeatedly scroll back to regain context. This change separates the render summary from the commit history by making only the commit list scrollable. WhatChanged and InspectedElementBadges remain fixed at the top of the sidebar while the render timestamps scroll independently, keeping the currently selected commit's context visible throughout navigation without additional interaction. Closesreact#36525 References: - https://github.com/facebook/react/blob/main/packages/react-devtools-shared/src/devtools/views/Profiler/SidebarSelectedFiberInfo.js#L132-L149
2b51ab3 to
09d39aaCompareUh oh!
There was an error while loading. Please reload this page.
Kertsu
commented
Jul 7, 2026
Thanks, @hoxyq! This is my first-ever meaningful contribution to an open source project as iconic as React 🚀 |
Summary
Previously, WhatChanged and InspectedElementBadges were rendered inside the same scrollable Content div as the commit list. When a component had many render timestamps, scrolling down to pick one caused the "what changed" context to scroll out of view, requiring the user to scroll back up to see it.
While the profiler already exposes render details via hover tooltips on fibers, those are transient and pointer-dependent. This change introduces a sticky header section at the top of the Content div that holds the current commit summary, badges, and WhatChanged. The section is collapsible (click or Enter/Space) so users can reclaim vertical space for the commit list when needed. The commit list now sits below the sticky header as a sibling, so it scrolls independently while the summary remains always visible.
Closes#36525
Current Behavior
current-behavior.mov
Proposed UI
Apologies on this one. I had to upload it on YouTube since the video is quite big.
How did you test this change?
Manual Testing
Hover (expanded)
expanded-hover-simple.mov
Hover (collapsed)
collapsed-hover-simple.mov
Why this matters
This is more than a visual polish issue:
In practice, this increases cognitive load during performance debugging and makes long profiling sessions unnecessarily cumbersome.