Open Bug 1760372 Opened 3 years ago Updated 2 months ago

Switch default scroll animation physics (for input events) from Bezier to MSD

Categories

(Core :: Panning and Zooming, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: botond, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

We have two physics models for scrolling animations: Bezier and Mass-Spring-Damper (MSD).

Scrolling animations triggered by input events such as keyboard scrolls (e.g. PageDown) and mouse wheel scrolls currently use the Bezier physics by default, though a user can opt into the MSD physics using the pref general.smoothScroll.msdPhysics.enabled.

The MSD physics was introduced in bug 1402498, with a view to eventually making it the default.

In this bug, I'd like to try making it the default in Nightly builds to gather feedback.

(Note that script-driven smooth scrolling, e.g. scrollBy() with scroll-behavior: smooth, has used MSD physics from the outset, albeit with slightly different parameters, and will not be affected by this change.)

Bas, I know we've spoken about scrolling physics before, I was curious if you had any opinion on this change.

Flags: needinfo?(bas)

(In reply to Botond Ballo [:botond] from comment #1)

Bas, I know we've spoken about scrolling physics before, I was curious if you had any opinion on this change.

In my opinion the MSD physics are somewhat closer to what our competition uses, I believe this is a good change but we should carefully monitor user feedback and see if we can have some telemetry in place.

Flags: needinfo?(bas)
Depends on: 1402498

Increasing priority to P2, to reflect that we are tracking this in our current stabilization sprint.

Priority: P3 → P2
Depends on: 1836870

Proposed plan:

  • Add back scroll wheel overshoot telemetry (bug 1836870)
  • Set the MSD pref on the nightly channel
    • We probably want to do this at the beginning of the 117 nightly cycle, so that we have some nightly data for overshoot frequency with non-MSD physics as a point of comparison
  • Keep an eye on impact on overshoot frequency, and feedback from the nightly population, before letting the pref ride the trains

(In reply to Botond Ballo [:botond] from comment #0)

We have two physics models for scrolling animations: Bezier and Mass-Spring-Damper (MSD).

Scrolling animations triggered by input events such as keyboard scrolls (e.g. PageDown) and mouse wheel scrolls currently use the Bezier physics by default, though a user can opt into the MSD physics using the pref general.smoothScroll.msdPhysics.enabled.

To test I enabled this. And immediately the scrolling behavior became jumpy and choppy while it is very smooth with this setting disabled. Will this setting be at least kept around? (FF109 dev)

(In reply to avada from comment #5)

Will this setting be at least kept around?

Yep, the Bezier physics option will remain even if the default is changed.

To test I enabled this. And immediately the scrolling behavior became jumpy and choppy while it is very smooth with this setting disabled.

Is this for mousewheel scrolling? I'd be curious to know if you have any other mousewheel-related prefs modified, especially general.smoothScroll.mouseWheel.duration{Max,Min}MS.

(In reply to Botond Ballo [:botond] from comment #6)

Is this for mousewheel scrolling? I'd be curious to know if you have any other mousewheel-related prefs modified, especially general.smoothScroll.mouseWheel.duration{Max,Min}MS.

Both mouse and up/down arrow. I have multiple customizations I did years ago.
These are the general.smoothScroll.* settings I have modified:
user_pref("general.smoothScroll.lines.durationMaxMS", 450);
user_pref("general.smoothScroll.lines.durationMinMS", 450);
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 1500);
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 200);
user_pref("general.smoothScroll.other.durationMaxMS", 400);
user_pref("general.smoothScroll.other.durationMinMS", 400);
user_pref("general.smoothScroll.pages.durationMaxMS", 385);
user_pref("general.smoothScroll.pages.durationMinMS", 385);

(In reply to avada from comment #7)

These are the general.smoothScroll.* settings I have modified:
user_pref("general.smoothScroll.lines.durationMaxMS", 450);
user_pref("general.smoothScroll.lines.durationMinMS", 450);
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 1500);
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 200);
user_pref("general.smoothScroll.other.durationMaxMS", 400);
user_pref("general.smoothScroll.other.durationMinMS", 400);
user_pref("general.smoothScroll.pages.durationMaxMS", 385);
user_pref("general.smoothScroll.pages.durationMinMS", 385);

Ok, I think that explains the choppy feel of MSD physics. These prefs only affect the Bezier physics, and the current default durations are 50 ms (min) - 200 ms (max). The MSD animations do not target a particular duration, but in practice the durations are likely to be closer to the Bezier defaults than these higher ones. So, switching to MSD physics results in animations with significantly shorter durations in your case, such that in between two mousewheel ticks, it's more likely that the animation from the first one finishes before the next one starts, so the page movement is less continuous.

The MSD physics can also be customized (though using different parameters, see general.smoothScroll.msdPhysics.*), though of course if the Bezier physics with the modified durations are working well for you, you may find it easiest to just stick to those.

(In reply to Botond Ballo [:botond] from comment #8)

Ok, I think that explains the choppy feel of MSD physics. These prefs only affect the Bezier physics, and the current default durations are 50 ms (min) - 200 ms (max). The MSD animations do not target a particular duration, but in practice the durations are likely to be closer to the Bezier defaults than these higher ones. So, switching to MSD physics results in animations with significantly shorter durations in your case, such that in between two mousewheel ticks, it's more likely that the animation from the first one finishes before the next one starts, so the page movement is less continuous.

The MSD physics can also be customized (though using different parameters, see general.smoothScroll.msdPhysics.*), though of course if the Bezier physics with the modified durations are working well for you, you may find it easiest to just stick to those.

Thanks for the info. Maybe I'll tinker with MSD settings in the future, if I'll have to much free time.

Depends on: 1846935
Depends on: 1848528
Depends on: 1875627
Depends on: 1877972
Blocks: 1667758
Depends on: 1908257
You need to log in before you can comment on or make changes to this bug.