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
112 stars 16 forks source link

Squoosh regression - DesignComponent cannot have tap callback on itself #1709

Open HooHaa-code opened 2 weeks ago

HooHaa-code commented 2 weeks ago

With useSquoosh = false, the following tap callback snippet works as expected:

    fun iconButton(
        @DesignVariant(property = "state") state: State,
        @Design(node = "#iconContainer") icon: @Composable (ComponentReplacementContext) -> Unit,
        @Design(node = "IconButton") onPress: TapCallback,
    )

When squoosh is enabaled, the tap callback no longer works.

I have attached an example project Ex4Google-tapCallback.zip

yiqunw700 commented 1 week ago

Hi @HooHaa-code, could you please provide the DesignCompose release version? Thanks!

https://github.com/google/automotive-design-compose/pull/1502 squoosh support for TapCallbak was added in 0.30.

HooHaa-code commented 1 week ago

I have "+" in libs.version.toml

As of today the latest version is v0.31.0-rc01