-
Notifications
You must be signed in to change notification settings - Fork 117
Improve Chat()'s auto-scroll behavior
#1500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| shiny-chat-input { | ||
| margin-top: auto; | ||
| position: sticky; | ||
| background-color: var(--bs-body-bg, white); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e5f48df to
6e04ce4
Compare
Chat()'s scroll-on-append behaviorChat()'s scroll-on-append behavior
|
I haven't tried these changes yet, but I think that it would be good if the behavior were as follows:
|
427e719 to
b95bf81
Compare
I'm not sure I like this is better than the current behavior. Here are a few points to consider:
All that considered, I think I could come around your suggestion, but in that case, we definitely need a better visual cue that messages have been added to the chat. |
|
The behavior of ChatGPT is what I had in mind. Notice that when it's scrolled to the bottom, the chat auto-scrolls as text is added. When it's not scrolled to the bottom, then the chat does not auto scroll. chatgpt-scroll.mp4 |
|
Ohhhh, I thought you meant that, when a new call to |
4aa8481 to
6609fbd
Compare
…s, but if we do in fact support it, we should have some sort of visual cue that their is overflow -- i.e., a scroll button)
6609fbd to
a88a3cb
Compare
…l when we unconditionally scroll to bottom
Chat()'s scroll-on-append behaviorChat()'s auto-scroll behavior



With this PR:
.append_message()and.append_message_stream()now (correctly) scroll to the bottom of the chat window (after the message gets appended/updated)..append_message_stream(), the scroll stays at the bottom (unless the user scrolls up).Testing app