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

[Feature]: Smooth scrolling #104

Open
4 tasks done
hjgyuhuk opened this issue Oct 15, 2022 · 4 comments
Open
4 tasks done

[Feature]: Smooth scrolling #104

hjgyuhuk opened this issue Oct 15, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@hjgyuhuk
Copy link

hjgyuhuk commented Oct 15, 2022

Checklist

  • This is an issue for Hyperchat, not LiveTL. I will go to the LiveTL repo to report an issue for LiveTL.
  • I have checked for a duplicate or similar issue. I made sure to check closed issues as well.
  • I am not reporting a bug. If I am, I will use the bug report issue template.
  • 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 hjgyuhuk added the enhancement New feature or request label Oct 15, 2022
@KentoNishi
Copy link
Member

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

@hjgyuhuk
Copy link
Author

hjgyuhuk commented Oct 16, 2022

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

@KentoNishi
Copy link
Member

  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

@hjgyuhuk
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants