desktop: exit animations for dialogs, menus, popovers, toasts and the fullscreen player - #10
Merged
Merged
Conversation
… fullscreen player Closed surfaces used to unmount in the same commit that closed them, so the Material 3 entrance animations had no matching exit: dialogs, the palette, context and select menus, the search and jobs popovers, toasts, the narrow-layout drawer and the fullscreen player all cut to nothing. lib/presence.ts keeps a closed surface mounted for one exit animation: it swaps `fade-in` for `closing` (the new exit keyframes, on the emphasised-accelerate easing, held with `forwards`), makes the element inert so it takes no focus, keys or clicks on the way out, and unmounts on animationend, at once when nothing animates (reduced motion), or on a fallback timeout. Focus return, the Connect picker close and leaving window fullscreen stay keyed on the live state, so none of that waits. The docked side panel still closes instantly, being part of the layout. The three hardcoded transition durations left in global.css now use the motion tokens. exit-motion.spec covers the closing state and the reduced-motion shortcut; presence.test covers the toast list merge. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdqKjaWu5KQu7R1syAi9mp
On the CI runner the earlier steps outran the toast's 5 s auto-dismiss, so the Undo click found it mid-exit and then gone. Check the toast first, straight after playing, and hover it so the timer is held. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MdqKjaWu5KQu7R1syAi9mp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every transient surface in the Material 3 Expressive desktop shell had an entrance animation but no exit: React unmounted a closed surface in the same commit that closed it, so dialogs, the command palette, context and select menus, the search and jobs popovers, toasts, the narrow-layout side drawer and the fullscreen player all cut to nothing.
lib/presence.tskeeps a closed surface mounted for one exit animation: it swapsfade-inforclosing, makes the element inert so it takes no focus, keys or clicks on the way out, and unmounts onanimationend. When nothing animates (reduced motion turns every animation off) it unmounts at once; a fallback timeout covers a lost event. A list variant handles toasts, which leave individually and keep their place.forwardsso nothing flashes back to full opacity before React removes it. The M3 layer gets matching variants where its entrances differ (menus, the search sheet, the drawer).global.cssnow use the motion tokens.Test plan
pnpm typecheck,pnpm lint(0 errors; 8 pre-existing warnings),pnpm test(150 passed, incl. newpresence.test.ts)pnpm builda11y,keyboard-a11y,keyboard,motion-contrast,palette,panels,playback,undoall pass on the built appe2e/exit-motion.spec.ts: with exits slowed, each surface is mid-animation and inert right after closing, the shell is live again from the first frame, and under reduced motion a closed surface is gone at once with no animation running🤖 Generated with Claude Code
https://claude.ai/code/session_01MdqKjaWu5KQu7R1syAi9mp
Generated by Claude Code