Skip to content

Conversation

@huanghui1998hhh
Copy link
Contributor

@huanghui1998hhh huanghui1998hhh commented Jun 17, 2025

ShellRoute currently does not trigger observers defined in GoRouter, which is unexpected behavior.

Fixes flutter/flutter#112196

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@justinmc
Copy link
Contributor

@huanghui1998hhh FYI you have some conflicts on this PR.

@justinmc
Copy link
Contributor

@huanghui1998hhh Some merge conflicts and a failure still on here FYI.

@huanghui1998hhh huanghui1998hhh marked this pull request as draft August 20, 2025 02:21
@alexobviously
Copy link

Just wondering what the status of this is? We have some issues caused by the bug this PR fixes. Happy to help if there's anything I could do to help this get merged.

@Piinks
Copy link
Contributor

Piinks commented Sep 26, 2025

Since this is a draft we have not been actively reviewing it, @huanghui1998hhh when you are ready for another review, you can mark the PR 'ready for review'. :)

@huanghui1998hhh huanghui1998hhh marked this pull request as ready for review September 30, 2025 04:27
@huanghui1998hhh
Copy link
Contributor Author

Need more advice on the implementation details. Especially in this case.

This feature is highly requested. We need to properly track page navigation within ShellRoute.

2. rename `mergeObservers` to `notifyRootObserver`
3. set `notifyRootObserver`'s default value to `true`
@chunhtai
Copy link
Contributor

Can you add a breaking change doc for this?

  1. make a copy of flutter.dev/go/go-router-v16-breaking-changes and update the content
  2. share the doc to everyone with view permission, and add a golink entry in here https://github.com/flutter/website/blob/e86734e470b7b9bd588c7ada19647d4c9f4cdca6/firebase.json#L471
  3. add the link to readme https://github.com/flutter/packages/blob/main/packages/go_router/README.md#migration-guides

parlough pushed a commit to flutter/website that referenced this pull request Oct 22, 2025
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai requested a review from hannah-hyj October 24, 2025 15:54
Copy link
Member

@hannah-hyj hannah-hyj left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 4, 2025
@auto-submit auto-submit bot merged commit 8176ffd into flutter:main Nov 5, 2025
80 checks passed
@github-actions github-actions bot added the triage-framework Should be looked at in framework triage label Nov 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 5, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Nov 6, 2025
flutter/packages@3d926aa...f13bad3

2025-11-06 [email protected] Add Linux CODEOWNERS
(flutter/packages#10235)
2025-11-06 [email protected] [ci] Add missing deps
(flutter/packages#10366)
2025-11-05 [email protected] [go_router]
ShellRoute will merge GoRouter's observers (flutter/packages#9436)
2025-11-05 [email protected] [pigeon] Update analyzer version
(flutter/packages#10352)
2025-11-04 [email protected] [tool] Remove use of FETCH_HEAD
(flutter/packages#10357)
2025-11-04 [email protected] Roll Flutter from
027f2e4 to e5d5c01 (73 revisions) (flutter/packages#10362)
2025-11-04 8490712[email protected]
[camera_platform_interface] Adds support for video stabilization to
camera_platform_interface (flutter/packages#10337)
2025-11-04 [email protected] [google_maps_flutter] Raise
`MapUsedAfterWidgetDisposedError` when map controller used after map
disposed (flutter/packages#9242)
2025-11-04 [email protected] [pigeon] Replace containsKey with
contains in Kotlin generator (flutter/packages#10274)
2025-11-04 [email protected] [video_player]
Remove `package` in example `AndroidManifest.xml` file
(flutter/packages#10245)
2025-11-04 [email protected] [flutter_svg] Fixes typo of
`allowDrawingOutsideViewBox` in doc comments. (flutter/packages#10256)
2025-11-04 [email protected] [in_app_purchase] Remove use of
Pigeon's Dart test generator (flutter/packages#10328)

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-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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
IvoneDjaja pushed a commit to IvoneDjaja/flutter that referenced this pull request Nov 22, 2025
flutter/packages@3d926aa...f13bad3

2025-11-06 [email protected] Add Linux CODEOWNERS
(flutter/packages#10235)
2025-11-06 [email protected] [ci] Add missing deps
(flutter/packages#10366)
2025-11-05 [email protected] [go_router]
ShellRoute will merge GoRouter's observers (flutter/packages#9436)
2025-11-05 [email protected] [pigeon] Update analyzer version
(flutter/packages#10352)
2025-11-04 [email protected] [tool] Remove use of FETCH_HEAD
(flutter/packages#10357)
2025-11-04 [email protected] Roll Flutter from
027f2e4 to e5d5c01 (73 revisions) (flutter/packages#10362)
2025-11-04 8490712[email protected]
[camera_platform_interface] Adds support for video stabilization to
camera_platform_interface (flutter/packages#10337)
2025-11-04 [email protected] [google_maps_flutter] Raise
`MapUsedAfterWidgetDisposedError` when map controller used after map
disposed (flutter/packages#9242)
2025-11-04 [email protected] [pigeon] Replace containsKey with
contains in Kotlin generator (flutter/packages#10274)
2025-11-04 [email protected] [video_player]
Remove `package` in example `AndroidManifest.xml` file
(flutter/packages#10245)
2025-11-04 [email protected] [flutter_svg] Fixes typo of
`allowDrawingOutsideViewBox` in doc comments. (flutter/packages#10256)
2025-11-04 [email protected] [in_app_purchase] Remove use of
Pigeon's Dart test generator (flutter/packages#10328)

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-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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
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 p: go_router triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[go_router] ShellRoutes seem to cause NavigatorObserver to not fire (5.0.1)

6 participants