-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(clerk-js): Introduce <Drawer.Confirmation />
component
#5376
refactor(clerk-js): Introduce <Drawer.Confirmation />
component
#5376
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: c362b57 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
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 |
packages/clerk-js/src/ui/components/PricingTable/PlanDetailDrawer.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, let's improve the issues that I mentioned, must have slipped through on previous PRs.
packages/clerk-js/src/ui/components/PricingTable/PlanDetailDrawer.tsx
Outdated
Show resolved
Hide resolved
packages/clerk-js/src/ui/components/PricingTable/PlanDetailDrawer.tsx
Outdated
Show resolved
Hide resolved
const Confirmation = React.forwardRef<HTMLDivElement, ConfirmationProps>(({ open, onOpenChange, children }, ref) => { | ||
const prefersReducedMotion = usePrefersReducedMotion(); | ||
const { animations: layoutAnimations } = useAppearance().parsedLayout; | ||
const isMotionSafe = !prefersReducedMotion && layoutAnimations === true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to simply return this from usePrefersReducedMotion
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried introducing a useMotionSafe
hook that handled both of these hooks but ran into a circular import issue. Can revisit in the future again.
Description
Introduce
<Drawer.Confirmation />
component to be used within Commerce cancel subscription flow.Screen.Recording.2025-03-17.at.3.42.24.PM.mov
Resolves COM-148
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change