feat(web): add scroll to bottom pill in chat view#619
feat(web): add scroll to bottom pill in chat view#619saishankar404 wants to merge 2 commits intopingdotgg:mainfrom
Conversation
when scrolling up in a long thread there was no way to get back to the bottom other than switching threads and back. adds a small centered pill that appears in-flow between the messages and the input box whenever the user isn't pinned to the bottom. clicking it smooth-scrolls back down and the pill disappears. rendered in normal document flow rather than absolutely positioned so it can't be clipped by overflow-hidden ancestors or collide with elements above the composer.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
|
@juliusmarminge done! |
|
Feels overly complex. Will check t3chat tmrw and see how we do it there. |

long threads had no way to jump back to the bottom once you scrolled up
(other than switching threads and back, which was the workaround mentioned
in #548).
adds a small "Scroll to bottom" pill that shows up between the message list
and the input box when you've scrolled away from the bottom. clicking it
smooth-scrolls you back and the pill goes away.
the pill is rendered in normal document flow so it can't be clipped by
overflow-hidden ancestors and doesn't need any z-index or absolute
positioning to work correctly.
changes
Note
Add scroll-to-bottom pill button in chat view
onMessagesScrollhandler; clicking the pill callsscrollMessagesToBottom("smooth").useLayoutEffectwiresResizeObserveron the chat column and composer, plus a window resize listener, to keep the pill position accurate on layout changes.Macroscope summarized 21a6c3a.