Repository navigation
[virtualizer] Render the rows and columns in view on small scrolls in controlled layout - #23865
Merged
rita-codes merged 6 commits intoOct 19, 2026
Merged
Conversation
… controlled layout The controlled layout renders no buffer, so a scroll below the row or column threshold could expose rows or columns that were not rendered yet. Also update the render context when the viewport reaches past the rendered range.
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
rita-codes
marked this pull request as ready for review
October 14, 2026 09:35
…s' into virtualizer-controlled-blank-rows
romgrk
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #23864
Found while fixing #23859: the Scheduler timeline uses the controlled layout, and rows reached by small scrolls weren't rendered. With this fix, #23860 no longer needs its own workaround to mount the focused row.
The controlled layout renders no buffer, so a scroll shorter than the average row height (or under 50px horizontally) could expose rows or columns that weren't rendered yet. The virtualizer now also updates when the viewport goes past the rendered rows or columns. Uncontrolled and sticky layouts are unchanged.
isLowOnRenderedBufferalso leaves out the right-pinned columns in the controlled layout, likecomputeRenderContextdoes. Without it, the check would recompute on every scroll when columns are pinned to the right.Measured with the React Profiler on the Scheduler timeline (
monthAndYearpreset, 40 resources, 1000 events, 600px of horizontal scroll in 4px steps): no difference in render count or render time, since the timeline already commits on every scroll event.Added four browser tests, one per edge of the viewport. They fail on master and pass with the fix.
Before
https://github.com/user-attachments/assets/33b7a560-f5c1-4046-a7b5-b9510c7344a1
Screen.Recording.2026-10-14.at.11.32.18.mov
After
https://github.com/user-attachments/assets/61bee2ca-8155-48ad-a12a-f4636924c1fd
Screen.Recording.2026-10-14.at.11.32.52.mov