feat(core): track animation settle with data-transitioning lifecycle#1582
Closed
sampotts wants to merge 6 commits into
Closed
feat(core): track animation settle with data-transitioning lifecycle#1582sampotts wants to merge 6 commits into
sampotts wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5508b22. Configure here.
Extend createTransition to keep transitioning true until animations settle, wire the flag through popover/menu/tooltip/alert-dialog cores, restore popover close-animation coordination, and add generic overflow-hidden skin hooks for data-transitioning on popups and menus. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Stop scheduleTransitionSettle RAF polling after cleanup runs, and use data-transitioning:!overflow-hidden so Tailwind can override !overflow-auto. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the data-transitioning !overflow-hidden workaround with standalone menu.root hosts that include the popover positioning shell. Default skin wraps menu.root with surface at the entry layer and stops layering popup.popover at call sites. Co-authored-by: Cursor <cursoragent@cursor.com>
Read the current element when open animations settle so lazy-mounted popups pick up setElement during the render cycle, and defer scheduleTransitionSettle to the menu viewport PR where it is used. Co-authored-by: Cursor <cursoragent@cursor.com>
f268699 to
49b4a5b
Compare
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
transitioningflag tocreateTransitionthat stays true until open/close animations settle, and exposes it asdata-transitioningthrough popover/menu/tooltip/alert-dialog cores.setElement, deferred reopen duringending) on top of the transition API changes.data-transitioning:overflow-hiddenskin hooks for popups and menus (submenu-view selectors remain in the viewport/settings stack).Transitioning vs
statuscreateTransitionstate has bothstatus(idle|starting|ending) and a separatetransitioningboolean. They are not folded into one field because they answer different questions:statusdata-starting-style,data-ending-styletransitioningdata-transitioningOn open,
statusbecomesidleafter a double-RAF so the browser can paint the “from” state and dropdata-starting-stylebefore the enter animation runs—but the popup may still be animating.transitioningstaystrueuntilgetAnimations({ subtree: true })settles. That gap (status: idle,transitioning: true) is intentional: style hooks and layout/interaction guards need different lifetimes.On close, both overlap more (
status: ending,transitioning: true), butstatusstill tracks the ending-style hook whiletransitioningcovers the full settle window—including descendant animations and CSS transition fallbacks.Consumers use
data-transitioningfor concerns that should span the whole animation (overflow clipping, deferring trigger re-open until close finishes) without overloadingstatusor keepingdata-starting-style/data-ending-styleactive longer than the CSS hooks require.Stack position
feat/captions-menu→feat/menu-popup-group(#1577) → this PR →feat/menu-viewport(#1579) → …Test plan
pnpm build:packages && pnpm typecheckpnpm -F @videojs/core test src/dom/ui/tests/transition.test.ts src/dom/ui/popoverdata-transitioningis present during the animation windowNote
Medium Risk
Touches core open/close transition plumbing and popover interaction timing (click/blur/outside-dismiss), which can regress UI dismissal/animation behavior across platforms; changes are well-covered by updated and expanded tests.
Overview
Adds a first-class
transitioninglifecycle for UI transitions.TransitionStatenow includestransitioning,getTransitionFlags/getTransitionStyleAttrsexpose it asdata-transitioning, and core UI states (PopoverCore,MenuCore,TooltipCore,AlertDialogCore, input indicators) propagate the flag.Updates DOM transition + popover behavior to respect animation settling.
createTransitionnow tracks a registered element viasetElement, waits forgetAnimations({ subtree: true })(plus optional CSS-transition fallback), and keepstransitioningtrue until settle;createDismissLayer.open()can receive an element.createPopoveris adjusted to pass the popup element into open, defer re-open clicks duringendinguntil close completes, and harden blur/outside-dismiss edge cases (incl. group peer-trigger checks).Skins/presets adopt the new attribute hook. Default/minimal CSS and Tailwind utilities add
data-transitioning:overflow-hidden, and React/HTML presets stop composingpopup.popoverinto menu content classes in favor of the menu root styling shell.Reviewed by Cursor Bugbot for commit 49b4a5b. Bugbot is set up for automated code reviews on this repo. Configure here.