Skip to content

Conversation

@dnfield
Copy link
Contributor

@dnfield dnfield commented May 18, 2022

Fixes #104046

Existing test needed to be updated because it does not actually cause overflow - even though the container height is 2000, it's getting clipped by the individual grid square - not by the whole grid itself. Adding more squares to the grid causes overflow to happen.

@dnfield dnfield requested review from Piinks and goderbauer May 18, 2022 10:20
@flutter-dashboard flutter-dashboard bot added f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. labels May 18, 2022
@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 #104064 at sha a77cc65

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label May 18, 2022
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.

I did a bit of digging in the git history. I left a comment in the issue regarding a potential test case. Let me know what you think. :)

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

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 #104064 at sha 4002b8d

@dnfield
Copy link
Contributor Author

dnfield commented May 18, 2022

The diff reported is .01%. I can't find the pixel that is different :(

@dnfield
Copy link
Contributor Author

dnfield commented May 18, 2022

Ahhh I see the difference now.

This is almost certainly related to pixel snapping.

Given that, I think we should wait for @jonahwilliams's changes in flutter_tester to eb adopted internally first - this will likely cause a large number of scuba diffs internally because it no longer pushes a layer in cases where it used to. I'm going to mark this as draft for now.

@dnfield dnfield marked this pull request as draft May 18, 2022 18:40
@dnfield
Copy link
Contributor Author

dnfield commented May 18, 2022

IOW - this patch removes a composited layer in some cases because the GridView no longer always thinks it needs to push a clip layer with Clip.hardEdge, because it doesn't always think it has visual overflow.

@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

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.

@Piinks
Copy link
Contributor

Piinks commented Jun 8, 2022

(Triage) @dnfield do you have a reference to the change this PR is waiting on so we can track?

@dnfield
Copy link
Contributor Author

dnfield commented Jun 8, 2022

Jonah's changes landed and this shoul dbe good for review now.

@dnfield dnfield marked this pull request as ready for review June 8, 2022 22:58
@dnfield
Copy link
Contributor Author

dnfield commented Jun 8, 2022

(almost all of google golden testing now runs without pixel snapping, meaning this change won't introduce insanity in terms of golden changes.. I hope :)

@dnfield dnfield requested review from Piinks and jonahwilliams June 8, 2022 23:00
child: GridView(
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
children: <Widget>[
Container(height: 200.0),
Copy link
Contributor

Choose a reason for hiding this comment

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

How do you know this isn't overflowing? is it just because 200 < default tester window height?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. This is small enough to fit into the viewport.

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

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.

LGTM-cat

@godofredoc godofredoc added autosubmit Merge PR when tree becomes green via auto submit App and removed waiting for tree to go green labels Jun 14, 2022
@dnfield dnfield merged commit a0e333b into flutter:master Jun 15, 2022
@dnfield dnfield deleted the grid_overflow branch June 15, 2022 23:28
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 16, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 16, 2022
dnfield added a commit that referenced this pull request Jun 16, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
* Make RenderSliverGrid more accurately report overflow

* Update packages/flutter/lib/src/rendering/sliver_grid.dart

Co-authored-by: Kate Lovett <[email protected]>

Co-authored-by: Kate Lovett <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App 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.

RenderSliverGrid lies about having visual overflow

4 participants