Skip to content

Keep the new timeline at the bottom when its viewport changes height - #35374

Merged
langleyd merged 1 commit into
developfrom
fix/new-timeline-bottom-jump-tanstack
Oct 7, 2026
Merged

langleyd merged 1 commit into
developfrom
fix/new-timeline-bottom-jump-tanstack

Conversation

@langleyd

@langleyd langleyd commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Currently on opening a room, if the new labs timeline gets resized(say when the pinned message banner appears or the composer changes height) it doesn't stay pinned to the bottom. Similarly if you resize the browser window when you are already scrolled to the bottom, it doesn't stay at the bottom.

The result of which can look like this:
image

As reported in #35124.

After the fix, if you were already pinned to the bottom, it stays pinned(when composer/banner forces a resize, or the window changes height)

Screen.Recording.2026-10-07.at.14.14.04.mov

tanstack/virtual "knows" when we are at the bottom so I think should handle the case where the scroller grows.

I have opened an upstream Issue and linked it from an upstream PR TanStack/virtual#1298 and updated the patch in this PR.

AI assistance

  • I used AI tools to help create this PR.

When the new timeline's scroller shrinks (a banner appears, the composer
grows, the window is resized), the browser keeps `scrollTop`, so a reader at
the bottom was left with the newest messages below the fold. Rows whose height
follows the window, such as collapsed code blocks, made window resizes lose
the bottom even with a resize handler in the view, because TanStack
compensated them before the handler ran.

The fix is a new hunk in our @tanstack/virtual-core patch rather than code in
TimelineView: an end-anchored list now keeps an end-pinned view pinned when
its scroll element shrinks, the same way it already does when a row grows.
It is proposed upstream to TanStack Virtual and can be dropped once released.
The rest of the patch is unchanged.
@langleyd
langleyd added this pull request to the merge queue Oct 7, 2026
Merged via the queue into develop with commit cfeb5e6 Oct 7, 2026
67 checks passed
@langleyd
langleyd deleted the fix/new-timeline-bottom-jump-tanstack branch October 7, 2026 23:33

This branch was successfully deployed

3 active deployments
EndToEndTests — 6129fee3 Deployed Oct 7, 2026 by github-actions[bot]
Netlify — 6129fee3 Deployed Oct 7, 2026 by github-actions[bot]
SharedComponentStorybook — 6129fee3 Deployed Oct 7, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants