Jetpack Compose version: 1.1.1 (and also 1.3.0-alpha01) Jetpack Compose component used: ModalBottomSheetLayout Android Studio Build: Android Studio Chipmunk | 2021.2.1 Patch 1 Build #AI-212.5712.43.2112.8609683, built on May 18, 2022 Runtime version: 11.0.12+0-b1504.28-7817840 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 12 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: org.jetbrains.kotlin (212-1.7.10-release-333-AS5457.46), com.jetbrains.kmm (0.3.3(212-1.7.0-RC-release-217-IJ)-104)
Kotlin version: 1.6.10
Steps to Reproduce or Code Sample to Reproduce: 1. Create a ModalBottomSheetLayout 2. There is currently no API to control the bottom sheet's max width. The exposed Modifier parameter only controls the englobing BoxWithConstraints' Modifier, but we have no way to control the inner Surface's Modifier.
As a result, bottom sheets created with ModalBottomSheetLayout are full-width on tablets. FYI, this prevents developers from implementing bottom sheets that don't take up the full width on tablets, as mentioned in the Material guidelines: https://material.io/components/sheets-bottom#expanding-bottom-sheet (section "Tablet and desktop").
Expected behavior: New parameter in ModalBottomSheetLayout's constructor "maxWidth : Int" (or even "sheetModifier: Modifier" to have more control over it).
Description
Jetpack Compose component used: ModalBottomSheetLayout
Android Studio Build:
Android Studio Chipmunk | 2021.2.1 Patch 1
Build #AI-212.5712.43.2112.8609683, built on May 18, 2022
Runtime version: 11.0.12+0-b1504.28-7817840 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 12
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: org.jetbrains.kotlin (212-1.7.10-release-333-AS5457.46), com.jetbrains.kmm (0.3.3(212-1.7.0-RC-release-217-IJ)-104)
Kotlin version: 1.6.10
Steps to Reproduce or Code Sample to Reproduce:
1. Create a ModalBottomSheetLayout
2. There is currently no API to control the bottom sheet's max width. The exposed Modifier parameter only controls the englobing BoxWithConstraints' Modifier, but we have no way to control the inner Surface's Modifier.
As a result, bottom sheets created with ModalBottomSheetLayout are full-width on tablets.
FYI, this prevents developers from implementing bottom sheets that don't take up the full width on tablets, as mentioned in the Material guidelines:
Expected behavior: New parameter in ModalBottomSheetLayout's constructor "maxWidth : Int" (or even "sheetModifier: Modifier" to have more control over it).
Stack trace (if applicable): not applicable
Thank you.