-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
enhancementNew feature or requestNew feature or requesttriage meIssue that needs to be triagedIssue that needs to be triaged
Description
Is there an existing issue for this?
- I have searched the existing issues
Is this a feature request for one of the samples?
- Yes, this is a specific request related to this samples repo.
Sample app
JetNews
Describe the problem
Feature Request
I’d like to propose migrating the current navigation-compose based setup to
Jetpack Navigation 3 (Nav3), starting with a small and well-scoped flow.
Motivation
Navigation 3 introduces:
- State-driven navigation
- Type-safe destinations (no string routes)
- Better testability and UI/state separation
- Alignment with modern Compose & MVI-style architectures
Migrating would:
- Reduce reliance on
NavController - Make navigation logic easier to reason about and test
- Future-proof the codebase as Navigation 3 matures
Additional Notes
I’m happy to:
- Start with a draft PR
- Adjust scope based on maintainer feedback
- Drop the change if Nav3 adoption isn’t desired at this time
Please let me know if this direction aligns with the project roadmap.
Describe the solution
Proposed Solution
Introduce Jetpack Navigation 3 in a small, isolated scope as a
proof-of-concept, without removing or breaking the existing
navigation-compose setup.
The proposal is to:
- Define type-safe destinations using a
sealed interface(or similar) - Manage navigation using a state-driven back stack instead of
NavController - Keep ViewModels navigation-agnostic
- Integrate Nav3 at the UI layer only
- Preserve the current navigation implementation for all unaffected screens
Incremental Plan
- Select a single navigation flow .
- Introduce a Nav3-based navigator for this flow only
- Keep the existing
NavHostfor the rest of the app - Validate behavior parity (back handling, deep links if applicable)
- Document the pattern for potential future adoption
This approach keeps the change:
- Low risk
- Easy to review
- Reversible if needed
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttriage meIssue that needs to be triagedIssue that needs to be triaged