square / Listable

Declarative list views for iOS apps.
Apache License 2.0
204 stars 28 forks source link

Don't animate when dequeuing cells #517

Closed kyleve closed 3 months ago

kyleve commented 12 months ago

EDIT: Reverted here https://github.com/square/Listable/pull/542

https://block.atlassian.net/browse/UI-5081

We now force a non-animated layout before dequeuing a cell, to ensure that any implicit animations that may occur are avoided. This avoids issues where you may see an animation as a reused cell's changed state is applied.

Checklist

Please do the following before merging:

kyleve commented 10 months ago

Seems reasonable, but this won't cause an extra layout, would it? it's just going to happen earlier and non-animated since the cell should be needsLayout = false after this?

I logged calls to layout and the number of calls seemed identical from what I could tell.

kyleve commented 10 months ago

This is for some reason breaking the KIF tests, seemingly related to market search bar, will need to dig into that before merging: https://square-console.sqprod.co/bbr/production/ci_jobs/PR+ios+WK-SK4+Bazel-Pipeline-PR/3