Repository navigation
refactor(mosaic): share one invite form between the invite dialog and create organization - #10609
Conversation
🦋 Changeset detectedLatest commit: f35ff84 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.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
1e2059d to
58b1b94
Compare
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
abc7499 to
e82276b
Compare
|
e82276b to
8049613
Compare
8049613 to
a6f1f74
Compare
… create organization useInviteMembersForm owns the invite values, the default role, rejected addresses, submit availability, and the submit. The invite dialog and the create organization invite step take it as a single invite prop instead of repeating each field, and use its form id and submit handler directly.
a6f1f74 to
f35ff84
Compare


Description
Stacked on #10599.
The invite members dialog and the create organization invite step each had their own copy of the invite form: the same values, the same role, rejection and submit wiring, and the same field props listed out in several types. Every change to the form, like the typed-address support in #10599, had to be made in both controllers and threaded through each prop list.
useInviteMembersFormin the invite controller now owns the form values, the default role, rejected addresses, submit availability and the submit. It returns oneInviteMembersFormobject.open,onOpenChange,finalFocusandinvite, down from 16 props.InviteMembersFieldstakesemailInputRefandinvite, down from 11.useCreateOrganizationInviteControlleris a thin wrapper around the shared hook, and its separate return type is gone.preventDefault.No user-facing behavior changes.
Refs CORE-4075
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change