Hello. Can we not hardcode `BottomSheetMaxWidth = ...
# compose
w
Hello. Can we not hardcode
BottomSheetMaxWidth = 640.dp
in future releases of material3
BottomSheetScaffold
and just pass it as a default value/preference?
solved 1
🎉 1
i
That's a set value in the Material3 specs, not something that allows customization: https://m3.material.io/components/bottom-sheets/specs
👍 1
w
I already read the docs. So are you suggesting me to reimplement the whole thing if I want the bottom sheet to be full width?
i
The Material Components are only going to follow the Material Specs, so if you don't want the Material Spec, you would need to not use the Material Components, that is correct
w
I thought Compose was about building our own components on top of existing ones (at least some basic ones) to get the desired results (like basic buttons, input texts etc).
i
Bottom sheet is indeed built on
AnchoredDraggable
, the lower level API you can build your own components on top of
w
Ok I'll look into it thanks!, It's all internal stuff...
s
Yes, copy the internal stuff into your project if you need to deviate from the material design specs.
w
Now that's very composable! @Stylianos Gakis
s
Yes, the foundation package is the one which gives you the core components to build whatever you want in. The material package is not meant to be that. It's an opinionated implementation of those core components using a very specific design system called material design.
☝️ 6
🎯 1
👎 1
I think that is exactly the kind of UI Material doesn't want you to write for large screens. Glad you got it working 👍
s
What we get from UX Designers. And they want very specific things
Yes, and if those things aren't the very exact things that the material design specs mention, then it makes total sense that you need a custom component.
i
Let's go back 2 years, back when there wasn't any max width at all. All of a sudden, the guidelines set a max width and that max width was encoded in every Material component. Why did this happen? Was it quantitative results from A/B tests from the Google Play Store across different max widths (noting the sheer volume of bottom sheets shown for every in app purchase for every app across all of Google Play)? Maybe it was qualitative results from UX studies done by the System UI team as they prepared for the Pixel Tablet and Pixel Fold and were concerned with how important surfaces like the share sheet appear on larger devices? Or perhaps it was a holistic look at the design space for larger screen devices in their entirety in cooperation with apps like Google Maps (which you'll note doesn't use the same bottom sheets it does on phones on larger devices) that brought about whole new components like side sheets, the recommendation for the largest window sizes: https://m3.material.io/components/bottom-sheets/guidelines#8be001d3-cfe2-47bd-ac2c-62d1c5c814ff No, it has to just be an arbitrary maximum that designers shouldn't take into consideration at all when designing for Android
👍 1
If you want to write something that specifically doesn't follow the design guidelines, you absolutely can. But if there's a maximum width without an override, that is there for a reason and I'd think that the best working environment would mean that this kind of disconnect which is causing you to do more work would start a conversation with your design team to understand if the deviation was intentional, why the deviation exists, and maybe whether you should be doing your own A/B test or UX research with your users to validate that the change is actually a net positive in your specific case
It looks like this might be the closest feature request that exists for side sheets: https://issuetracker.google.com/issues/185097403
f
w
Ah, finally. Thanks for letting us know @Fabio Grumiro. You have no idea how much TROUBLE this one param saved me. After all, Software has "*Soft*" in it for a reason. Programmers tend to forget that. Thanks to the Material team and the participants for acknowledging this issue. [SOLVED] in material3 1.2.0-alpha09.
a
Now we have to start this entire discussion for
StandardBottomSheet
😔
😅 1