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

Set up top level navigation #240

Merged
merged 5 commits into from
Jan 21, 2025
Merged

Set up top level navigation #240

merged 5 commits into from
Jan 21, 2025

Conversation

zsmb13
Copy link
Contributor

@zsmb13 zsmb13 commented Jan 18, 2025

Fixes #236

This PR updates the navigation setup of the app the following way:

  • Most screens are kept at the top level as before, within the root nav controller
  • The onboarding flow "start screens" are in their own little nested nav graph
    • For now, there's a fake Flow that produces a random true/false value for whether the onboarding has been completed, we'll hook this up to actual preference storage later. This means the onboarding flow is skipped 50% of the time.
  • The new HomeScreen component serves the screen with 4-button bottom navigation between its destinations. This can't be a nested nav graph as there's also common UI that persists through the screens (the bottom navigation bar), so it's a destination that contains a second NavHost that navigates within the HomeScreen destinations.
    • The Compose version bumps are needed for this nesting to work, as the new versions include this bugfix

@zsmb13 zsmb13 force-pushed the top-level-nav branch 5 times, most recently from 6a071b2 to 56937c2 Compare January 18, 2025 21:54
@zsmb13 zsmb13 changed the title WIP set up top level navigation Set up top level navigation Jan 18, 2025
@zsmb13 zsmb13 marked this pull request as ready for review January 18, 2025 22:01
@zsmb13 zsmb13 requested a review from kropp January 18, 2025 22:01
gradle/libs.versions.toml Outdated Show resolved Hide resolved
zsmb13 and others added 4 commits January 20, 2025 23:01
Introduced new "filled" icon variants for navigation buttons to improve UI feedback when a destination is selected. Updated `MainNavDestination` and related components to support the new filled icons dynamically. Adjusted previews and logic to handle the selected state appropriately.
@zsmb13 zsmb13 requested a review from kropp January 20, 2025 22:19
@zsmb13 zsmb13 merged commit 3dbdf7c into kotlinconf-2025 Jan 21, 2025
5 checks passed
@zsmb13 zsmb13 deleted the top-level-nav branch January 21, 2025 22:29
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.

2 participants