-
Notifications
You must be signed in to change notification settings - Fork 710
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
Add animation to vertical wheel scrolling for smoother experience. #10509
base: master
Are you sure you want to change the base?
Conversation
This may be smoother - if so good, but it 'feels' awful with a touchpad - I can't control where I'm scrolling to at all it seems - all fine control is lost :-) please re-test and re-work for touchpad. |
3d6e7c5
to
90dea55
Compare
…nctionality. It's not used anywhere and it's buggy. Sections should check the events and stop animating when they need. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I32cc878228623e54f280ace1b5d1d75b93188df1
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I5c6cce08f68ec6ac99ac668bb78c12274ce72f3e
90dea55
to
1380755
Compare
It works much worse with laptop trackpad with this change. Previously it was smooth |
That's not my experience - I think there has been significant scope for improvement here for a good while. |
Without this patch, my experience is that trackpad scrolling is smooth and wheel-scrolling is instant (but has a jerky appearance as it's scrolling a large area at once). With this patch, trackpad scrolling is broken (hard to describe exactly, will go into more detail below) and wheel scrolling is smoother, but not as smooth as I'd expect (i.e. <60Hz), at least in Writer. Trackpad scrolling is broken because I'm not sure why scrollwheel scrolling isn't smooth, I would need to profile - it should be driven by requestAnimationFrame and so it not hitting the screen refresh tells me it's doing too much work. There are two problems: Solving the second problem would make trackpad scrolling work, but feel a bit laggy compared to fixing the first. When a wheel event is received while a previous scroll is still animating, I would suggest altering the animation parameters so that the first animation is extended to end at the sum of the two deltas. The new animation's start velocity needs to match its current velocity for it not to feel weird. For the first problem, in Firefox, wheel events have My more left-field suggestion would be to structure things so that we can take advantage of the browser's native scrolling support, which will be correct per platform and take away a bunch of maintenance burden - but given how things are organised now, this wouldn't be simple and is a more long-term thing. [1] the browser should throttle this at the screen refresh, but I don't know that this is always true for all browsers. In many years past in engines I don't remember, this would sometimes just be the refresh of the device - which can be many times the screen refresh... |
Change-Id: I5c6cce08f68ec6ac99ac668bb78c12274ce72f3e
Summary
TODO
Checklist
make prettier-write
and formatted the code.make check
make run
and manually verified that everything looks okay