Skip to content
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

Auto-scroll MessageBox on content add #451

Open
adamrdrew opened this issue Feb 18, 2025 · 3 comments
Open

Auto-scroll MessageBox on content add #451

adamrdrew opened this issue Feb 18, 2025 · 3 comments
Labels
PF6 Applies to only the PF6 version
Milestone

Comments

@adamrdrew
Copy link

As our bot streams new content in the user wont see it unless they scroll down manually. I added a CSS hack to scroll to the newest message added to the conversation so the user sees it is there, but as the bot streams in content the user still needs to scroll manually. It would be nice if it scrolled automatically with all of the UX complicated (stop auto scrolling when the user takes control, etc) handled by the library

@github-project-automation github-project-automation bot moved this to Needs triage in PatternFly Issues Feb 18, 2025
@rebeccaalpert rebeccaalpert added the PF6 Applies to only the PF6 version label Feb 18, 2025
@rebeccaalpert
Copy link
Member

This is something that we've been avoiding integrating into the library. We offer a basic demo of scrolling in the docs, and also make refs available on the MessageBox for scrolling there as well. I'm open to bringing this up for discussion again now that we have a better sense of the use cases. (Folks are using this extension for streaming output, as well as non-streaming output, and may want to customize their own streaming to reflect product needs.)

@pilhuhn
Copy link
Collaborator

pilhuhn commented Feb 20, 2025

Auto-scrolling is tricky. The ref basically sits between a message or potentially at the end of the stream, but then kind of "clamps" the position to the end, preventing the user to "go up" when the bot streams quicker than the user can read.
For some scenarios, it could be good to scroll down one time when the bot has responded a bit, but then give control to the user.

@rebeccaalpert rebeccaalpert added this to the 2025.Q2 milestone Feb 20, 2025
@rebeccaalpert rebeccaalpert moved this from Needs triage to Not started in PatternFly Issues Feb 20, 2025
@rebeccaalpert
Copy link
Member

Let's plan on doing some investigation - if we can ship something configurable so they can turn off scrolling and do their own thing, maybe we can do this. We can't force everyone onto one solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PF6 Applies to only the PF6 version
Projects
Status: Not started
Development

No branches or pull requests

3 participants