-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix scroll to seek/change volume/playback rate changing too fast with touchpad #6666
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
base: development
Are you sure you want to change the base?
Fix scroll to seek/change volume/playback rate changing too fast with touchpad #6666
Conversation
it seems slow but that could be because im testing on a trackpad |
Feel free to change the 100ms values to something else to see how it feels |
I let the others chime into this one as i find it difficult to evaluate what a good speed for this is |
I rarely use trackpad not to mention scrolling |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@absidue @ChunkyProgrammer @kommunarr your input is needed |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
I don't have a laptop so I can't really test this/suggest a good speed |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
scrolling rate/speed is perfect with the new build, but, there is a a bit of rubber-banding feeling with the scrolling (like I could scroll the volume from 50% to 100%, but it will settle on 95%), and also it doesn't always scroll smoothly, but that's not a major issue. also there is still the lack of ability to reverse the scrolling direction for the following 3 settings in the FreeTube app settings > Player section:
|
@PikachuEXE can you rebase into dev. Im having playback issues |
08f9b5e
to
8007c4e
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
New custom build: https://github.com/PikachuEXE/FreeTube/actions/runs/14505024327 |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Probably best to rebase again and provide a new build |
8007c4e
to
c96f0a8
Compare
Rebased and build started: https://github.com/PikachuEXE/FreeTube/actions/runs/14853765114 |
I do have mixed feelings about this PR. It makes the UX with a scroll wheel objectively worse but makes trackpad more manageable. I've tested this with trackpad again on nightly and with this change. The before doesnt seem that bad. It requires some getting used to because the swiping gestures have to be made slower in order to decrease/increase the volume by a bit. I think i would choose having a bad trackpad over a bad scrollwheel + the fact that only one user reported this makes me think that this isnt that big of a deal Not blaming the implementation here but this seems to be a case of pick the lesser evil one. if no acceptable middle ground can be found then we should close this |
The way our mouse volume/skip scrolling currently works is by using hardcoded jumps for each event, so one event equals:
On trackpads scrolling on a page is generally smoother whereas with a mouse it tends to jump a bit. Unconfirmed theory: Trackpads send events more frequently but each event is for a smaller "scroll distance", mice send less frequently but each event has a larger "scroll distance". This pull request currently addresses the too large jumps on touch pads by ignoring various events. If my theory above is correct we may instead be able to base the increases/decreases on the distance that was scrolled (deltaX, deltaY and deltaMode) instead of hardcoded values (we would likely have to normalise the values a bit instead of using the raw "scroll distance"), that way it would hopefully even out/make it more similar for mice and trackpads. |
The values in Let me see if I can make it only use |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Pull Request Type
Related issue
Closes #6539
Description
wheel
triggered N times more than mouse wheel with smaller delta values to have smooth scrollingThis PR throttles event handler on value change side only (prevent default/stop propagation still called all the time
Screenshots
With 100ms wait time, trackpad
Screen.Recording.2025-01-29.at.10.21.52.mp4
Testing
A) Those without trackpad
See #6539, test with mouse wheel ensure it works similar to/same as before
B) Those with trackpad
#6539
Desktop
Additional context
I tested 50ms wait and it seems too fast
(Too lazy to record that too