Skip to content

miuix-nav draft#346

Open
YuKongA wants to merge 118 commits into
mainfrom
feature/miuix-nav-v1
Open

miuix-nav draft#346
YuKongA wants to merge 118 commits into
mainfrom
feature/miuix-nav-v1

Conversation

@YuKongA

@YuKongA YuKongA commented Jun 10, 2026

Copy link
Copy Markdown
Member

This pull request introduces documentation and code changes to add support for the new miuix-nav navigation runtime, replacing the previous dependency on androidx.navigation3 in the example app. It includes comprehensive English and Chinese documentation, updates navigation-related imports and dependencies, and integrates miuix-nav into the app's navigation system.

Documentation additions:

  • New documentation for miuix-nav:
    • Added a detailed English guide at docs/guide/miuix-nav.md explaining setup, usage, transitions, gestures, save/restore, and extension boundaries.
    • Added a complete Chinese translation at docs/zh_CN/guide/miuix-nav.md with equivalent content.
    • Updated the navigation menus in both English and Chinese VitePress config files to include the new miuix-nav guide. [1] [2]

Example app migration to miuix-nav:

  • Dependency changes:

    • Removed androidx.navigation3 and miuixNavigation3Ui dependencies from example/shared/build.gradle.kts and added miuixNav.
  • Codebase refactor to use miuix-nav:

    • Replaced all references to navigation3.Route with navigation.Route in the app code.
    • Removed all imports and usage of androidx.navigation3 APIs in AppContent.kt and replaced them with miuix-nav equivalents, including transitions, effects, and back stack management. [1] [2]

These changes ensure the app and documentation now use and explain the new miuix-nav navigation system, providing a more flexible and modern navigation experience.

YuKongA added 30 commits June 9, 2026 15:44
Adds NavTransitions object with Cupertino, MiuixDefault, AndroidCrossActivity,
Scale, Fade, SharedAxisX, Modal, and None — all pure functions of relativeDepth,
deferred-read inside navGraphicsTransition blocks, zero recomposition.
Copilot AI review requested due to automatic review settings June 11, 2026 08:28

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings June 12, 2026 06:18

This comment was marked as outdated.

YuKongA added 2 commits June 12, 2026 15:39
Saveable state is the one subsystem keyed by contentKey.toString()
rather than by the key object, so distinct-by-equals keys with an equal
toString (same-named data classes in different packages, Int 1 vs
String "1" from factories) passed the equality-based duplicate guard
and collapsed into one SaveableStateProvider slot: co-composed
colliders crashed with "Key was used multiple times", separated ones
silently bled or erased each other's rememberSaveable state.

Extend the reconcile-time guard to require saveable-key uniqueness
across the new stack and entries still animating out, sharing one
navSaveableKey definition with the holder so validation and the slot
key cannot drift. Pin the contract with collision, mixed-hierarchy
save/restore, and swipe-vs-scroll arbitration tests, and document the
contentKey toString requirements in the entry DSL and the guide
(including the preset table's misattributed corner clip / dim, which
belong to NavDisplayEffects).
Drop Cupertino, Scale, Fade, and SharedAxisX from NavTransitions:
Cupertino had become line-for-line identical to MiuixDefault, and the
three generic looks had zero usage anywhere while being a few lines
each on the public navGraphicsTransition builder. The library ships
only its own navigation feel; Modal stays as the sole opaqueDepth = 2f
structure backing modal takeover, and None as the named no-animation
primitive.

MiuixDefault becomes the default transition of all NavDisplay
overloads — visually identical to the previous Cupertino default. The
guide's preset table shrinks accordingly and the custom-transitions
section gains a cross-fade recipe showing how to build the removed
looks externally.
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