Skip to content

feat: animate detached glass shrinking into its sill pot on minimize#96

Merged
ohxyz merged 2 commits into
mainfrom
feat/animate-glass-minimize-to-pot
Jun 24, 2026
Merged

feat: animate detached glass shrinking into its sill pot on minimize#96
ohxyz merged 2 commits into
mainfrom
feat/animate-glass-minimize-to-pot

Conversation

@ohxyz

@ohxyz ohxyz commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

What

Minimizing a detached glass now animates it shrinking and flying toward its sill pot before disappearing, instead of cutting out instantly.

How

  • New generic animateElementToElement(sourceEl, targetEl, onDone) in src/animate.js — a FLIP-style flight (translate + scale + fade via the Web Animations API) that maps a source element's top-left corner onto a target element's, then runs onDone.
  • detached-glass/action.minimize.js defers its display: none into the animation's onDone callback.

The util is intentionally generic so the attached-glass minimize action can reuse it next.

@ohxyz ohxyz requested a review from bhjsdev as a code owner June 24, 2026 04:49
@ohxyz ohxyz merged commit a60ca1b into main Jun 24, 2026
@ohxyz ohxyz deleted the feat/animate-glass-minimize-to-pot branch June 24, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant