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

Scrolling Ehancement #188

Closed
black7375 opened this issue Aug 22, 2021 · 19 comments
Closed

Scrolling Ehancement #188

black7375 opened this issue Aug 22, 2021 · 19 comments
Labels
Compenent::Others Other components.. Issue::Enhancement New feature or request

Comments

@black7375
Copy link
Owner

black7375 commented Aug 22, 2021

Goal

Is your feature request related to a problem? Please describe.
Currently scrolling feels less responsive and less scrolling.

Describe the solution you'd like
I wish it was a little more neat and sharp.


Scrolling Test

Steps:

  • Scroll weakly three times.
  • Scrolling direction change.
  • Scroll hard about two-three times.

Kinds:

  • Normal mouse
  • Electromagnetic scroll wheel [Logitech Anywhere3]

Scrolling Test

This is 30 fps, may cause janking.

Original Firefox Setting

Init-General.mp4
Init-Logi.mp4

Little Modification

My-General.mp4
My-Logi.mp4

Smooth Scrolling

Smooth-General.mp4
Smooth-Logi.mp4

Scrolling is a feature with a lot of likes and dislikes, so I avoided over-modification.
I welcome your comments.

@black7375 black7375 added Issue::Enhancement New feature or request Compenent::Others Other components.. labels Aug 22, 2021
@black7375 black7375 mentioned this issue Aug 22, 2021
10 tasks
@AveYo
Copy link
Contributor

AveYo commented Aug 22, 2021

glad you've liked my Natural Smooth Scrolling preset!
though mozilla kinda broke it in v88_ish_ so I've created another one, this time around msdPhysics
haven't shared it until now, so I have limited feedback "works-for-me", yet I'm confident you're gonna like v2 even more:
Natural Smooth Scrolling for user.js

@black7375
Copy link
Owner Author

Your setup is the best Firefox smooth scrolling I've found so far.
I can feel that you've carefully tested many parameters.

@black7375
Copy link
Owner Author

black7375 commented Aug 23, 2021

I've only edited 3 values, but I like them pretty. (tested with precision touchpad on linux)

//         Pref                                              Value                 Original
user_pref("apz.allow_zooming",                               true);            ///     true
user_pref("apz.force_disable_desktop_zooming_scrollbars",   false);            ///    false
user_pref("apz.paint_skipping.enabled",                      true);            ///     true
user_pref("apz.windows.use_direct_manipulation",             true);            ///     true
user_pref("dom.event.wheel-deltaMode-lines.always-disabled", true);            ///    false
user_pref("general.smoothScroll.currentVelocityWeighting", "0.15");            ///   "0.25"  || Change: 0.01 => 0.15
user_pref("general.smoothScroll.durationToIntervalRatio",    1000);            ///      200
user_pref("general.smoothScroll.lines.durationMaxMS",         100);            ///      150
user_pref("general.smoothScroll.lines.durationMinMS",           0);            ///      150
user_pref("general.smoothScroll.mouseWheel.durationMaxMS",    100);            ///      200
user_pref("general.smoothScroll.mouseWheel.durationMinMS",      0);            ///       50
user_pref("general.smoothScroll.mouseWheel.migrationPercent", 100);            ///      100
user_pref("general.smoothScroll.msdPhysics.continuousMotionMaxDeltaMS", 12);   ///      120
user_pref("general.smoothScroll.msdPhysics.enabled",                  true);   ///    false
user_pref("general.smoothScroll.msdPhysics.motionBeginSpringConstant", 200);   ///     1250
user_pref("general.smoothScroll.msdPhysics.regularSpringConstant",     200);   ///     1000
user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaMS",         10);   ///       12
user_pref("general.smoothScroll.msdPhysics.slowdownMinDeltaRatio",  "1.20");   ///    "1.3"
user_pref("general.smoothScroll.msdPhysics.slowdownSpringConstant",   1000);   ///     2000
user_pref("general.smoothScroll.other.durationMaxMS",         100);            ///      150
user_pref("general.smoothScroll.other.durationMinMS",           0);            ///      150
user_pref("general.smoothScroll.pages.durationMaxMS",         100);            ///      150
user_pref("general.smoothScroll.pages.durationMinMS",           0);            ///      150
user_pref("general.smoothScroll.pixels.durationMaxMS",        100);            ///      150
user_pref("general.smoothScroll.pixels.durationMinMS",          0);            ///      150
user_pref("general.smoothScroll.scrollbars.durationMaxMS",    100);            ///      150
user_pref("general.smoothScroll.scrollbars.durationMinMS",      0);            ///      150
user_pref("general.smoothScroll.stopDecelerationWeighting", "0.6");            ///    "0.4"  || Change: 0.001 => 0.6
user_pref("layers.async-pan-zoom.enabled",                   true);            ///     true
user_pref("layout.css.scroll-behavior.spring-constant",   "250.0");            ///   "250.0" || Change: 200.0 => 250.0
user_pref("mousewheel.acceleration.factor",                     3);            ///       10
user_pref("mousewheel.acceleration.start",                     -1);            ///       -1
user_pref("mousewheel.default.delta_multiplier_x",            100);            ///      100
user_pref("mousewheel.default.delta_multiplier_y",            100);            ///      100
user_pref("mousewheel.default.delta_multiplier_z",            100);            ///      100
user_pref("mousewheel.min_line_scroll_amount",                  0);            ///        5
user_pref("mousewheel.system_scroll_override_on_root_content.enabled", false); ///     true
user_pref("mousewheel.transaction.timeout",                  1500);            ///     1500
user_pref("toolkit.scrollbox.horizontalScrollDistance",         3);            ///        5
user_pref("toolkit.scrollbox.verticalScrollDistance",           3);            ///        3

