You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using compose-destinations 2.1.0-beta11 and I noticed a slight delay when a bottom sheet is opened.
This delayed animation only happens when I pass a customised sheet state to my BottomSheetNavigator instead of doing rememberBottomSheetNavigator(), like so:
After digging a bit, I noticed that the ModalBottomSheetDefaults.AnimationSpec from androidx.compose.material (which defaults the animationSpec of rememberModalBottomSheetState()) was recently changed from a SpringSpec() to a tween() animation, leading to this delay. For more context, this change was made to resolve this issue: https://issuetracker.google.com/issues/285847707
As a temporary solution, I just pass a SpringSpec() to the animationSpec parameter of the rememberModalBottomSheetState() constructor which removes this delay, but I was wondering if that's something you would be able to look into because I think this problem might happen in future releases.
I'm not sure why this is happening, I made 2 sample projects that respectively use androidx.compose.material3:material3:1.3.0-rc01 for one and androidx.compose.material:material:1.7.0-rc01 for the other (which both use the newly changed tween()animationSpec in their bottom sheet implementation) to see if that delay exists but none of them have the issue.
You can reproduce this delayed behaviour by simply adding a tween()animationSpec in the PlaygroundScaffold.kt file when declaring the bottom sheet navigator.
The text was updated successfully, but these errors were encountered:
Hi! 👋
I'm currently using compose-destinations 2.1.0-beta11 and I noticed a slight delay when a bottom sheet is opened.
This delayed animation only happens when I pass a customised sheet state to my
BottomSheetNavigator
instead of doingrememberBottomSheetNavigator()
, like so:After digging a bit, I noticed that the
ModalBottomSheetDefaults.AnimationSpec
fromandroidx.compose.material
(which defaults theanimationSpec
ofrememberModalBottomSheetState()
) was recently changed from aSpringSpec()
to atween()
animation, leading to this delay. For more context, this change was made to resolve this issue: https://issuetracker.google.com/issues/285847707As a temporary solution, I just pass a
SpringSpec()
to theanimationSpec
parameter of therememberModalBottomSheetState()
constructor which removes this delay, but I was wondering if that's something you would be able to look into because I think this problem might happen in future releases.I'm not sure why this is happening, I made 2 sample projects that respectively use
androidx.compose.material3:material3:1.3.0-rc01
for one andandroidx.compose.material:material:1.7.0-rc01
for the other (which both use the newly changedtween()
animationSpec
in their bottom sheet implementation) to see if that delay exists but none of them have the issue.You can reproduce this delayed behaviour by simply adding a
tween()
animationSpec
in thePlaygroundScaffold.kt
file when declaring the bottom sheet navigator.The text was updated successfully, but these errors were encountered: