Reorderable icon indicating copy to clipboard operation
Reorderable copied to clipboard

`Modifier.animateItemPlacement()` deprecated in Compose Foundation v1.7.0-alpha06

Open Calvin-LL opened this issue 10 months ago • 6 comments

Item appearance and disappearance animation support was added into LazyColumn and LazyRow. Previously it was possible to add Modifier.animateItemPlacement() modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier called Modifier.animateItem() which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. (I2d7f7, b/150812265)

In Compose Foundation version 1.7.0-alpha06 release notes.

Should remove Modifier.animateItemPlacement() with Modifier.animateItem() once v1.7.0 is out.

Calvin-LL avatar Apr 24 '24 04:04 Calvin-LL

Did some math in #32

Compose Foundation 1.6.0-alpha08 to 1.6.0 took almost 3 months, the latest Compose Multiplatform 1.6.2 uses Compose Foundation 1.6.4 which is a 20-day gap. So expect Compose Foundation v1.7.0 to be in Compose Multiplatform in around 4 months at the current speed.

So that means Compose Foundation v1.7.0 will probably be out around late August - early September.

Calvin-LL avatar May 07 '24 23:05 Calvin-LL

Sorry to bother you. I cloned the lib files into my project. Bumped Compose libs (Android ones because it's an Android app) to 1.7.0-beta02. Replaced animateItemPlacement() with animateItem(), but nothing changed. Did I do something wrong and there is more work to do to adapt to newer Compose versions?

berhram avatar May 30 '24 12:05 berhram

Sorry to bother you. I cloned the lib files into my project. Bumped Compose libs (Android ones because it's an Android app) to 1.7.0-beta02. Replaced animateItemPlacement() with animateItem(), but nothing changed. Did I do something wrong and there is more work to do to adapt to newer Compose versions?

There are lots of places marked TODO(foundation v1.7.0) in the code for 1.7.0 that need to be made before that's fixed.

Calvin-LL avatar May 30 '24 12:05 Calvin-LL

Good news! v1.7.0 is being released in June according to https://android-developers.googleblog.com/2024/05/whats-new-in-jetpack-compose-at-io-24.html, we should see v1.7.0 land in Compose Multiplatform some time in June/July.

Calvin-LL avatar May 30 '24 22:05 Calvin-LL

Looks like they have been late. But it has been released now on the 4th of September.

westnordost avatar Sep 17 '24 16:09 westnordost

Unfortunately I still have to wait until it hits multiplatform. The good news is you can use the beta version of Reorderable, it uses the beta version of multiplatform which has 1.7.0.

Calvin-LL avatar Sep 17 '24 16:09 Calvin-LL

Hello

Multiplatform have hit 1.7.0 earlier

https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.7.0

ArthurKun21 avatar Oct 17 '24 02:10 ArthurKun21

Amazing! Thank you for letting me know. I'll update asap

Calvin-LL avatar Oct 17 '24 02:10 Calvin-LL

v2.4.0 is out

Calvin-LL avatar Oct 17 '24 07:10 Calvin-LL