Repository navigation
Reduce macOS overscroll friction - #122142
Conversation
a527916 to
42ed7f0
Compare
Piinks
left a comment
There was a problem hiding this comment.
Even though this change makes it less "native", I think the experience is better.
How different is this compared to native? Providing a native look and feel is really important to developers. I wonder, is there a change that could be made in RefreshIndicator instead? Could it check with the scroll physics to see if it should behave a little bit differently?
|
(triage) @moffatman Do you still have plans to work on this PR and respond to the feedback given above? |
|
Ran into the same issue with CupertinoSliverRefreshControl + ClampingScrollPhysics. I don't think there is any easy way to have it communicate with the physics. I will capture some videos of before/after the change compared to native |
|
Look like in UIKit, when you have a UIRefreshIndicator, it makes that "segment" of overscroll easily scrollable, while applying harsh friction beyond it. Not sure if that's easily possible in flutter? Current behaviour
Screen.Recording.2023-04-04.at.8.11.49.PM.movWith this PR
Screen.Recording.2023-04-04.at.8.08.36.PM.mov |
86329d1 to
53d02fc
Compare
I haven't quite followed the details of the UIKit behavior you're observing, but this description sounds like the sort of thing that should be possible to express in the sliver protocol. It's a "scroll effect", where you'd be taking the distance the user has scrolled along a somewhat abstract coordinate axis, and then doing something nonlinear with it so that it has an effect more complex than literal scrolling. Because CupertinoSliverRefreshControl is already based on a sliver, that could offer a way to get the effect you want there. |
Good point! I think this makes sense on the physics though. Otherwise, every sliver would have to implement this special case, or a specific sliver would have to be included wherever we would want this behavior. |
Piinks
left a comment
There was a problem hiding this comment.
Thank you for visualizing this with the scroll overlay. Very helpful! It hink it is a really nice improvement. LGTM
Reduce macOS overscroll friction
Increases the
frictionFactoronBouncingScrollPhysicswhendecelerationRate = ScrollDecelerationRate.fast. This in effect reduces the friction when overscrolling. Now it's double the friction compared toScrollDecelerationRate.normal. Previously, it was over 7 times in order to match other macOS apps. But it made it impossible to use some common Flutter interactions likeRefreshIndicator. Even though this change makes it less "native", I think the experience is better.Fixes #119702
Pre-launch Checklist
///).