Skip to content

Chore: Nav3 bottom sheets#3001

Open
StylianosGakis wants to merge 14 commits into
feat/expand-navigation-showing-screensfrom
feat/nav3-bottom-sheets
Open

Chore: Nav3 bottom sheets#3001
StylianosGakis wants to merge 14 commits into
feat/expand-navigation-showing-screensfrom
feat/nav3-bottom-sheets

Conversation

@StylianosGakis

Copy link
Copy Markdown
Member

Add BottomSheetSceneStrategy allowing nav keys to be bottom sheet destinations

Make PaymentDetailExplanationContent a nav destination as an example. But I was mostly interested in getting this going to give us the ability to easily decide when we want destinations to be inline (when they need to interact with the outer screen through setting variables, accepting lambdas etc) or if they can just be simple screen-line destinations that are handled by navigation.

We use the same hedvig DS internals approach to hide the material sheet hiding behind it all

Metadata-opt-in SceneStrategy that renders any entry tagged with
bottomSheet() inside a ModalBottomSheet, following the same
NavMetadataKey pattern as NavSuiteSceneDecoratorStrategy. Styling
(containerColor, contentColor, scrimColor, shape, dragHandle) is
injected so navigation-compose stays free of design-system.

NOTE: The test file is in androidUnitTest per the brief, but the
com.android.kotlin.multiplatform.library plugin (AGP 9.1.1) does not
generate a testDebugUnitTest runner task for KMP androidLibrary targets.
The implementation compiles (compileAndroidMain passes); a separate task
would be needed to wire a JVM unit test runner for androidUnitTest in
this module type.
Match HedvigBottomSheet's default contentPadding so migrated sheets keep
their content inset instead of rendering flush to the screen edge.
Hide the ModalBottomSheet (material3) behind the design system so
navigation-compose no longer depends on material3, matching how every
other sheet in the app is wrapped by design-system-internals.

- design-system-api: HedvigOverlaySheetController (suspend hide handle,
  no material3 leak)
- design-system-internals: OverlayBottomSheet + rememberOverlaySheetController
  (presence-driven ModalBottomSheet, styling passed in as plain values)
- design-system-hedvig: HedvigOverlayBottomSheet bakes the Hedvig tokens,
  drag handle and 16dp content padding; DragHandle made internal for reuse
- navigation-compose: BottomSheetSceneStrategy is now a no-arg strategy that
  renders via the design system; material3 dependency dropped
- :app: delete the token-plumbing factory; NavDisplay uses
  BottomSheetSceneStrategy() directly
It's a normal nav destination now so it must be treated as such
@StylianosGakis StylianosGakis requested a review from a team as a code owner June 22, 2026 12:30
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.

1 participant