Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix visual overflow when overscrolling RenderShrinkWrappingViewport #91620

Merged
merged 4 commits into from
Oct 20, 2021

Conversation

Piinks
Copy link
Contributor

@Piinks Piinks commented Oct 11, 2021

Fixes #89717 for real this time. :)

#89717 is a regression that was caused by #87143 while resolving #10949
#90419 originally sought to resolve it, but the test cases in that change did not account for every case of visual overflow.

This updates hasVisualOverflow so that the clip is properly applied when overscrolling a shrinkwrapping viewport. Seen here in the golden file test I added.

Because these images are translucent, the images look the same on github in light mode. Switching to dark mode makes the difference clearer.

Overflowing

shrinkwrap_clipped_overscroll

Not Overflowing 🎉

shrinkwrap_clipped_overscroll 2

There are a lot of tests for each of these changes, and so while I was here I cleaned then up a bit to be more organized.

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 f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. labels Oct 11, 2021
@google-cla google-cla bot added the cla: yes label Oct 11, 2021
@skia-gold
Copy link

Gold has detected about 4 new digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/91620

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

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

Changes reported for pull request #91620 at sha 2850768

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Oct 11, 2021
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

But is there a way to visualize the difference in the golden files better even on white background? Maybe add a solid color dart background around everything? I imagine that this will get confusing again when the golden breaks and we need to debug what's different...

packages/flutter/lib/src/rendering/viewport.dart Outdated Show resolved Hide resolved
Piinks and others added 2 commits October 15, 2021 12:23
Co-authored-by: Michael Goderbauer <goderbauer@google.com>
@skia-gold
Copy link

Gold has detected about 2 new digest(s) on patchset 2.
View them at https://flutter-gold.skia.org/cl/github/91620

@Piinks
Copy link
Contributor Author

Piinks commented Oct 15, 2021

Fixed the golden files to add more contrast.

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 4.
View them at https://flutter-gold.skia.org/cl/github/91620

@git2321231
Copy link

git2321231 commented Oct 19, 2021

@Piinks Any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListView with shrinkwrap overscrolls out of bounds
5 participants