Repository navigation
Add dedicated rubber band spring for overscroll recovery in BouncingScrollPhysics - #187568
Conversation
…ncingScrollPhysics
There was a problem hiding this comment.
Code Review
This pull request introduces a new rubberBandSpring to BouncingScrollPhysics to simulate iOS-style exponential decay for stationary overscroll releases, updating related tests to reflect faster animation convergence. Feedback on the changes highlights a potential logic regression in createBallisticSimulation where using <= instead of < to define isStationary alters behavior when the velocity is exactly equal to the tolerance threshold.
|
@dkwingsmt Hi! Just a friendly bump on this. This PR relands the iOS overscroll physics change you previously approved, and I've fully fixed the regression test failures mentioned by Piinks. Could you please take a quick look whenever you have a moment? Thanks! |
|
This PR is identical to the previous PR. Hopefully there are no more analyze errors and we can land it. :) |
|
I updated the stale expectation to match the new overscroll recovery trajectory. No production code was changed, and this appears to have been the only failing test in the shard. Sorry for the extra review round, and thanks again! |
|
Note The failure is in |
|
The failed daemon test shouldn't be concerning. Probably a flake. I'm kicking off Google tests. With the change in the expectation though, this PR is affected by the code freeze. We'll have to evaluate how to land this PR. |
victorsanni
left a comment
There was a problem hiding this comment.
LGTM, thanks for the work here.
The velocity comes from the spring solution's `dx(0)`, so it's zero only up to rounding error. The exact check happened to pass until upstream changed the spring used here: flutter/flutter#187568 This fixes the failing CI on main: https://github.com/zulip/zulip-flutter/actions/runs/35017917623/job/104545944872#step:5:20
flutter/flutter@8b3e8f5...27fec0e 2026-09-14 ttankkeo112@gmail.com Add dedicated rubber band spring for overscroll recovery in BouncingScrollPhysics (flutter/flutter#187568) 2026-09-14 engine-flutter-autoroll@skia.org Roll Skia from 83c984a6daf5 to 59904977fcbb (8 revisions) (flutter/flutter#192767) 2026-09-14 34871572+gmackall@users.noreply.github.com Request unbuffered dispatch for platform view motion events after `_PlatformViewGestureRecognizer` rejects gesture (flutter/flutter#192259) 2026-09-14 engine-flutter-autoroll@skia.org Roll Fuchsia GN SDK from ZsxUUK2SfA-TrNvb8... to PDJz3b3CL31uoLOkD... (flutter/flutter#192440) 2026-09-14 codefu@google.com ci(bringup): cleanup some bringup (flutter/flutter#192752) 2026-09-14 kevmoo@users.noreply.github.com Warn users on potential removal of dart:html in dry run (flutter/flutter#192710) 2026-09-14 codefu@google.com docs: migrate design document guidance to flutter/rfc (flutter/flutter#192648) 2026-09-14 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#192499) 2026-09-14 engine-flutter-autoroll@skia.org Roll Skia from 7a6fd7ff72d5 to 83c984a6daf5 (1 revision) (flutter/flutter#192745) 2026-09-14 1961493+harryterkelsen@users.noreply.github.com RELAND: [devicelab] Clean up Chrome profile directories and trap abort signals in web benchmarks (flutter/flutter#192655) 2026-09-14 kevmoo@users.noreply.github.com fix(web): hide --web-content-hash until content hashing is complete (flutter/flutter#192663) 2026-09-14 engine-flutter-autoroll@skia.org Roll Skia from 527751088719 to 7a6fd7ff72d5 (2 revisions) (flutter/flutter#192725) 2026-09-14 engine-flutter-autoroll@skia.org Roll Skia from eaf9f82813eb to 527751088719 (1 revision) (flutter/flutter#192722) 2026-09-14 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from AQu85JoTHCMET3Q8G... to 7R1l5MhSZZUr1Q6D1... (flutter/flutter#192719) 2026-09-14 robert.ancell@canonical.com [Linux] Clear the frame when there is nothing to render (flutter/flutter#192461) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
The velocity comes from the spring solution's `dx(0)`, so it's zero only up to rounding error. The exact check happened to pass until upstream changed the spring used here: flutter/flutter#187568 This fixes the failing CI on main: https://github.com/zulip/zulip-flutter/actions/runs/35017917623/job/104545944872#step:5:20
Note
Relanding #182426.
Thank you for your review and guidance on the previous PR.
I'm relanding this with the fix for the test failures that caused the issue before. (I've updated the regression test to account for the faster convergence rate of the new physics.)
Fixes #181752
(for detailed analysis, measurements, and discussion, please refer to the original issue.)
This pull request implements a dedicated “rubber band” physics for overscroll snap-back in BouncingScrollPhysics on iOS to better match the native UIScrollView feel.
Note
This change adjusts spring constants and simulation behavior
to improve iOS scroll fidelity.
Given that this change primarily involves physics parameter tuning,
it may reasonably qualify as test-exempt. However, I am not entirely
certain what level of automated testing would be considered appropriate.
Please let me know if additional tests are expected,
and I am happy to update the PR accordingly.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.