-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder #167032
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 overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder #167032
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
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 Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
I didn't really understand what happened with the golden test. I did not make any changes that could affect the cupertino date picker displayed there. |
navaronbracke
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.
Some drive-by feedback.
You will also need a test for this, that asserts that no ColoredBox is used when the modal route is not opaque. (for the forward & reverse cases)
|
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 Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
6752c16 to
4164bba
Compare
QuncCccccc
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 for your contribution! Seems this PR change overlaps #167324, should we wait until that PR lands and then proceed this one:)?
| color: | ||
| animation.isAnimating | ||
| ? backgroundColor ?? Theme.of(context).colorScheme.surface | ||
| ? backgroundColor ?? ColorScheme.of(context).surface |
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.
This is equivalent to Theme.of(context).colorScheme, so I guess we change it here for simplicity?
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.
Yes, I did suggest that in #167032 (comment) for exactly that reason :)
bca7234 to
b0484e0
Compare
3c19520 to
e39b501
Compare
QuncCccccc
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.
LGTM:) Thank you!
justinmc
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.
Looks good but we are still waiting on #167324. I'll make sure we have a decision on that one next week.
|
#167324 is now merged. @TheLastFlame can you update this PR now? |
e39b501 to
fcff2dd
Compare
|
@justinmc , Google testing failed 🤔 |
packages/flutter/test/material/page_transitions_theme_test.dart
Outdated
Show resolved
Hide resolved
|
Since it's just formatting issue and a nit, I just committed the change. Hope you don't mind:) |
… FadeForwardsPageTransitionsBuilder (flutter/flutter#167032)
… FadeForwardsPageTransitionsBuilder (flutter/flutter#167032)
flutter/flutter@34c2a3b...f4334d2 2025-08-14 [email protected] Roll Dart SDK from 9b4691f35139 to 214a7f829913 (2 revisions) (flutter/flutter#173769) 2025-08-14 [email protected] Roll Skia from b3e86773dae1 to dca5f05fee87 (4 revisions) (flutter/flutter#173763) 2025-08-14 [email protected] Roll Dart SDK from 73153bdc1459 to 9b4691f35139 (3 revisions) (flutter/flutter#173755) 2025-08-14 [email protected] Roll Skia from 5852eddfd404 to b3e86773dae1 (1 revision) (flutter/flutter#173750) 2025-08-14 [email protected] Allow empty initial time when using text input mode in showTimePicker dialog (flutter/flutter#172847) 2025-08-13 [email protected] Roll Skia from 525e2bf80559 to 5852eddfd404 (2 revisions) (flutter/flutter#173740) 2025-08-13 [email protected] [web] Popping a nameless route should preserve the correct route name (flutter/flutter#173652) 2025-08-13 [email protected] Make sure that a ChoiceChip doesn't crash in 0x0 environment (flutter/flutter#173322) 2025-08-13 [email protected] [ Tool ] Fix missing import for widget_preview.dart (flutter/flutter#173731) 2025-08-13 [email protected] Roll Skia from f7fdda3cd0e6 to 525e2bf80559 (7 revisions) (flutter/flutter#173727) 2025-08-13 [email protected] Do not include `:unittests` unless `enable_unittests` (flutter/flutter#173729) 2025-08-13 [email protected] Roll Packages from 08a9b2c to 6cb9113 (1 revision) (flutter/flutter#173726) 2025-08-13 [email protected] fix: selected date decorator renders outside PageView in `DatePickerDialog` dialog (flutter/flutter#171718) 2025-08-13 [email protected] [ Widget Preview ] Add `--machine` mode (flutter/flutter#173654) 2025-08-13 [email protected] Make sure that a Chip doesn't crash in 0x0 environment (flutter/flutter#173245) 2025-08-13 [email protected] feat: Cupertino sheet implement upward stretch on full sheet (flutter/flutter#168547) 2025-08-13 [email protected] Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder (flutter/flutter#167032) 2025-08-13 [email protected] Fix `ChipThemeData` lerp for `BorderSide` (flutter/flutter#173160) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…rdsPageTransitionsBuilder (flutter#167032) Reopens flutter#165726 with the removed test that has become irrelevant. Depends on: flutter#167324 Actual master: https://github.com/user-attachments/assets/28619355-9c1e-4f06-9ede-38c4dddd13df After fix: https://github.com/user-attachments/assets/a5f2ecf2-5d8e-445a-b5a9-a7d6c0e3ec5d ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Justin McCandless <[email protected]> Co-authored-by: Qun Cheng <[email protected]>
MaterialApp introduced a ColoredBox in the widget tree, causing this test to fail on master Related flutter/flutter#167032
…rdsPageTransitionsBuilder (flutter#167032) Reopens flutter#165726 with the removed test that has become irrelevant. Depends on: flutter#167324 Actual master: https://github.com/user-attachments/assets/28619355-9c1e-4f06-9ede-38c4dddd13df After fix: https://github.com/user-attachments/assets/a5f2ecf2-5d8e-445a-b5a9-a7d6c0e3ec5d ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Justin McCandless <[email protected]> Co-authored-by: Qun Cheng <[email protected]>
* Add debug logging for CI * Use own widget in test MaterialApp introduced a ColoredBox in the widget tree, causing this test to fail on master Related flutter/flutter#167032 * Revert dump * Ignore deprecated members until finally removed This is only test code, irrelevant for package compatability * Explicitly set device * Tune android emulator * Reduce number of args * Use default args * Try another api level * Try 64bit
…r#9807) flutter/flutter@34c2a3b...f4334d2 2025-08-14 [email protected] Roll Dart SDK from 9b4691f35139 to 214a7f829913 (2 revisions) (flutter/flutter#173769) 2025-08-14 [email protected] Roll Skia from b3e86773dae1 to dca5f05fee87 (4 revisions) (flutter/flutter#173763) 2025-08-14 [email protected] Roll Dart SDK from 73153bdc1459 to 9b4691f35139 (3 revisions) (flutter/flutter#173755) 2025-08-14 [email protected] Roll Skia from 5852eddfd404 to b3e86773dae1 (1 revision) (flutter/flutter#173750) 2025-08-14 [email protected] Allow empty initial time when using text input mode in showTimePicker dialog (flutter/flutter#172847) 2025-08-13 [email protected] Roll Skia from 525e2bf80559 to 5852eddfd404 (2 revisions) (flutter/flutter#173740) 2025-08-13 [email protected] [web] Popping a nameless route should preserve the correct route name (flutter/flutter#173652) 2025-08-13 [email protected] Make sure that a ChoiceChip doesn't crash in 0x0 environment (flutter/flutter#173322) 2025-08-13 [email protected] [ Tool ] Fix missing import for widget_preview.dart (flutter/flutter#173731) 2025-08-13 [email protected] Roll Skia from f7fdda3cd0e6 to 525e2bf80559 (7 revisions) (flutter/flutter#173727) 2025-08-13 [email protected] Do not include `:unittests` unless `enable_unittests` (flutter/flutter#173729) 2025-08-13 [email protected] Roll Packages from 08a9b2c to 6cb9113 (1 revision) (flutter/flutter#173726) 2025-08-13 [email protected] fix: selected date decorator renders outside PageView in `DatePickerDialog` dialog (flutter/flutter#171718) 2025-08-13 [email protected] [ Widget Preview ] Add `--machine` mode (flutter/flutter#173654) 2025-08-13 [email protected] Make sure that a Chip doesn't crash in 0x0 environment (flutter/flutter#173245) 2025-08-13 [email protected] feat: Cupertino sheet implement upward stretch on full sheet (flutter/flutter#168547) 2025-08-13 [email protected] Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder (flutter/flutter#167032) 2025-08-13 [email protected] Fix `ChipThemeData` lerp for `BorderSide` (flutter/flutter#173160) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…rdsPageTransitionsBuilder (flutter#167032) Reopens flutter#165726 with the removed test that has become irrelevant. Depends on: flutter#167324 Actual master: https://github.com/user-attachments/assets/28619355-9c1e-4f06-9ede-38c4dddd13df After fix: https://github.com/user-attachments/assets/a5f2ecf2-5d8e-445a-b5a9-a7d6c0e3ec5d ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Justin McCandless <[email protected]> Co-authored-by: Qun Cheng <[email protected]>
…rdsPageTransitionsBuilder (flutter#167032) Reopens flutter#165726 with the removed test that has become irrelevant. Depends on: flutter#167324 Actual master: https://github.com/user-attachments/assets/28619355-9c1e-4f06-9ede-38c4dddd13df After fix: https://github.com/user-attachments/assets/a5f2ecf2-5d8e-445a-b5a9-a7d6c0e3ec5d ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Justin McCandless <[email protected]> Co-authored-by: Qun Cheng <[email protected]>
… FadeForwardsPageTransitionsBuilder (flutter/flutter#167032)
Fix test failures caused by Flutter 3.38+ adding a transparent ColoredBox for page transitions (flutter/flutter#167032). Replace type-based widget finders with Key-based finders to explicitly target test widgets and avoid conflicts with framework-added ColoredBox widgets.
- Bump Flutter SDK minimum version: 3.32.0 -> 3.38.0 - Update accessibility_tools: ^2.0.0 -> ^2.8.0 Required for compatibility with MaterialApp page transition changes introduced in Flutter 3.38 (flutter/flutter#167032).
This PR updates the test suite to be compatible with Flutter 3.38+, which introduced a breaking change in `MaterialApp`'s page transition implementation. Flutter 3.38 added a transparent `ColoredBox` widget for page transitions ([flutter/flutter#167032](flutter/flutter#167032)), which caused existing tests that used type-based widget finders to fail with `Bad state: Too many elements` errors. The solution replaces all type-based `ColoredBox` finders with Key-based finders, making tests more explicit and robust against framework changes.
…rdsPageTransitionsBuilder (flutter#167032) Reopens flutter#165726 with the removed test that has become irrelevant. Depends on: flutter#167324 Actual master: https://github.com/user-attachments/assets/28619355-9c1e-4f06-9ede-38c4dddd13df After fix: https://github.com/user-attachments/assets/a5f2ecf2-5d8e-445a-b5a9-a7d6c0e3ec5d ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Justin McCandless <[email protected]> Co-authored-by: Qun Cheng <[email protected]>

Reopens #165726 with the removed test that has become irrelevant.
Depends on: #167324
Actual master:
Screen.Recording.2025-04-11.165345.mp4
After fix:
Screen.Recording.2025-04-12.225920.mp4
Pre-launch Checklist
///).