-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(tui): momentum-based scrolling #10420
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@MendyLanda is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
@anthonyshew for your review. The config values are subjective and based on personal preference. I tried to match native scrolling as closely as possible. While trackpads could benefit from custom settings, it's not possible to reliably distinguish between trackpad and mouse wheel, and behavior varies a lot across devices and OSes. This still feels like a significant improvement to me. |
@MendyLanda, this is great! Thank you! I tried it out and it feels much better than what we have now. Significantly better. I'm testing with a trackpad and it felt like I would go from "no momentum" to "ALL THE MOMENTUM!!!" Could we tune the ramping? I don't have a mouse wheel around to try with so I don't know if it feels great there and re-tuning would make it feel terrible. I can suggest what values feel right to me for the trackpad if you don't have one around. Very excited about this. |
And, yes, agree with this. Let's get to some best effort that feels good (particularly for trackpad vs. mouse wheel) as best we can. |
@anthonyshew for trackpad setting you can try this: |
But this completely voids mouse wheel. I am looking at Ghostty's implementation of this, maybe I can find some ideas. If you have any suggestion I'd love to know! |
Confirming that these values feel great for my trackpad. 👍 |
TL;DR:
@anthonyshew, your call. Option 2 feels more reasonable, but personally, I’d prefer option 1 😄. const ACCELERATION: f32 = 0.3; // 2.0 is optimal for mouse wheel, but higher values make the touchpad too jumpy.
const DECAY_TIME: Duration = Duration::from_millis(350); // less than 300ms is too fast for mouse wheel; 350ms slightly favors mouse wheel.
const THROTTLE_FACTOR: u8 = 3; // Lower values make the touchpad unusable. |
That feels great for me on trackpad. Soft-approved from me! Looking for a teammate with a mouse to confirm their mouse feels right... |
Thank you so much for the PR! I suggested some changes in MendyLanda#1 that make it feel a little better with a mouse scroll wheel. |
Thank you! This was the missing piece! feels great on both my mouse (logitech mx2) and my mb trackpad! |
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.
This is a great addition. Thank you again for the PR!
Description
#10415 Adds momentum-based scrolling to the TUI for a smoother and more natural scroll experience.
Testing Instructions