Popup Content Missing in Paparazzi Rendered Snapshots for Composable Functions
Description When attempting to record a snapshot using Paparazzi for a composable function with a Popup, the content of the Popup disappears in the recorded snapshot.
Steps to Reproduce
- Create a composable function that includes a Popup to display information. Sample Code:
@Composable
fun TestPopup() {
MaterialTheme {
Column(modifier = Modifier.fillMaxSize()) {
Text(text = "Sample text")
Popup(alignment = Alignment.BottomCenter) {
Text(
text = "Hello Snapshot!",
modifier = Modifier
.fillMaxWidth()
.heightIn(min = 60.dp),
textAlign = TextAlign.Center,
color = Color.Black
)
}
}
}
}
- Attempt to record a snapshot using Paparazzi.
Expected behavior The recorded snapshot should accurately capture the content of the Popup along with the rest of the composable function.
Actual behavior In the recorded snapshot, the Popup is drawn, but the content within it is missing.
Additional information:
- Paparazzi Version: 1.3.1
- OS: Mac - Sonoma 14.2.1
- Compile SDK: 34
- Gradle Version:
- Android Gradle Plugin Version:
Screenshots
Preview Screenshot:
Recorded Snapshot:
I have this issue too, But in my case it cannot render Dialog Composable.
Hi @geoff-powell, have you made any progress on it? Thanks
Yep, I have a branch with some code that solves this issue. Basically debugged AS Layout Lib and noticed that LL fires multiple render calls to get render the UI. The tracks if the recomposer has pending compositions, and will call a subsequent render per each frame that is rendered.
Still debugging if that is the best solution.
@geoff-powell Any updates? I'm also having this issue.
Yes, I have a PR here that solves this issue. Just needs some 👀 on it.
Also running into this. When can we expect Paparazzi 1.3.5?
Still seeing this in 1.3.5-20241008.184236-123
^ this seems to be because we wrap all content in a surface, which seems to make dialogs disappear for this version
@mshearer123 hmm, do you mind providing a small sample project to reproduce the issue you are experiencing. Once that's done, we can take a look and maybe open a new issue or reopen this issue