Chore: Nav3 bottom sheets#3001
Open
StylianosGakis wants to merge 14 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add BottomSheetSceneStrategy allowing nav keys to be bottom sheet destinations
Make
PaymentDetailExplanationContenta 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