feat(clerk-js,localizations,shared,ui): Annual-only plans#8012
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 1968bf5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 21 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 |
|
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 Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIntroduces a changeset and makes BillingPlan.fee nullable across backend, shared types, clerk-js resources, and JSON shapes. Adds a sandbox scenario AnnualOnlyPlans and a localization key billing.billedAnnuallyOnly. UI components (Plans/PlanDetails, PricingTable) were refactored to handle nullable fees and to use a new PeriodToggle component. Adds determinePlanPeriod helper used in the checkout flow. Updates MSW single-session environment to enable billing flags. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@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: |
| enabled: false, | ||
| has_paid_plans: false, | ||
| enabled: true, | ||
| has_paid_plans: true, | ||
| }, | ||
| stripe_publishable_key: '', | ||
| user: { | ||
| enabled: false, | ||
| has_paid_plans: false, | ||
| enabled: true, | ||
| has_paid_plans: true, |
There was a problem hiding this comment.
(not blocking just curious) what is this change for?
There was a problem hiding this comment.
this is for the mock scenario system. this sets all mock scenarios to default to having billing enabled.
Description
This PR adds support for annual-only billing plans. An annual-only billing plan is a plan where the
feeis null. This is a new concept, so the UI needed to be updated to remove all assumptions offeebeing always available. This is mostly small logic changes, but the most significant change is in the PricingTable and PlanDetails components where we now renderOnly billed monthlywhen a plan only supports being billed annually.Testing Instructions
pnpm i && turbo build, thenpnpm dev:sandboxto start the sandbox and go to it athttp://localhost:4000scenario.setScenario(AVAILABLE_SCENARIOS.AnnualOnlyPlans)components.pricingTable.setProps({ for: 'user' })Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
UI
Localization
Sandbox