Closed Bug 1095727 Opened 6 years ago Closed 6 years ago

Tweak fling curving prefs


(Firefox OS Graveyard :: General, defect)

Not set


(Not tracked)

2.1 S9 (21Nov)


(Reporter: kats, Assigned: kats)




(1 file, 1 obsolete file)

Bug 1091049 added fling curving in the gecko platform. :gordonb from UX played with it and said these prefs make it feel a lot better:

    user_pref("apz.fling_curve_function_x1", ".41");
    user_pref("apz.fling_curve_function_y1", "0");
    user_pref("apz.fling_curve_function_x2", ".5");
    user_pref("apz.fling_curve_function_y2", "1");
    user_pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
    user_pref("apz.fling_friction", "0.00265");

We should put update the b2g default prefs to reflect this.
Attached patch Patch (obsolete) — Splinter Review
Attachment #8519167 - Flags: review?(mchang)
I've been playing with these settings a lot. Here's where I'm ending up:

user_pref("apz.fling_curve_function_x1", "0.36");
user_pref("apz.fling_curve_function_x2", "0.53");
user_pref("apz.fling_curve_function_y1", "0.09");
user_pref("apz.fling_curve_function_y2", "0.89");

user_pref("apz.fling_friction", "0.002374");
user_pref("apz.max_velocity_inches_per_ms", "0.06175");

A few reasons why:

1) The original settings let me scroll way too fast for my tastes. It's not as fast as android, but still too fast. I toned down the max velocity such that we can still scroll pretty fast and still scan what's being scrolled by. Before, I couldn't read what was scrolling fast. A friend said that the new setting was "predictable", as in he knew where it would eventually stop versus the settings in comment 0.
2) Less friction - Just a tad so that we get a nice smooth drift to slow down. Anything above 0.0025 feels like a very intentional stop.
3) Less aggressive ramp up in speed, it requires a bit more push to get us to get to max speed. With comment 0, i felt that any fling became really fast really quick. Now, I feel like I need a much more intentional "hurry up finger" to reach max fling speed.

So overall, we hit a lower max speed, we drift longer when slowing down, and it takes a bit more oomph to hit max speeds. The downside is that scrolling slowly, like on a web page, is a bit harder. It was still hard with comment 0 preferences, but now requires even more finesse. But even master scrolls too far and fast on a page like reddit / hacker news. I'm fairly tempted to have two curves:

1) One for fast flings, where we have the current fling friction.
2) One for slow flings, where we ramp up the friction. So at the top of the bezier curve, we check the velocity. If it is above a certain threshold. I'm still considering this, but I could be convinced either way.

@Gordon, can you try the above prefs and see what you think? Thanks!
Flags: needinfo?(gbrander)
Duplicate of this bug: 1042017
I'll take a look.

> I'm fairly tempted to have two curves:

I don't think that's the answer, because having 2 branches to scrolling logic will inevitably create a hitch somewhere in the middle speeds of scrolling.

There needs to be a smooth gradient between the high, middle and low ends of scrolling for users to be able to trust and learn how to use it. I think a single curve gives us that by allowing us to gently increase and decrease velocities in a smooth progression.
Flags: needinfo?(gbrander)
I'm feeling pretty happy with the following:

    user_pref("apz.fling_curve_function_x1", ".41");
    user_pref("apz.fling_curve_function_x2", ".76");
    user_pref("apz.fling_curve_function_y1", "0");
    user_pref("apz.fling_curve_function_y2", "1");
    user_pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
    user_pref("apz.fling_friction", "0.0024");

Rather than speeding up the scroll toward the middle with a higher friction, we lower the friction, but slow the scroll at the low end and only speed it at the very highest end. This gives us pretty reliable accuracy scrolling with a drifty finish, plus a reasonably free speed scroll that isn't too fast.
And to clarify: use this group of settings on top of the defaults we already have in master. Only these settings change.
Attached patch Patch v2Splinter Review
Attachment #8519167 - Attachment is obsolete: true
Attachment #8519167 - Flags: review?(mchang)
Attachment #8520936 - Flags: review?(mchang)
Comment on attachment 8520936 [details] [diff] [review]
Patch v2

Since this is a trivial change I just landed it with r=me
Attachment #8520936 - Flags: review?(mchang) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S9 (21Nov)
You need to log in before you can comment on or make changes to this bug.