Repository navigation
refactor(mosaic): let another card hold the organization task as one step - #10985
austincalvelage wants to merge 6 commits into
Conversation
🦋 Changeset detectedLatest commit: 6f584af 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:
|
|
@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: |
6712519 to
88af684
Compare
239a5e4 to
10dbf65
Compare
10dbf65 to
78e836c
Compare
A whole feature embedded as one step keeps its own Flow.Root, so another card can hold the organization task as one step. views.md records the exception.
…is embedded useTaskChooseOrganizationFlow runs the task's model and controller and returns one controller. TaskChooseOrganizationContent takes it and renders the steps without the card, or sends the user on once the task is complete, like Reverification. TaskChooseOrganization uses the same hook. enabled stays off the public CreateOrganization props.
Who renders Card.Root already says a feature another feature embeds exports its steps. It now names the use<Feature>Flow hook and the two shapes it returns, and One flow per surface points there for steps that keep their own Flow.Root.
… its own Reverification already brings its own Flow.Root into the add-email dialog and ConfirmShell, so one card can hold nested flows. The rule now names what it limits, a feature's own view, and says the exported skeleton is not a surface.
78e836c to
6f584af
Compare


Description
Lets another card hold the organization task as one step. Sign-up uses this in #10881. It's split out so the sign-up PR stays about sign-up.
The task stays a feature, with its own model, controller and copy. It's not a block.
<TaskChooseOrganization />is unchanged.useTaskChooseOrganizationFlow(options)runs the task's model and controller and returns one controller.TaskChooseOrganizationContent({ controller })renders the task without its card and handles its own states: the steps, a card-less skeleton while organizations load, and sending the user on once the task is complete.isTaskChooseOrganizationReady(controller)says when the task's data has loaded, so the parent can keep its current screen until then.<TaskChooseOrganization />isCard.Rootaround the same content. A newindex.tsexports these.enabledon the organization task, organization-list and create-organization models lets the task skip its fetches until the parent reaches it. It is not a publicCreateOrganizationprop.views.md: "One flow per surface" becomes "One flow per feature". A feature's view renders oneFlow.Root, and a feature mounted as a step of another keeps its own, asReverificationalready does in the add-email dialog. This renames an existing rule to match the code.views.md, "Who rendersCard.Root": names theuse<Feature>Flowhook and the content without the card that a mounted feature exports.Nothing calls the new exports until #10881. The existing organization task, organization list and create-organization feature tests pass unchanged (53 tests).
Stacked on #10957.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change