Skip to content

feat: drive detached glass open/close via [opening]/[closing] attributes#89

Merged
ohxyz merged 3 commits into
mainfrom
feature/detached-glass-animation-main
Jun 22, 2026
Merged

feat: drive detached glass open/close via [opening]/[closing] attributes#89
ohxyz merged 3 commits into
mainfrom
feature/detached-glass-animation-main

Conversation

@ohxyz

@ohxyz ohxyz commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Reworks the detached-glass open/close animations to be attribute-driven and JS-controllable.

What changed

  • Open animation moved from an unconditional rule onto an &[opening] selector; animateDetachedGlassOpen() sets [opening] and clears it on animationend (so it can replay on restore-from-sill).
  • Close animation now removes the element on animationend instead of a hardcoded setTimeout duration (drops the DETACHED_GLASS_CLOSE_DURATION constant).
  • New options: animateOpen on addDetachedGlass / addWindowlessGlass, and animateClose on the remove APIs — both default true.
  • Attach now skips the close animation (animateClose: false): the glass is moved into a pane, not dismissed, so the emptied husk no longer fades out.

Notes

Branch is based off main and contains animation changes only — independent of the in-progress drag-and-drop refactor.

ohxyz added 3 commits June 22, 2026 17:05
…imateOpen/animateClose opts

Move the open animation from an unconditional rule onto an [opening] attribute
set in JS (cleared on animationend), mirroring the existing [closing] close path.
Replace the close timeout with an animationend listener. Expose animateOpen on
addDetachedGlass/addWindowlessGlass and animateClose on the remove APIs; attach
skips the close animation since the glass is moved, not dismissed.
@ohxyz ohxyz merged commit c04dae4 into main Jun 22, 2026
@ohxyz ohxyz deleted the feature/detached-glass-animation-main branch June 22, 2026 09:50
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