fix(android): ease controlled scrolls within the requested duration - #2393
Conversation
|
Size Report
Startup median (7 runs, lower is better):
|
|
The easing implementation and reported Settings/RN evidence look sound at f1518b7, and this is a simpler alternative to #2372 rather than a change to stack on top of it. Two cleanup items remain: update ADR 0013, which still requires linear Android transport sampling, to describe controlled easing versus inertial/general plans; move the new Android-lowering property test beside its package-owned implementation. Android smoke passes. Linux failed during apt setup and iOS failed in an unchanged fixture interaction, so those failures appear unrelated, but CI is not fully green. |
|
This branch now conflicts with main, and #2372 has merged. Since this proposal was presented as an alternative to #2372, please reconcile the intended controlled-scroll behavior with that implementation before rebasing; the earlier ADR and test-location findings also remain. Validate the combined behavior rather than carrying both fixes forward unchanged. |
f1518b7 to
4834ad2
Compare
|
The rebase at 4834ad2 cleanly replaces the braking tail, and the Android implementation matches the version with the reported Settings/RN evidence. Checks pass and conflicts are resolved. The two earlier cleanup items remain: update ADR 0013 to distinguish controlled easing from linear inertial/general sampling, and move the Android-lowering property test and its new arbitrary beside the package-owned implementation; rerun the focused tests and affected checks afterward. |
|
This now conflicts with main at the unchanged 4834ad2 head. Please resolve the conflict and rerun the affected checks; the two previously noted cleanup items still apply. |
4834ad2 to
e7723f5
Compare
|
Addressed all actionable review comments in e7723f5:
The exact rebased head passes |
|
The cleanup is complete at e7723f5: controlled easing preserves the requested duration and endpoints, inertial sampling stays linear, and the old braking tail is removed. The production code matches the earlier live-tested Android version. No remaining code findings; iOS CI failed on the known five-second Xcode version probes before the runner build, which looks unrelated to this change. |
Summary
Replace Android’s controlled-scroll braking tail from #2372 with easing in the sampling owner: accelerate for one frame, then decelerate through release.
scroll down --pixels 900 --duration-ms 300keeps its 300ms duration and 21 events, without jitter, an appended tail, or a reduced duration ceiling.scroll topandscroll bottomretain inertial sampling.Nine files changed. Includes help/docs, ADR 0013’s controlled-versus-linear sampling contract, package-owned property tests and generator, and the provider integration duration assertion. No added code comments.
Closes #2371.
Validation
e7723f5ec0:pnpm check:affected --runpassed; CI pending.f1518b77db5e98bd2b60905dddf239eb490575bf: a 900px/300ms drag moved Settings 829px and RN ScrollView 830px on Pixel 7/API 36 and Pixel 9/API 37. Pixel 7 also measured 750px at 120ms and 877–878px at 10000ms; inertial bottom traversal passed.