cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.28k stars 214 forks source link

How to wait for recomposition #1422

Closed karsie closed 3 weeks ago

karsie commented 4 months ago

Description Releasenotes for 1.3.0 say: Recomposition does not happen unless lifecycle is RESUMED However, when we record previews (in combination with Showkase), only the first composition is snapshotted. This doesn't allow us to show dialogs for example, or components that rely on onTextLayout or onGloballyPositioned. Whatever I tried to keep the state as resumed, it didn't work. Any tips?

Steps to Reproduce I tried adding something like this to our preview functions: LaunchedEffect(true) { launch { delay(1000) }.join() }

Expected behavior

Additional information:

Screenshots If applicable, add screenshots to help explain your problem.

geoff-powell commented 4 months ago

Seems to be related to https://github.com/cashapp/paparazzi/issues/1414