-
Notifications
You must be signed in to change notification settings - Fork 29.7k
ModalBottomSheetRoute: Allow content to consume top notch with SafeArea #122225
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
ModalBottomSheetRoute: Allow content to consume top notch with SafeArea #122225
Conversation
gnprice
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM. (And I see it's essentially the same as the remaining part of #121588 after #122118 was merged.)
We found on #121588 that these changes caused failures in Google testing. I believe this is nevertheless the right change, for the reasons at #121752 (comment) and in the thread up to #121588 (comment) . But I'd like to have @Hangyujin's input on what's going on in those tests — whether the code in question is just working around broken behavior and can be updated to work with the fixed behavior, or whether perhaps there's something we've missed that makes the existing behavior the right way after all.
|
@Hangyujin Do you think you might be able to take a look at the Google tests affected by this fix? I see your major bottom-sheet PR #122445 has now been merged :-) |
|
@chrisbobbe Hi Can you rebase this PR to re-trigger google testing? I can't see the failure details for it. |
ae9992d to
9fd44ea
Compare
|
Ah it looks like @gnprice has just done so; thanks, Greg! |
|
@Hangyujin Are you able to see failure details for the PR now? The reporting of status back to GitHub seems to be getting stuck, but I'm told in #hackers-infra that it ran and there are some failures visible from inside Google. |
|
Talked to a release team member, and he suggested me to try give this an approval to see if it can trigger google testing to start. |
|
Looks like it's still in status pending. I think the release team member's suggestion may have been about this point:
But the PR already satisfied that condition, since I'd approved it earlier. So if it's about that condition, then a second approval wouldn't change things. I'll try updating the branch again. Perhaps on a third roll of the dice, things will work. (Also, perhaps the underlying issue is about the infra running into GitHub rate limits, in which case this might be a less congested time of day.) |
Fixes flutter#121752. With `useSafeArea: false`, there is no longer a `MediaQuery.removePadding` with `removeTop: true`. That `MediaQuery` was preventing the sheet's content from accurately padding the system intrusion at the top, when desired.
6f231cc to
93f6de4
Compare
|
🎉 Google testing reported results! Failures, as expected. @Hangyujin when you get a chance, it would be great if you can take a look at what's going on in those tests — whether the code in question is just working around broken behavior and can be updated to work with the fixed behavior, or whether perhaps there's something we've missed that makes the existing behavior the right way after all. (There are also failures in customer_testing, but those are unrelated to the PR: #123385.) |
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Just updated with a merge commit. |
|
Just updated again. |
|
Updated. |
|
Hmm, an automated check failed: "Pull Request Labeler / triage (pull_request_target)". Clicking through to see details, there are some error lines in the output: […]
Error: Error: found unexpected type for label 'a: accessibility' (should be array of config options)
Error: found unexpected type for label 'a: accessibility' (should be array of config options)
[…]Neither this PR nor its linked issue (#121752) are labeled with 'a: accessibility'…hmm. Ah! Those errors are mentioned in #129666, which has been closed as fixed. I'll make another merge commit to update this, and see if that fixes it. |
|
@chrisbobbe thanks for the contribution! Sorry for the delay in reviewing the test results. I just triggered an update so that the bots would run again. Can you ping us on Discord when the tests give a result so that someone can help you find out what is going on? Thanks! |
|
Google testing failures: looks like it's caused a bunch of apps to have some additional padding at the top of bottom sheets. |
|
Makes sense; I would expect that to happen in most cases where the bottom-sheet content has a
If that's wrong, perhaps there's something we've missed that makes the existing behavior the right way after all. 🙂 |
|
The problem is that this would essentially introduce a silent regression which we could not detect or automation migration for. So we'd essentially be breaking shipping apps without any way for the developer to notice unless they tested every screen on a lot of devices (with different notches), which is more effort than many people can afford. |
|
I see. I think one way forward would be:
Thinking more about this with @gnprice, we don't really understand the use case for (why we don't understand that use case)#39205 (comment) mentions one bottom sheet that builds a whole
Possibly, |
|
Documentation is always welcome, certainly. And I agree that it's not clear that we made the right choices when initially developing this, unfortunately. |
…134793) As discussed at #122225 (comment), this is a docs change meant to help people in the absence of a fix for #121752, which is being closed as WONTFIX.
…lutter#134793) As discussed at flutter#122225 (comment), this is a docs change meant to help people in the absence of a fix for flutter#121752, which is being closed as WONTFIX.
Fixes #121752.
With
useSafeArea: false, there is no longer aMediaQuery.removePaddingwithremoveTop: true. ThatMediaQuerywas preventing the sheet's content from accurately padding the system intrusion at the top, when desired.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.