Guess I'll have to go home and test 3 more devices and windows.

  • regular mouse
  • electromagnetic scrolling mouse
  • regular touchpad

@AveYo

  1. May I use your code in my project? (License issue)
  2. I recently found out about these settings.
    Do you have any opinion on this?
  • mousewheel.system_scroll_override.enabled
  • mousewheel.system_scroll_override.vertical.factor
  • mousewheel.system_scroll_override.horizontal.factor

@AveYo
Copy link
Contributor

AveYo commented Aug 23, 2021

sure thing!

I actually use layout.css.scroll-behavior.spring-constant 300 and some different timings.
I've kept the *Weighting values as in v1, it was a must there to prevent micro-stutters,
but with msdPhysics maybe it's fine to go back to defaults-ish. Will check how it feels with your input

mousewheel.system_scroll_override.enabled is yet another "we-know-best-screw-the-rest" from mozilla devs,
like general.smoothScroll.mouseWheel.migrationPercent before it, and the already turned off in the preset: mousewheel.system_scroll_override_on_root_content.enabled which is the equivalent annoyance for windows.
Will add this latest linux annoyance as off in the preset as well.

@black7375
Copy link
Owner Author

Thanks for the code and advice!!
It's been a huge help.

@AveYo
Copy link
Contributor

AveYo commented Aug 23, 2021

as suspected there's not a huge difference for my setup (2$ mouse, decades old synaptics touchpad), but I will take your word for it that the *Weighting makes it better on a precision touchpad so I will update the published preset ;)

@black7375
Copy link
Owner Author

I'm also testing it at home and on an older device, and it's definitely different.

@AveYo
Copy link
Contributor

AveYo commented Aug 23, 2021

I meant the core smoothness is done by all the other variables
Will test some more when uupdump conversion script is done on the potato and I plug my trusted high refresh rate crt ;)

@AveYo
Copy link
Contributor

AveYo commented Aug 23, 2021

mousewheel.system_scroll_override.enabled false is problematic across platforms,
on windows makes the scrolling rather slow (for those that got used to the default behavior)
on linux is a mixed bag, either faster than windows, same as windows, or slower
ty mozilla for the added consistency

decided to keep it true in the preset, and added a commented line at the end to set it false if scrolling feels too fast (and that can happen both on linux and windows with some device drivers)

@black7375
Copy link
Owner Author

Yes. I think that would be good.

@AveYo
Copy link
Contributor

AveYo commented Aug 25, 2021

I had a fair use in mind when I've shared it, like it would be nice to leave a small mention in the script "based on natural smooth scrolling v2 by aveyo" since nobody reads issues and changelogs, but if that does not work for you, np

@black7375
Copy link
Owner Author

There was a mistake in the commit history for a while, so I committed again.

Now it shows up in three.

  • As you said, add it in the source.
  • Commit included as Co-authored.
  • CREDIT's Major Contributors

@black7375
Copy link
Owner Author

I'll close it because I think it's open enough.

@black7375
Copy link
Owner Author

I'll close it because I think it's open enough.

@adroslice
Copy link

I strongly dislike this scrolling behaviour, and it was very confusing when it first turned up. It should probably be optional in script installation.

@black7375
Copy link
Owner Author

What scrolling characteristics did you not like?

@adroslice
Copy link

Mainly that the scrolling animation takes far longer to actually complete, which makes productive usage of the browser, for me, much harder.

@AveYo
Copy link
Contributor

AveYo commented Dec 11, 2021

PSA: Natural Smooth Scrolling V3 is up
It's even more smoother while slowly scrolling few notches at a time,
but it then skips scrolling animations when doing more at a time / faster

@black7375, obviously everybody's got their own preferences, so it can't be imposed upon them ;)

Tho my biased opinion is that v3 preset offers the best smooth scrolling so far, technically
And it's versatile, I left at the end of the script two alternatives commented out, one more closer to v2 and one even smoother than v3. Just fiddle with the motionBeginSpringConstant and regularSpringConstant values to lean towards smoother or sharper.

@black7375
Copy link
Owner Author

I'll check.
Thank you for your effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compenent::Others Other components.. Issue::Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants