In-chat scroll position & New messages separator #24
dev-adamant-im
announced in
Dev Guidelines & Docs
Replies: 2 comments 1 reply
-
|
One small suggestion: consider adding an edge-case note for very fast incoming messages (e.g. when 20+ arrive while the user is mid-scroll). Right now the logic is consistent, but making explicit how counters/“new messages” separators behave under bursty conditions could avoid ambiguity. Another idea: you might want to clarify how screen orientation changes / resize events affect stored scroll position — should it reset, or try to preserve the relative place in chat. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Fine description, especially important for smooth UX. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This document describes how scroll position in chat should behave when a user enters a chat.
Two scroll states
Scroll position is stored separately for each chat:
When to show the Scroll to bottom button?
Scroll to bottom button action
→ Scroll to the “New messages” separator
→ Scroll to the very bottom
The “New messages” position
When we scroll to “New messages”:
Don’t show the separator
Example: A user receives 10 messages from a new contact. We still scroll to the very first message, but no separator is shown.
Saving scroll position
Note: If chat length is below screen height (few short messages) → always considered “at the very bottom”, button hidden, don’t save scroll.
Restoring scroll position
There are several events we handle:
We react differently depending on the event:
- Outgoing message: Always scroll to very bottom
This guide ensures consistent and predictable behavior for scrolling, separators, and restoring position across all chat entry points.
Beta Was this translation helpful? Give feedback.
All reactions