fix(headless): keep the element mounted when an exit is interrupted - #9613
fix(headless): keep the element mounted when an exit is interrupted#9613alexcarpenter wants to merge 1 commit into
Conversation
useTransition never cancelled the pending unmount when open flipped back true mid-exit, so the element unmounted once the retargeted transition settled and immediately remounted with data-starting-style. In Flow, the returning step slid back into place and then snapped off-screen and replayed its entrance. useAnimationsFinished now returns a cancel handle and useTransition returns it as effect cleanup.
🦋 Changeset detectedLatest commit: e573d9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthrough
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized change keeps elements mounted when an exit is interrupted, preventing the documented remount and visual snap behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (1 skipped: 1 unsupported.)
Comment |
Description
useTransitionnever cancelled the pending unmount whenopenflipped back true mid-exit. Element unmounted once the retargeted transition settled, then immediately remounted withdata-starting-style.In
Flow: reverse steps mid-animation → returning step slides back into place, then snaps off-screen and replays its entrance.useAnimationsFinishednow returns a cancel handle;useTransitionreturns it as effect cleanup.Same latent leak exists at
accordion-panel.tsx:73andcollapsible-panel.tsx:71(separate hook instances, own effects) — not touched here. Follow up required.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change