Skip to content

Reland predictive back route transitions by default #173860

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

Conversation

justinmc
Copy link
Contributor

Relands #165832 by reverting #173809.

@justinmc justinmc self-assigned this Aug 15, 2025
@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: routes Navigator, Router, and related APIs. labels Aug 15, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request relands the change to make predictive back route transitions the default on Android by introducing PredictiveBackPageTransitionsBuilder. The changes are comprehensive, including updates to the default page transition theme, adjustments to animation timings, and extensive modifications to the test suite. A large number of tests have been improved for robustness by using more specific widget finders, and tests that would be affected by the new transition have been updated to use the old behavior to ensure they remain valid. New tests have also been added to cover the predictive back functionality and its fallbacks. Overall, the changes are of high quality and well-tested. I have one minor suggestion to improve the clarity of a test name.

}
}, variant: TargetPlatformVariant.all());

testWidgets('predictive back falls back to ZoomPageTransitionBuilder', (
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The test name is misleading. It states that the fallback is ZoomPageTransitionBuilder, but the test implementation correctly checks for a fallback to _FadeForwardsPageTransition. To improve clarity and maintainability, the test name should be updated to reflect the actual behavior being tested.

  testWidgets('predictive back falls back to FadeForwardsPageTransition', (

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good bot, I'll change that.

The test doesn't care about the page transition, but some events seem to
be triggering predictive back when they weren't before.
@justinmc justinmc requested a review from victorsanni August 15, 2025 17:27
Copy link
Contributor

@matanlurey matanlurey left a comment

Choose a reason for hiding this comment

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

LGTM for reland

Copy link
Contributor

@victorsanni victorsanni left a comment

Choose a reason for hiding this comment

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

To fix, run dart format packages/flutter/test/material/page_transitions_theme_test.dart

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 15, 2025
@justinmc
Copy link
Contributor Author

Same exact expected Google test failures as last time. Autosubmitting.

@auto-submit auto-submit bot added this pull request to the merge queue Aug 15, 2025
Merged via the queue into master with commit 2c031ed Aug 15, 2025
156 checks passed
@auto-submit auto-submit bot deleted the revert-173809-revert_d1e2019a947690248a368ee37b5164e668cf6333 branch August 15, 2025 23:22
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 16, 2025
flutter/flutter@52af7a5...0a2906b

2025-08-16 31685655+SalehTZ@users.noreply.github.com Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406)
2025-08-16 engine-flutter-autoroll@skia.org Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901)
2025-08-16 engine-flutter-autoroll@skia.org Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890)
2025-08-16 engine-flutter-autoroll@skia.org Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886)
2025-08-15 30870216+gaaclarke@users.noreply.github.com Blocks exynos9820 chip from vulkan (flutter/flutter#173807)
2025-08-15 41930132+hellohuanlin@users.noreply.github.com Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879)
2025-08-15 bkonyi@google.com Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867)
2025-08-15 engine-flutter-autoroll@skia.org Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877)
2025-08-15 jhy03261997@gmail.com [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935)
2025-08-15 jmccandless@google.com Reland predictive back route transitions by default (flutter/flutter#173860)
2025-08-15 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874)
2025-08-15 lauraywu@google.com Add onHover callback support for TableRowInkWell (flutter/flutter#173373)
2025-08-15 engine-flutter-autoroll@skia.org Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866)
2025-08-15 engine-flutter-autoroll@skia.org Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864)
2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865)
2025-08-15 matanlurey@users.noreply.github.com Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812)

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 louisehsu@google.com,stuartmorgan@google.com 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
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
WillBLogical pushed a commit to WillBLogical/packages that referenced this pull request Aug 20, 2025
…r#9836)

flutter/flutter@52af7a5...0a2906b

2025-08-16 31685655+SalehTZ@users.noreply.github.com Improve `SweepGradient` angle and `TileMode` documentation (flutter/flutter#172406)
2025-08-16 engine-flutter-autoroll@skia.org Roll Skia from 1e148cada9d4 to 16dbd908dcab (1 revision) (flutter/flutter#173901)
2025-08-16 engine-flutter-autoroll@skia.org Roll Skia from 91ad1f21ca61 to 1e148cada9d4 (3 revisions) (flutter/flutter#173890)
2025-08-16 engine-flutter-autoroll@skia.org Roll Dart SDK from 9277d6303da5 to 67ca79475db6 (1 revision) (flutter/flutter#173886)
2025-08-15 30870216+gaaclarke@users.noreply.github.com Blocks exynos9820 chip from vulkan (flutter/flutter#173807)
2025-08-15 41930132+hellohuanlin@users.noreply.github.com Revert "[ios][tools]do not log "bonjour not found" at all (unless verbose)" (flutter/flutter#173879)
2025-08-15 bkonyi@google.com Roll `package:analyzer` forward to `8.1.1` (flutter/flutter#173867)
2025-08-15 engine-flutter-autoroll@skia.org Roll Skia from 2f66be8a593a to 91ad1f21ca61 (3 revisions) (flutter/flutter#173877)
2025-08-15 jhy03261997@gmail.com [a11y] : set isFocused will update isFocusable to true (flutter/flutter#170935)
2025-08-15 jmccandless@google.com Reland predictive back route transitions by default (flutter/flutter#173860)
2025-08-15 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from zWRpLglb48zC1vZLv... to H1kVA85LyQsK8EDp2... (flutter/flutter#173874)
2025-08-15 lauraywu@google.com Add onHover callback support for TableRowInkWell (flutter/flutter#173373)
2025-08-15 engine-flutter-autoroll@skia.org Roll Skia from 5654ac32ede0 to 2f66be8a593a (6 revisions) (flutter/flutter#173866)
2025-08-15 engine-flutter-autoroll@skia.org Roll Dart SDK from cc008dc8e7aa to 9277d6303da5 (2 revisions) (flutter/flutter#173864)
2025-08-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Implements the Android native stretch effect as a fragment shader (Impeller-only). (#169293)" (flutter/flutter#173865)
2025-08-15 matanlurey@users.noreply.github.com Re-add `Linux_android_emu *` tests that had KVM issues, now resolved (flutter/flutter#173812)

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 louisehsu@google.com,stuartmorgan@google.com 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
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos f: material design flutter/packages/flutter/material repository. f: routes Navigator, Router, and related APIs. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants