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

Navigation/MD pages: pop all but first on select #473

Merged
merged 1 commit into from Jan 9, 2023

Conversation

d-loose
Copy link
Member

@d-loose d-loose commented Jan 9, 2023

Clears the navigator stack of the right pane in YaruLandScapeLayout and YaruNavigationPage when (re-)selecting an entry in the left pane.

See https://github.com/ubuntu-flutter-community/software/issues/254

Edit: This requires us to use the navigator provided by the respective Yaru page, rather than nesting another one below.

Pull request checklist

  • This PR does not introduce visual changes, or
    • I ran flutter test --update-goldens and committed the changes if there were any, or
    • I added before/after/light/dark screenshots if the visual changes I made were not covered by golden tests.
      Before After
      Light
      Dark

@Feichtmeier
Copy link
Member

Thanks @d-loose !

The the yaru widgets example does not have a nested navigation I tried your fork and branch in the software app and it does not work for me after clean, upgrade and get

Edit: This requires us to use the navigator provided by the respective Yaru page, rather than nesting another one below.

Ah! So we need a second change in for example software?

@d-loose
Copy link
Member Author

d-loose commented Jan 9, 2023

The the yaru widgets example does not have a nested navigation

I'll add an example page and a test.

I tried your fork and branch in the software app and it does not work for me after clean, upgrade and get

Edit: This requires us to use the navigator provided by the respective Yaru page, rather than nesting another one below.

Ah! So we need a second change in for example software?

Yes - with this approach we only have access to the navigator provided by the Yaru page itself. But for the software store that's not really a problem, since all the navigators there only contain a single page, so the required changes are minimal (I'm not even sure why they're there, probably from a time when the yaru pages looked different :D)

@Feichtmeier
Copy link
Member

@d-loose ok, thanks !

@Feichtmeier Feichtmeier merged commit bace561 into ubuntu:main Jan 9, 2023
@d-loose d-loose deleted the pop-on-selected branch January 9, 2023 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants