-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rememberAsyncImagePainter doesn't render correctly with Roborazzi/Paparazzi #1910
Comments
@takahirom Yep, the expected + actual are what I'm seeing too. Part of the reason Paparazzi is doing something differently as it doesn't render the image at all - even if Ideally |
Any updates here? This has become a huge blocker for us. The workaround mentioned to use |
@kartik-prakash I haven't had a chance to take a look at this further as I'm focused on the 3.x work. If you're able to track down the issue locally, I'd accept a PR that patches the issue. |
This has been fixed in the |
Closing as this is fixed in the 3.x release branch. For earlier versions check out the work-around above. |
Describe the bug
rememberAsyncImagePainter
doesn't render properly when used with Roborazzi and Paparazzi. The issue appears to be related to the fact that it it needs to wait for a validdrawSize
, which is set inDrawScope.onDraw
immediately before the painter is then drawn.AsyncImage
avoids this timing issue by usingConstraintsSizeResolver
to listen to its own composable constraints, which are set before the draw stage.Interestingly, Paparazzi and Roborazzi both render
rememberAsyncImagePainter
incorrectly, but differently. WhenintrinsicContentSize
is set to a fixed value this fixes the issue on Roborazzi, but not Paparazzi. It's possible there are different root causes, but this needs to be debugged further.Work-around
It's possible to work-around this issue by setting any custom size:
To Reproduce
See
RoborazziComposeTest.rememberAsyncImagePainter
andPaparazziTest.rememberAsyncImagePainter
in this repository.Version
Reproduced with Coil
2.4.0
, Roborazzi1.6.0
, and Paparazzi1.3.1
.Related: cashapp/paparazzi#1123
The text was updated successfully, but these errors were encountered: