You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exit transitions: animate a keyed node out before it leaves the tree #35
Reported by the reference shell's port. The shell fades a panel out before unmounting it: shut panels unmount after the fade.
bullseye animates paint variants only on nodes that persist. A node that leaves the tree vanishes at once.
Proposal: an opt-in exit transition on keyed nodes, for example .exit(Fade | Slide(edge), Duration). When a keyed node with an exit transition disappears from the build, bullseye keeps painting its last frame's shapes, faded or translated, until the duration ends. It's paint-only and takes no input. This is the mirror of #30, which animates nodes moving, and generalises #21's slide-out for sheets.
State: the last frame's shapes and rect per exiting keyed node, kept for at most the duration, so it's bounded.
Tests: a removed node is still painted mid-exit and gone after; it receives no input while exiting; and re-adding it during the exit cancels the exit.
Decided (user, 2026-11-10): in v0.1, as ghosts. Scheduled after #70 and #69, before M5.
Design
tw().exit(Exit::Fade, Duration) on an identified node, with Exit::Slide(Edge) as well, and Exit::FadeSlide if it's cheap. Easing comes from the existing ease_* classes, as for transition and animate_layout.
Each frame, bullseye records the painted shapes of nodes that have an exit: their clipped shapes, including the subtree, in the coordinates they were painted at. When such a key is missing from the next build, bullseye keeps painting those shapes (faded or translated) for the duration, then drops them.
No retained node: the node's closures have already run (FnOnce, 'f borrows), so only the shapes outlive their frame. Memory is bounded by the number of exiting nodes and the duration.
A ghost takes no input and is not in the layout. With Animate position changes of keyed nodes (FLIP) #30, the remaining siblings that opted into animate_layout slide into the gap while the ghost fades.
Re-added during its exit (an undo), the ghost is dropped at once and the live node paints normally. Never both.
Paint order: a ghost paints where its node was in its parent's paint order if that is cheap. Otherwise it paints after its former parent's children, so it stays inside the parent's clip. Decide in the PR and say which.
Correction: the user added ghosts (#35) to the plan. They did not decide it's in v0.1; that's still open. The design in the comment above stands. The scheduling note (after #70 and #69, before M5) is withdrawn until the release is decided.
Decided in the M6 design review (PR #101): overlays animate out by staying mounted (.shown()/.on_exited() on the overlay chain), so M6 doesn't depend on ghosts. This issue stays independent, for nodes whose data is already gone.
Activity
samitbasu commentedon Nov 10, 2026
Decided (user, 2026-11-10): in v0.1, as ghosts. Scheduled after #70 and #69, before M5.
Design
tw().exit(Exit::Fade, Duration)on an identified node, withExit::Slide(Edge)as well, andExit::FadeSlideif it's cheap. Easing comes from the existingease_*classes, as fortransitionandanimate_layout.FnOnce,'fborrows), so only the shapes outlive their frame. Memory is bounded by the number of exiting nodes and the duration.animate_layoutslide into the gap while the ghost fades.Tests
animate_layoutslide into the gap while the ghost fades..exitvanish at once..exiton an anonymous node is a debug build error.Demo:
todo's Remove. The duration and look are for the user to try.samitbasu commentedon Nov 10, 2026
Correction: the user added ghosts (#35) to the plan. They did not decide it's in v0.1; that's still open. The design in the comment above stands. The scheduling note (after #70 and #69, before M5) is withdrawn until the release is decided.
samitbasu commentedon Nov 11, 2026
Decided in the M6 design review (PR #101): overlays animate out by staying mounted (
.shown()/.on_exited()on the overlay chain), so M6 doesn't depend on ghosts. This issue stays independent, for nodes whose data is already gone.