Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Jul 15, 2022

Status: WIP, following up on past review comments and concerns

Customer impact: ✅ non-breaking

Note
Part of this change in the past caused a bad regression. This does not appear to be the case anymore with the ballistic animation changes. See here for context: https://github.com/flutter/flutter/pull/77497/files#r705784804

Related PRs:

Related Issues:


Before

Screen.Recording.2022-07-14.at.3.43.32.PM.mov

After

Screen.Recording.2022-07-14.at.3.23.16.PM.mov

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added framework flutter/packages/flutter repository. See also f: labels. c: performance Relates to speed or footprint issues (see "perf:" labels) a: fidelity Matching the OEM platforms better f: scrolling Viewports, list views, slivers, etc. a: quality A truly polished experience labels Jul 15, 2022
@flutter-dashboard flutter-dashboard bot added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: animation Animation APIs a: text input Entering text in a text field or keyboard related problems c: contributor-productivity Team-specific productivity, code health, technical debt. labels Jul 15, 2022
Copy link
Contributor Author

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against internal test suite, this will be able to land without breaking customers. ✅

Copy link
Contributor Author

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC-ing interested parties @grouma @MxSoul @goderbauer @nt4f04uNd

I am still following up on a few things here, but you're feedback is welcome. I have merged the ballistic activity update with the clamping simulation update.

They kind of validate each other. See https://github.com/flutter/flutter/pull/77497/files#r705784804 - this test change (the original regression) is no longer reproducing with them combined.

Copy link
Member

@grouma grouma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

It looks like the scrolling is ever so slightly off in your video (but much much better). The scrolling logic should essentially be the same with an equal number of spline samples. I wonder what is causing the minor differences?

Nonetheless, I will be extremely happy when this lands. I'm particularly pleased with the removal of the "snapping" and the addition of this test.

@MxSoul
Copy link

MxSoul commented Jul 19, 2022

Thanks @Piinks
Due to changes in my own work, I didn't have time to follow up on this PR before. I'm very sorry about that, so it's nice to see you're still following up on this PR.
I would love to see better scrolling on Flutter. I have some free time now, I might be able to help if you need it.

initScrollMetrics, initVelocity);
if (simulation == null) {
goIdle();
return null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should goIdle really be called here?
I think this check should be on the side of applyNewDimensions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is called here in updateBallistic.. similar to how it is in goBallistic.

///
/// The current simulation will be replaced with the provided [Simulation].
void updateSimulation(Simulation simulation) {
_simulation = simulation;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should perhaps assert against being called without active simulation, or just be a no-op action

docs should also say what it does in this case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I actually just removed an assertion that it is currently animating based on the original PR, see this comment: https://github.com/flutter/flutter/pull/100133/files#r844471344. @MxSoul you mentioned there that the assertion is not necessary, do you remember why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am adding this assertion back. If we find it is an issue, we can investigate further and remove it if necessary.

@nt4f04uNd
Copy link
Member

@Piinks
Copy link
Contributor Author

Piinks commented Jul 19, 2022

Should this PR also remove this test?

I don't think so, but I will double check. I remember that test and how it was blocking the page scroll physics update you did @nt4f04uNd. I referenced that above. My plan here is to resolve this, so I can unblock and return to that change. I figure we can revisit that test then, WDYT?

@nt4f04uNd
Copy link
Member

I figure we can revisit that test then, WDYT?

Sounds good to me

@Piinks
Copy link
Contributor Author

Piinks commented Jul 28, 2022

I'll be returning to this next week with updates, I am handling a few fires elsewhere this week. 🔥 😅

@Piinks Piinks changed the title WIP - Update Ballistic animation & ClampingScrollSimulation Update Ballistic animation & ClampingScrollSimulation Aug 17, 2022
@Piinks Piinks marked this pull request as ready for review August 17, 2022 22:06
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 18, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Aug 18, 2022

  • The status or check suite Windows web_tool_tests has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Windows plugin_test has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac_ios hot_mode_dev_cycle_macos_target__benchmark has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac tool_integration_tests_1_4 has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac framework_tests_libraries has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac build_tests_3_4 has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux web_canvaskit_tests_4 has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux tool_integration_tests_2_4 has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux gradle_plugin_bundle_test has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Linux customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 18, 2022
@Piinks
Copy link
Contributor Author

Piinks commented Aug 18, 2022

Blocked on #109797

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 19, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Aug 19, 2022

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 19, 2022
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 19, 2022
@auto-submit auto-submit bot merged commit b6f7289 into flutter:master Aug 19, 2022
@xster
Copy link
Member

xster commented Aug 19, 2022

😮 super amazing! Thank you Kate!

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 20, 2022
Piinks added a commit to Piinks/flutter that referenced this pull request Sep 8, 2022
auto-submit bot pushed a commit to flutter/tests that referenced this pull request Apr 12, 2024
[super_sliver_list](https://superlistapp.github.io/super_sliver_list/#/example/item-list) is an alternative to `SliverList` (and `ListView`) with different performance characteristics and ability to reliably jump / animate to any item.

It relies heavily on `scrollOffsetCorrection` in a way no other sliver in Flutter does and thus may be somewhat prone to breaking (for example it was broken in past by flutter/flutter#107735, which was reverted later).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: animation Animation APIs a: fidelity Matching the OEM platforms better a: quality A truly polished experience a: text input Entering text in a text field or keyboard related problems autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. c: performance Relates to speed or footprint issues (see "perf:" labels) f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ballistic simulations may be created too frequently Android scroll speed deceleration rate doesn't match native

5 participants