Repository navigation
docs(chat): describe auto-scroll and scroll to latest #318
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
Open
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| IX_REPO_TYPE='pull request' # For pull requests use "pull request" as value | ||
| IX_REPO_PR='2915' | ||
| IX_REPO_PR='2917' |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,10 +19,14 @@ Chats are the outer containers that bring together the three building blocks of | |
| - [Main content](../content): Use when the chat is the main focus of the experience, e.g. standalone or workspace copilots | ||
| - [Panes](../panes): Use when the chat is a secondary feature, e.g. for contextual help | ||
| - **Responsiveness:** Chats will resize to a max-width of `45rem`. | ||
| - **Auto-scroll:** By default, the chat keeps the latest content in view while new messages are added or a response streams. Auto-scroll stops as soon as users scroll away from the bottom and resumes when they return to the bottom, select "Scroll to latest" or send a new prompt. | ||
| - **Scroll to latest:** While users are away from the bottom, a "Scroll to latest" button is shown above the chat input. It never covers the chat input and scrolls without animation when users prefer reduced motion. | ||
| - **Custom scroll behavior:** Turn off auto-scroll and the "Scroll to latest" button with `suppressAutoScroll` if the application controls scrolling itself, e.g. to scroll to the start of a new answer. Use `scrollToBottom()` and `scrollToTop()` to scroll programmatically, e.g. after loading a conversation. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| ## Dos and Don’ts | ||
|
|
||
| - Do enable auto-scroll when users are reading the current response, not when they are reading previous responses | ||
| - Do keep auto-scroll enabled so users can read along while a response streams | ||
| - Don't scroll users back to the latest content while they are reading previous responses | ||
| - Don't add limits to how many messages are visible, instead always display full chat sessions | ||
|
|
||
| ## Related | ||
|
|
||
Oops, something went wrong.
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.
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.
as there is currently no code example visualizing this, should we add an illustration?