Skip to content

[DevTools] Fix WhatChanged scrolling out of view in profiler sidebar#36244

Open
Kertsu wants to merge 1 commit intofacebook:mainfrom
Kertsu:feature/revamp-sidebar-selected-fiber-info
Open

[DevTools] Fix WhatChanged scrolling out of view in profiler sidebar#36244
Kertsu wants to merge 1 commit intofacebook:mainfrom
Kertsu:feature/revamp-sidebar-selected-fiber-info

Conversation

@Kertsu
Copy link
Copy Markdown

@Kertsu Kertsu commented Apr 9, 2026

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.


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

Case Screenshot
Expanded simple expanded-default
Collapsed Simple collapsed-default
Focused using tab navigation while expanded expanded-tab-focused-simple
Focused using tab navigation while collapsed collapsed-tab-focused-simple
Long render info( expanded ) long-desc-expanded
Long render info( collapsed ) long-desc-collapsed

Hover (expanded)

expanded-hover-simple.mov

Hover (collapsed)

collapsed-hover-simple.mov

@meta-cla meta-cla bot added the CLA Signed label Apr 9, 2026
@Kertsu Kertsu force-pushed the feature/revamp-sidebar-selected-fiber-info branch 3 times, most recently from 377ecab to fed7c37 Compare April 11, 2026 05:38
@Kertsu Kertsu changed the title Add sticky header to SidebarSelectedFiberInfo [DevTools] Fix WhatChanged scrolling out of view in profiler sidebar Apr 11, 2026
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.

References:
- https://github.com/facebook/react/blob/main/packages/react-devtools-shared/src/devtools/views/Profiler/SidebarSelectedFiberInfo.js#L130-L147
@Kertsu Kertsu force-pushed the feature/revamp-sidebar-selected-fiber-info branch from fed7c37 to 2f354f0 Compare April 11, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant