JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.24k stars 1.11k forks source link

ModalBottomSheet no appearance animation in skiko targets #4990

Open ZacSweers opened 1 week ago

ZacSweers commented 1 week ago

Describe the bug The Material3 ModalBottomSheet enter animation on iOS appears to just blip into existence rather than actually translate the sheet or fade in the scrim.

Android iOS
Screen_recording_20240617_125721.webm https://github.com/JetBrains/compose-multiplatform/assets/1361086/600e99fd-a295-436a-bf60-9dbca4daa571

Affected platforms

Versions

To Reproduce Steps to reproduce the behavior:

  1. Reproducible project: https://github.com/ZacSweers/FieldSpottr/
  2. Specific code for the sheet is here: https://github.com/ZacSweers/FieldSpottr/blob/bf99cfd56422b4d75ba5057713721c8e77cf35ea/src/commonMain/kotlin/dev/zacsweers/fieldspottr/Home.kt#L172
  3. Which in turn uses this library impl: https://github.com/slackhq/circuit/blob/main/circuitx/overlays/src/commonMain/kotlin/com/slack/circuitx/overlays/BottomSheetOverlay.kt

Expected behavior It should animate in smoothly

Screenshots See above

Additional context Add any other context about the problem here.

MatkovIvan commented 1 week ago

iOS reuses animation from common in this place, so it looks more like performance/missing frames issue. @elijah-semyonov could you please take a look?

elijah-semyonov commented 1 week ago

Reproducible on skiko in general:

https://github.com/JetBrains/compose-multiplatform/assets/4167681/f1449ad1-33de-40b3-a681-ac2e782f21e1

It's not an issue with ModalBottomSheet itself, it works fine:

https://github.com/JetBrains/compose-multiplatform/assets/4167681/4f7f6475-6e38-44ed-aff3-2dec9257ce4c