google / automotive-design-compose

Automotive Design for Compose is an extension to Jetpack Compose that allows every screen, component, and overlay of your Android App to be defined in Figma, and lets you see the latest changes to your Figma design in your app, immediately!
https://google.github.io/automotive-design-compose/
Apache License 2.0
116 stars 17 forks source link

Masks inside of variants do not render correctly #905

Open HooHaa-code opened 7 months ago

HooHaa-code commented 7 months ago

Having a mask inside of a variant causes the object to render incorrectly:

Rendered

image

Expected

image

example project is attached Ex4Google-variant-mask.zip

iamralpht commented 7 months ago

@HooHaa-code is this with 0.22-rc or 0.21? I'm wondering if the layout changes improve matters.

Alternatively, there's a new implementation of masking in main if you enable "SQUOOSH" here: https://github.com/google/automotive-design-compose/blob/3d8f2e9f5e39ff32476e6d3ee3e576e9e612b339/designcompose/src/main/java/com/android/designcompose/DesignView.kt#L971 -- this will break all kinds of other things (lists and grids, content substitution, etc) but it improves some rendering fidelity, e.g.: multiple masks on a single object should work, some basic animations are present, etc.

HooHaa-code commented 7 months ago

I have '+' set for design compose in libs.versions.toml. So it should be 0.25.0

iamralpht commented 7 months ago

Ok, I am not sure if that would have gotten you the 0.25.0-rc release (@timothyfroehlich knows how these rules work). We just pushed 0.25.0 to Maven (about 30 minutes ago) so updating dependencies now should definitely pull it in.

HooHaa-code commented 7 months ago

I guess I assumed that when a release it git hub is made that we would get it though maven. I was wrong in that assumption. I just did a sync and say the 0.25.0 artifacts get pulled in.

The behavior is still the same

timothyfroehlich commented 7 months ago

That was my mistake, sorry about that.after I create the release I need to wait for the release job to finish building the artifact so that I can upload to Google's maven repository. I lost track of things on Friday and didn't complete the process.

We'll have to look into the masks issue

On Mon, Apr 1, 2024, 12:23 PM HooHaa-code @.***> wrote:

I guess I assumed that when a release it git hub is made that we would get it though maven. I was wrong in that assumption. I just did a sync and say the 0.25.0 artifacts get pulled in.

The behavior is still the same

— Reply to this email directly, view it on GitHub https://github.com/google/automotive-design-compose/issues/905#issuecomment-2030197860, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMM2SSSKDPLERV4QLW6773Y3GJ2BAVCNFSM6AAAAABFO3ARXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQGE4TOOBWGA . You are receiving this because you were mentioned.Message ID: @.***>

rylin8 commented 6 months ago

FYI while testing out https://github.com/google/automotive-design-compose/issues/1056 I tried enabling squoosh and the mask appeared to render correctly, though component replacements did not work.