Skip to content

Conversation

@chunhtai
Copy link
Contributor

fixes #96562

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.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Jan 13, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

///
/// The [ReorderableList] uses this scroller to auto scroll the scroll view when
/// user drag item toward the edge of the scroll view.
class _EdgeDraggingAutoScroller {
Copy link
Contributor Author

@chunhtai chunhtai Jan 13, 2022

Choose a reason for hiding this comment

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

This class will eventually be moved to scrollable.dart once global selection starts to use this class. Until then this class remains private.

@chunhtai chunhtai requested a review from darrenaustin January 13, 2022 00:40
Copy link
Contributor

@darrenaustin darrenaustin left a comment

Choose a reason for hiding this comment

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

LGTM. Nice refactoring. See comments below. You will also need to get a test exemption for this as there are no test changes.

@chunhtai
Copy link
Contributor Author

@darrenaustin PTAL :)

@Hixie
Copy link
Contributor

Hixie commented Jan 14, 2022

test-exempt: code refactor with no semantic change

Copy link
Contributor

@darrenaustin darrenaustin left a comment

Choose a reason for hiding this comment

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

LGTM!

@Hixie
Copy link
Contributor

Hixie commented Jan 14, 2022

(that said, if the code is more reusable now, you might want to add a test to verify that reusing it works, because otherwise someone might make it less reusable)

@chunhtai
Copy link
Contributor Author

(that said, if the code is more reusable now, you might want to add a test to verify that reusing it works, because otherwise someone might make it less reusable)

I will add test once I made it public, it is not testable now since it is private. The reason I have not made it public now is that the API may change until I finalize the global selection pr. So I rather keep it private and embrace the fact that people may accidentally make it less reusable

@Hixie
Copy link
Contributor

Hixie commented Jan 14, 2022

seems reasonable

@chunhtai chunhtai merged commit 3bc57c0 into flutter:master Jan 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jan 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Feb 4, 2022
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Mar 8, 2022
* Modularize ReorderableListView auto scrolling logic

* comment

* fix test

* addressing comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modularize ReorderableListView auto scrolling logic

3 participants