Skip to content
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

[Coil 3] VectorDrawable @Preview doesn't work #2489

Open
OKatrych opened this issue Sep 18, 2024 · 7 comments
Open

[Coil 3] VectorDrawable @Preview doesn't work #2489

OKatrych opened this issue Sep 18, 2024 · 7 comments
Labels
help wanted Issues that are up for grabs + are good candidates for community PRs

Comments

@OKatrych
Copy link

Describe the bug
After the last fix, the AsyncImage @Preview render started working only for raster images. If we put a VectorDrawable as an argument, it doesn't render the preview image.

To Reproduce
Here, in this case, eu_flag is WebP and fi_flag is XML:
346539606-afaa8a34-3d03-45ce-9a96-e82d9019637a
Here is a preview:
346539612-33abd3a1-0315-4533-9d74-058e4dd68844
And if I move fi_flag to be shown before the eu_flag, it fails to render both of them:
346540363-ec6cde69-18bb-4bd4-85de-93438e4bb2f9

346540365-6aa57bfa-fffe-4447-98e1-4ba2b14a20c5

Version
3.0.0-alpha10

@colinrtwhite colinrtwhite added help wanted Issues that are up for grabs + are good candidates for community PRs 3.0 labels Sep 18, 2024
@colinrtwhite
Copy link
Member

Interesting I wonder if we need to add some special handling for XML drawables inside the preview environment. The current implementation delegates to the same way we load them on a real device so we can ideally keep the loading logic consistent. We probably need to add special handling for this case in here.

@tgyuuAn
Copy link

tgyuuAn commented Oct 27, 2024

@OKatrych

I'd like to take on this issue, but I couldn't reproduce it.

In my case, when I tried rendering fi_flag with svg vector drawable and eu_flag with webp in version 3.0.0 alpha 10, both came out fine.

Could you please tell me more about the issue?

image

(This is the result after emptying the caching and checking.)

@colinrtwhite colinrtwhite removed the 3.0 label Oct 31, 2024
@colinrtwhite
Copy link
Member

colinrtwhite commented Oct 31, 2024

@tgyuuAn Thanks for taking a look! I was able to repro the bug here on Android Studio Ladybug 2024.2.1 Patch 1 and Ladybug Feature Drop 2024.2.2 Canary 8 on Mac Sequoia 15.1.

@tgyuuAn
Copy link

tgyuuAn commented Oct 31, 2024

@tgyuuAn봐주셔서 감사합니다! Android Studio Ladybug 2024.2.1 Patch 1과 Ladybug Feature Drop 2024.2.2 Canary 8 on Mac Sequoia 15.1에서 버그 를 재현할 수 있었습니다.

Thank you !!! 🙃🙃

@colinrtwhite
Copy link
Member

@tgyuuAn Were you able to take a look at this issue?

@tgyuuAn
Copy link

tgyuuAn commented Nov 12, 2024

@tgyuuAn Were you able to take a look at this issue?

Unfortunately, I wasn't able to reproduce the issue, and it seems that there are quite a few bugs in the Ladybug version. I'm looking forward to the next version being released soon...

@SandraDupreDNA
Copy link

I have the same issue: I need to wrap all direct vector resources in a Drawable to see them in Preview or in Paparazzi screenshots. Also I can reproduce the bug on LadyBug 2024.2.1 Patch 2 and Meerkat 2024.3.1 Canary 2, so I'm not sure the issue will be fixed with the next Android Studio release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that are up for grabs + are good candidates for community PRs
Projects
None yet
Development

No branches or pull requests

4 participants