-
Notifications
You must be signed in to change notification settings - Fork 437
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
chore: refactor scroll to bottom logic #11872
Conversation
Does it still scroll if I have the chat open in a call on my second screen and work in my IDE on the other screen? |
Filling the truth table for 5 arguments we're using: 🛑 - no scroll at all Remark:
Remark: !isVisible && hasFocus is impossible case, omitted from table
if Looking at the cycle, isInCall and hasFocus can be omitted, and 'force' treated separately before other logic: if (force) {
🔽
} else if (!sticky) {
🛑
} else if (!visible) {
❎
} else {
🔽
} |
Signed-off-by: DorraJaouad <[email protected]>
Signed-off-by: DorraJaouad <[email protected]>
Signed-off-by: DorraJaouad <[email protected]>
…crolling in case of reaction added. Signed-off-by: DorraJaouad <[email protected]>
75e711b
to
9beca0c
Compare
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.
Algorithm looks fine. Left some comments.
One more thing: loaded chat opens on top, there should be a point or watcher to look after it and set scroll position directly
Signed-off-by: DorraJaouad <[email protected]>
9beca0c
to
7cbc5d3
Compare
☑️ Resolves
🚧 TODO follow-up :
clientHeight
(it scrolls when joining a conversation) !