packages icon indicating copy to clipboard operation
packages copied to clipboard

[go_router] Add support for preloading branches of StatefulShellRoute (revised solution)

Open tolo opened this issue 1 year ago • 10 comments

Adds support for preloading branches in a StatefulShellRoute. This functionality was initially part of an early implementation of flutter/packages#2650, however it was decided to implement this in a separate PR. The current implementation is a rewrite of the original implementation to better fit the final version of StatefulShellRoute (and go_router in general).

NOTE: this is a revised version of the initial solution (see flutter/packages#4251), containing a substantially simpler implementation made possible thanks to recent refactoring in go_router.

This fixes issue flutter/flutter#127804.

Pre-launch Checklist

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

tolo avatar Apr 05 '24 16:04 tolo

I know I have been slacking off at this pr. I am sorry about this. My schedule is quite tight after I came back from vacation. This is still under my radar. I will try find time review this pr within 2 weeks

chunhtai avatar Apr 29 '24 22:04 chunhtai

I know I have been slacking off at this pr. I am sorry about this. My schedule is quite tight after I came back from vacation. This is still under my radar. I will try find time review this pr within 2 weeks

No worries @chunhtai, I completely understand, have had far too much on my plate myself the last year 😅

tolo avatar Apr 30 '24 12:04 tolo

Any updates on this?

unacorbatanegra avatar May 30 '24 14:05 unacorbatanegra

What's the status here ? It seems like you said that you have a test locally that's failing but it's unrelated to the changes here ?

cedvdb avatar Jul 03 '24 12:07 cedvdb

What's the status here ? It seems like you said that you have a test locally that's failing but it's unrelated to the changes here ?

Yes, @chunhtai, have you had a chance to too look at my comment above (https://github.com/flutter/packages/pull/6467#discussion_r1644576099)?

The issue is however only with testing if obsolete branch navigators are removed (which is done dynamic RoutingConfig), so possibly this could be moved to a separate issue/PR. And another issue should probably be opened for fixing the support for dynamic RoutingConfig for (stateful) shell routes. What do you think @chunhtai?

tolo avatar Jul 10 '24 06:07 tolo

will take a look this week

chunhtai avatar Jul 11 '24 21:07 chunhtai

Any status update? Would love to have this feature in my project.

Shunt22 avatar Aug 02 '24 18:08 Shunt22

@chunhtai, as mentioned above, I've included the fix for cleaning obsolete branches. But I'm thinking it might be better to postpone that fix until the issues with duplicate GlobalKeys is resolved.

tolo avatar Aug 19 '24 19:08 tolo

@chunhtai can this PR get some love ? (feedback)

cedvdb avatar Sep 16 '24 21:09 cedvdb

FYI, for those interested in StatefulShellRoute evolution, there is a related (draft) PR in the works: flutter/packages#7622. There are some ideas around quality-of-life improvements around StatefulShellRoute in there, so have a look if you're interested.

tolo avatar Sep 17 '24 19:09 tolo

Hi! Sorry, when will this be live?

Shunt22 avatar Oct 24 '24 11:10 Shunt22

Hi @tolo can you rebase and then we can merge?

chunhtai avatar Nov 07 '24 22:11 chunhtai

@chunhtai Can autosubmit be added ? as conflicts were already resolved 2 weeks ago

cedvdb avatar Nov 07 '24 22:11 cedvdb

auto label is removed for flutter/packages/6467, due to - The status or check suite Linux repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

auto-submit[bot] avatar Nov 07 '24 23:11 auto-submit[bot]

Looks like there is some outdated excerpt https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8731887329080081345/+/u/Run_package_tests/README_snippet_validation/stdout?format=raw

I can't fix it through gihub ui. @tolo can you try to fix it?

chunhtai avatar Nov 07 '24 23:11 chunhtai