HyperChat icon indicating copy to clipboard operation
HyperChat copied to clipboard

[Feature]: Smooth scrolling

Open hjgyuhuk opened this issue 3 years ago • 4 comments

Checklist

  • [X] This is an issue for Hyperchat, not LiveTL. I will go to the LiveTL repo to report an issue for LiveTL.
  • [X] I have checked for a duplicate or similar issue. I made sure to check closed issues as well.
  • [X] I am not reporting a bug. If I am, I will use the bug report issue template.
  • [X] By submitting this issue, you agree to follow our Code of Conduct

Is your feature request related to a problem? Please describe.

Auto-scrolling is janky when new messages appear

Describe the solution you'd like

Scrolling should be smoother for the visual coherence

Expected behavior

From 1

To 2

Describe alternatives you've considered

No response

Anything else?

No response

hjgyuhuk avatar Oct 15 '22 19:10 hjgyuhuk

smooth scrolling takes a fairly large toll on performance, and that's why twitch and youtube (when chat is fast) don't do smooth scrolling by default either. it's also especially hard to make transitions blend together when messages are of uneven length and are arriving on uneven intervals. i could consider adding an option like this, but it'll be low on the priority list

KentoNishi avatar Oct 16 '22 02:10 KentoNishi

Actually Using like scrollIntoView api which is browser-built in function, I maked better performance than 'scrolltobottom' which is library functions

scrollIntoView

screenshot 2022-10-16 111324

hjgyuhuk avatar Oct 16 '22 03:10 hjgyuhuk

  1. it's not really fair to compare to regular ytc, u have to compare hyperchat with smooth scrolling vs hyperchat without smooth scrolling
  2. try scrolling up while the chat is moving. the problem with the scrollintoview api is that it tries to keep scrolling even when the user scrolls up. terminating scrollintoview on user scroll is not very straightforward as far as i know. if you can figure it out though, pls do make a pr, id be happy to merge it

KentoNishi avatar Oct 16 '22 03:10 KentoNishi

Thank you very much for your reply and explanation, I will look into it

hjgyuhuk avatar Oct 16 '22 03:10 hjgyuhuk