Skip to content

fix(core): hard-cap Presence Leaving to unmount ghost sheets#125

Draft
KealanAU wants to merge 5 commits into
mainfrom
fix/sheet-ghost-close
Draft

fix(core): hard-cap Presence Leaving to unmount ghost sheets#125
KealanAU wants to merge 5 commits into
mainfrom
fix/sheet-ghost-close

Conversation

@KealanAU

@KealanAU KealanAU commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Fixes the ghost sheet: a leaving panel could hang mounted and invisible, eating taps, because a bindanimationstart cancels the Presence fallback and a vue-lynx replace-all style patch can then kill the animation without ever firing its end/cancel.

  • usePresence: new un-cancellable MAX_LEAVING_FRAMES (60 ≈ 1s) hard cap — forces Left and clears the stuck animating flags even when a start event never resolves; stands down on state change or reopen
  • Tests: Presence hard-cap + stand-down cases
  • Changeset: patch for @vyui/core

The earlier vyui-sheet__content--mt-close keyframe gate is dropped: applying the gate class in the same render as ui-leaving guaranteed a style patch that wiped the MT-written inline transition, so every MT-driven close teleported to the closed position instead of sliding.

KealanAU added 2 commits July 7, 2026 19:04
…ut keyframe

A leaving sheet could hang mounted and invisible, eating taps: any
bindanimationstart cancels usePresence's 24-frame fallback, and a vue-lynx
replace-all style patch during Leaving can kill the running animation
without firing its end/cancel — Leaving never resolves. The same wipe can
destroy the worklets' inline 'animation: none', restarting the .ui-leaving
keyframe from fully open mid-close.

- usePresence: un-cancellable MAX_LEAVING_FRAMES hard cap that forces Left
  (and clears the stuck animating flags) regardless of start events
- SheetContentImpl: MT-driven closes now also gate the slide-out keyframe
  via a vyui-sheet__content--mt-close class applied in the same render as
  ui-leaving; the CSS gate pins the closed transform if inline styles are
  wiped
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploying vyui with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27fbcd7
Status: ✅  Deploy successful!
Preview URL: https://3018c6aa.vyui-2ow.pages.dev
Branch Preview URL: https://fix-sheet-ghost-close.vyui-2ow.pages.dev

View logs

KealanAU added 3 commits July 7, 2026 19:33
The gate guaranteed a style patch in the render that applies ui-leaving,
wiping the MT-written inline transition and letting the gate's pinned
closed transform take over — every MT-driven close teleported instead of
sliding. Revert SheetContentImpl to the plain close paths; the ghost is
covered by usePresence's un-cancellable MAX_LEAVING_FRAMES cap alone.
@KealanAU KealanAU changed the title fix(core): hard-cap Presence Leaving and class-gate the sheet slide-out keyframe fix(core): hard-cap Presence Leaving to unmount ghost sheets Jul 7, 2026
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