google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

Placeholder Library composed to Node migration? #1785

Closed rosamerinoclaros closed 3 weeks ago

rosamerinoclaros commented 1 month ago

The Placeholder library is deprecated, and it has been recommended to fork and customize it according to our needs. I have done this, but encountered an issue where our compose rules linter flagged Modifier.placeholder for using a composed block instead of a Node.

I attempted a migration, but it is very complex due to ten variables being remembered inside the composed block.

What are the plans for the Placeholder Modifier? Is Google handling this migration internally? Could you provide guidance on how we can accomplish this migration?

Thanks in advance!

fargus9 commented 1 month ago

The library referenced as the replacement is only in the wear version of compose as far as I can tell, so the grounds for deprecating this seem invalid.

bentrengrove commented 3 weeks ago

We won't be handling the migration of placeholder unfortunately, for the reasons detailed here

If you are fine with the caveats listed and it works for your use case, I would suggest implementing a composable modifier factory as detailed in the docs. This will be a much easier migration.