Skip to content

✨ [AN] Migrate to Navigation 3#50

Open
MatuskaDev wants to merge 6 commits into
fix/ios-compose-lagsfrom
feature/an/navigation3
Open

✨ [AN] Migrate to Navigation 3#50
MatuskaDev wants to merge 6 commits into
fix/ios-compose-lagsfrom
feature/an/navigation3

Conversation

@MatuskaDev

Copy link
Copy Markdown
Contributor

📝 Description

  • Migrate the Android project to Navigation 3 & Material 3 exclusively
  • Add support for predictive back
  • Remove obsolete & unused & redundant dependencies

@coderabbitai

coderabbitai Bot commented Apr 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 110b6cca-193d-41a2-afe2-3462863112cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/an/navigation3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the application's navigation system from androidx.navigation.compose to androidx.navigation3, introducing a Navigator wrapper for backstack management and updating the UI to use Material3 components and custom transitions. Feedback identifies a potential memory leak in the Navigator's static overrides, redundant allocations in the Root composable, and missing intent flags for non-Activity contexts. Additionally, improvements are suggested for backstack safety in the popBackTo method and updating UI signatures to properly support navigation callbacks.

Comment thread android/shared/src/main/kotlin/kmp/android/shared/navigation/Navigator.kt Outdated
Comment thread android/app/src/main/kotlin/kmp/android/ui/Root.kt Outdated
Comment thread android/app/src/main/kotlin/kmp/android/ui/Root.kt Outdated
Comment thread android/shared/src/main/kotlin/kmp/android/shared/navigation/IntentNavigation.kt Outdated
Comment thread android/shared/src/main/kotlin/kmp/android/shared/navigation/Navigator.kt Outdated
import androidx.navigation3.runtime.NavKey
import kotlinx.serialization.Serializable

sealed interface SampleFeatureNavKey : NavKey

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this sealed interface for?

Comment thread android/shared/src/main/kotlin/kmp/android/shared/navigation/IntentNavigation.kt Outdated
Comment thread android/shared/src/main/kotlin/kmp/android/shared/navigation/Navigator.kt Outdated
@MatuskaDev MatuskaDev force-pushed the feature/an/navigation3 branch from 8721853 to dd9d509 Compare April 16, 2026 08:13
Comment on lines +169 to +172
internal fun create(
backStack: NavBackStack<NavKey>,
entryProviderBuilder: EntryProviderScope<NavKey>.(Navigator) -> Unit,
): Navigator = Navigator(backStack, entryProviderBuilder)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the static create function needed, if it has the same signature as the default constructor that it calls? Maybe you can remove it and make the constructor public 🤔

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