raamcosta / compose-destinations

Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
https://composedestinations.rafaelcosta.xyz
Apache License 2.0
3.14k stars 129 forks source link

Support for material3 bottom sheets #614

Closed cj1098 closed 2 months ago

cj1098 commented 2 months ago

Hello! Is there any work going on to support using material3 bottom sheets? I noticed accompanist hasn't updated to support it and from what I can tell v2 of this library also didn't mention it

raamcosta commented 2 months ago

Hi @cj1098

The bottom sheets used on navigation is the same that official libraries provide (not just accompanist - it was imported to official library too). Material bottom sheets can still be used, just not as a navigation destination.

There is no work to be done here 🙂

cj1098 commented 2 months ago

@raamcosta Thanks for replying! So you're saying if we move to material3's bottom sheets it's not possible to have them be destinations? Previously when we declared our BottomSheetLayout we would say something like: ModalBottomSheetLayout( bottomSheetNavigator = bottomSheetNavigator, ) Where we could pass in a bottomSheetNavigator that was provided via accompanist. In the m3 version it doesn't support a bottomSheetNavigator. I do see that official libraries from androidx do support bottom sheets as navigation. So if we wanted to use m3 and still be able to navigate to bottom sheets we'd need to look to use one of those libraries?

raamcosta commented 2 months ago

Im saying those are two different kinds of bottom sheets. You can use both material and navigation bottom sheets in the same app. Material ones cannot be destinations, they’re something you show or hide as part of another screen. Navigation ones are something else, they’re not material 2 or 3, they are their own thing.

cj1098 commented 2 months ago

Gotcha. Thanks for the clarification!