Skip to content
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

[go_router] Fixed TabView swiping in custom stateful shell route example #7583

Merged
merged 9 commits into from
Sep 24, 2024

Conversation

tolo
Copy link
Contributor

@tolo tolo commented Sep 5, 2024

Updated custom_stateful_shell_route.dart example to better support swiping in TabView. Also added code to demonstrate use of PageView instead of TabView. Note that to be fully effective from a usability perspective, the PR #6467 (branch preloading) need also be merged.

This PR addresses:

Pre-launch Checklist

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

@tolo tolo requested a review from chunhtai as a code owner September 5, 2024 06:30
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. 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.

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.

Code LGTM, Can you add a test to make sure the fix is not reverted in the future?

tolo added 2 commits September 5, 2024 22:32
… swipe of TabView (updating tab index of TabController) correctly navigates to the appropriate destination.
@tolo tolo requested a review from chunhtai September 9, 2024 10:52
@tolo
Copy link
Contributor Author

tolo commented Sep 9, 2024

I see some confusion in issues around go_router related to using CupertinoTabScaffold, so I thought I'd include that as well in the sample, since it's somewhat related. Perhaps it can contributed to remove some confusion. Let me know what you think.

@tolo
Copy link
Contributor Author

tolo commented Sep 10, 2024

Pushed an additional update with some cleanup & clarifications

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 September 12, 2024 21:48
@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 19, 2024
Copy link
Contributor

auto-submit bot commented Sep 19, 2024

auto label is removed for flutter/packages/7583, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 19, 2024
@tolo
Copy link
Contributor Author

tolo commented Sep 24, 2024

@chunhtai, which Discord channel do I need to be in (don't see any flutter-hackers), or might it just be that I haven't been logged in for a while?

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

@hannah-hyj hannah-hyj merged commit 47795ab into flutter:main Sep 24, 2024
76 checks passed
@hannah-hyj
Copy link
Member

Hi @tolo! Thank you for contributing!

FYI: Flutter-hackers the bot mentioned is not a discord channels, it's a Github group. See the contributor access wiki page for details.

@tolo
Copy link
Contributor Author

tolo commented Sep 25, 2024

Hi @tolo! Thank you for contributing!

FYI: Flutter-hackers the bot mentioned is not a discord channels, it's a Github group. See the contributor access wiki page for details.

Ah, my bad, thanks for the clarification @Hangyujin 😄

engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 25, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 25, 2024
flutter/packages@4926c0f...7da2374

2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701)
2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688)
2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example  (flutter/packages#7583)

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 flutter-ecosystem@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
flutter/packages@4926c0f...7da2374

2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701)
2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688)
2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example  (flutter/packages#7583)

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 flutter-ecosystem@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 26, 2024
flutter/packages@4926c0f...7da2374

2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701)
2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688)
2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example  (flutter/packages#7583)

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 flutter-ecosystem@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
flutter/packages@4926c0f...7da2374

2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701)
2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688)
2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example  (flutter/packages#7583)

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 flutter-ecosystem@google.com 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
thejitenpatel pushed a commit to thejitenpatel/flutter that referenced this pull request Sep 27, 2024
flutter/packages@4926c0f...7da2374

2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701)
2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688)
2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example  (flutter/packages#7583)

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 flutter-ecosystem@google.com 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants