Skip to content

Fix nav3 metadata arguments#2313

Merged
arnaudgiuliani merged 1 commit into4.2.0from
fix_nav3_metadata
Nov 26, 2025
Merged

Fix nav3 metadata arguments#2313
arnaudgiuliani merged 1 commit into4.2.0from
fix_nav3_metadata

Conversation

@arnaudgiuliani
Copy link
Copy Markdown
Member

@arnaudgiuliani arnaudgiuliani commented Nov 21, 2025

Allow metadata parameter passing to the entry point (like animations and others).
Upgrade Nav3 to stable 1.0.0

Updated in navigation<T>(metadata = <>){ /* Composable */ }

// adding animation
navigation<ConversationDetail>(
    metadata = NavDisplay.transitionSpec {
        // Slide new content up, keeping the old content in place underneath
        slideInVertically(
            initialOffsetY = { it },
            animationSpec = tween(1000)
        ) togetherWith ExitTransition.KeepUntilTransitionsFinished
    } + NavDisplay.popTransitionSpec {
        // Slide old content down, revealing the new content in place underneath
        EnterTransition.None togetherWith
                slideOutVertically(
                    targetOffsetY = { it },
                    animationSpec = tween(1000)
                )
    } + NavDisplay.predictivePopTransitionSpec {
        // Slide old content down, revealing the new content in place underneath
        EnterTransition.None togetherWith
                slideOutVertically(
                    targetOffsetY = { it },
                    animationSpec = tween(1000)
                )
    }
) { key ->
    ConversationDetailScreen(key) {
        get<Navigator>().goTo(Profile)
    }
}

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for passing metadata to navigation entries in the Koin Navigation 3 integration and upgrades the androidx.navigation3 dependency from beta (1.0.0-beta01) to stable (1.0.0). The metadata parameter enables users to configure navigation animations and other navigation-specific settings (like NavDisplay.transitionSpec) directly in the navigation entry declarations.

  • Added optional metadata parameter to both ScopeDSL.navigation() and Module.navigation() functions
  • Upgraded androidx.navigation3 dependency to stable version 1.0.0
  • Updated KDoc documentation to describe the new metadata parameter

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
projects/gradle/libs.versions.toml Upgraded androidx-navigation3 from 1.0.0-beta01 to stable 1.0.0
projects/compose/koin-compose-navigation3/src/commonMain/kotlin/org/koin/dsl/navigation3/ModuleExt.kt Added metadata parameter to both navigation function overloads with proper pass-through to entry() calls and updated documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@arnaudgiuliani arnaudgiuliani merged commit 36421df into 4.2.0 Nov 26, 2025
9 of 10 checks passed
@arnaudgiuliani arnaudgiuliani deleted the fix_nav3_metadata branch December 2, 2025 15:33
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