Skip to content

Conversation

@gnprice
Copy link
Member

@gnprice gnprice commented Feb 13, 2023

This is the last part of the further enhancements after #13 that I've been using for my investigations the past couple of weeks. It consists of two related commits:

[scroll_overlay] Add a place to customize the scroll physics

This has been very convenient for experimenting with different
scroll physics in my recent investigations, providing a way to
do so without creating rebase conflicts with other changes to
this ListView.builder call.

This is especially useful in combination with the next commit,
adding a piece of debug logging.

[scroll_overlay] Add debug print on createBallisticSimulation

This has been extremely convenient in my recent scrolling
investigations.

Because the ScrollPhysics protocol is a bit subtle to hook into
correctly, and requires some boilerplate, inserting debug logging
for it is a bit more complicated than just writing down a
debugPrint call of one's choice. So it benefits from having
this permanent infrastructure in the app.


The second commit leaves the debug logging it adds enabled by default. That's not what one would do in the framework or in a normal app; but I think it makes sense here, given that this is a test app and the logging is right at the core of what the app is made to test.

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 the Flutter Style Guide recently, and have followed its advice.
  • 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.

Copy link
Contributor

@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.

Sharing on all 3 for consistency: I was so very excited to see #13 that I forgot myself and made an error, actually 2. I should have sought a second reviewer on the PR as is our review guidelines. And I should have ensured tests were included, or that test exemption had been granted. 😅

Can you add a test for this PR? It ensures we do not end up removing your change accidentally. :)

@gnprice
Copy link
Member Author

gnprice commented Feb 14, 2023

Test added! PTAL.

This has been very convenient for experimenting with different
scroll physics in my recent investigations, providing a way to
do so without creating rebase conflicts with other changes to
this `ListView.builder` call.

This is especially useful in combination with the next commit,
adding a piece of debug logging.
This has been extremely convenient in my recent scrolling
investigations.

Because the ScrollPhysics protocol is a bit subtle to hook into
correctly, and requires some boilerplate, inserting debug logging
for it is a bit more complicated than just writing down a
`debugPrint` call of one's choice.  So it benefits from having
this permanent infrastructure in the app.
And move the customization point to a widget field so it
can be tested.
Copy link
Contributor

@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.

Also LGTM! Thank you for all of these improvements. I think I managed the merge conflict this time. :)

@Piinks Piinks merged commit e7b5818 into flutter:master Feb 16, 2023
@gnprice gnprice mentioned this pull request Feb 16, 2023
8 tasks
@gnprice
Copy link
Member Author

gnprice commented Feb 16, 2023

Thank you!

It looks like the merge on this one needs a fixup: #17.

(Which I guess reminds us of why it'd be great to have these new tests run automatically on PRs, and/or to have the autosubmit infra running on this repo.)

@gnprice gnprice deleted the pr-print branch February 17, 2023 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants