KamoCRM

Give the deck its slide back, without the lurch

Featurekamo-internal
Shipped
14 ஆகஸ்ட், 2026 அன்று 10:16 PM UTC
Author
kamo
Commit
672af30

Dropping `layout` to stop the card lurching onto the edge of the screen also took the sibling slide with it: dismissing a card left the rest snapping into its place. Both are reachable, because the two are not the same event. `layoutDependency` is the gate. The deck's composition — the ids of the cards currently in it — is handed to each card, and framer re-measures only when that value changes. So a neighbour leaving animates, and a render caused by anything else does not: not the countdown ticking every second, and not the options panel opening, which is the one that caused the lurch. Left to re-measure every render, framer read that panel's growth as a position change, and since the deck is anchored to the bottom of the viewport it animated the card up from where it used to sit, which is lower down. `layout="position"` rather than `layout`, so size is never projected. The panel animates its own height; a size projection would animate the same growth a second time, as a scale distortion of the card's contents.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing