Skip to content

An exit .Transition() declared on a keyed Memo doesn't play when the Memo is removed #1663

Open

Description

Description

Found by the spec 066 transforms matrix (#1630, layer 2 PR #1661).

A keyed Memo(key, () => element) with an exit transition declared on the Memo itself, for example Memo("k", () => VStack().Width(100).Height(40)).Transition(Transition.Exit(Transition.Scale(0.5f))), is removed at once when it leaves the tree. The exit animation never starts, so the control disappears without animating. The same exit declared directly on the element, or on a ModifiedElement decorator, plays.

Matrix evidence (hosted record run 44917004000, unmount step, active is the pose read halfway through the exit):

Case wrapper active
Rotation.Opacity.TransitionExit Memo none (removed)
CenterPoint.None.TransitionExit Memo none (removed)
Rotation.Translation.TransitionExit Direct 205,150,280,180
Translation.None.TransitionExit Decorator 120,150,195,180

Every *.TransitionExit case with wrapper=Memo reads active=none, whatever the transform, transition or user code. This was already the case before spec 066 layer 2 (the base ledger has the same value).

Steps to reproduce

  1. Mount VStack(Memo("k", () => Border(null).Width(100).Height(40)).Transition(Transition.Exit(Transition.Fade), Curve.Linear(2000))).
  2. Re-render without the Memo.
  3. The control is gone at once. Expected: it fades out over two seconds, then is removed.

Notes

The transforms matrix ledger attributes these cases with a known.json rule that cites this issue, so they don't hide other disagreements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions