paparazzi icon indicating copy to clipboard operation
paparazzi copied to clipboard

`WindowInsets.isImeVisible` is temporary true during snapshot test.

Open nvkleban opened this issue 1 year ago • 2 comments

Description I have a compose UI function which hides some of it's content in case if ime is visible. Inside it I have AnimatedVisibility.

AnimatedVisibility(visible = !WindowInsets.isImeVisible) {
        content()
}

Paparazzi.snapshot for screen with this component produces screenshot without content()

For testing purposes:

  • I've added a second call to Paparazzi.snapshot right after the first one - and it produces correct picture with visible content.
  • I've also tried a version of Paparazzi.snapshot with offset without any luck.

What I see from logs inside my composable function:

isImeVisible = true
isImeVisible = true
isImeVisible = false
isImeVisible = false

Maybe first values affects AnimatedVisibility somehow, idk.

Steps to reproduce PaparazziImeReproducer.zip

Expected behavior snapshot produces picture not affected by initial keyboard state

Additional information:

  • Paparazzi Version: 1.3.2
  • OS: Mac OS
  • Compile SDK: 34
  • Gradle Version: 8.4
  • Android Gradle Plugin Version: 8.2.2

nvkleban avatar Feb 14 '24 17:02 nvkleban

@nvkleban mind providing a repro project?

jrodbx avatar Feb 14 '24 22:02 jrodbx

@jrodbx updated description with repro project

nvkleban avatar Feb 15 '24 12:02 nvkleban