chore(ui): Layer architecture for configure steps per IdP and protocol#8651
Conversation
🦋 Changeset detectedLatest commit: 8be9b23 The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
80e9446 to
8b20562
Compare
e2635af to
fc19027
Compare
fc19027 to
1f2eec2
Compare
1f2eec2 to
c1282bf
Compare
|
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:
📝 WalkthroughWalkthroughThis PR refactors the ConfigureSSO SAML wizard architecture into provider-specific, step-based flows and updates localization and types accordingly. It adds shared UI components AttributeMappingTable and IdentityProviderMetadataForm, implements SamlOktaConfigureSteps and SamlCustomConfigureSteps composed of create-app, attribute-mapping, assign-users, and identity-provider-metadata steps, introduces a provider-dispatching ConfigureStep entry, and extracts a shared InnerStepCounter used by VerifyDomainStep. Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
f1cafb9 to
df44a2a
Compare
df44a2a to
c43e632
Compare
@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: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/shared/src/types/localization.ts (1)
1403-1573: ⚡ Quick winAdd a type-level regression check for the new localization schema.
This rewires a large public key surface, but no coverage was updated in the supplied diff. A compile-time fixture asserting the default SSO localization resource still satisfies this
configureSSO.configureStepshape would catch missing or renamed keys early.As per coding guidelines, "If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/shared/src/types/localization.ts` around lines 1403 - 1573, Add a compile-time regression check that imports the default SSO/localization resource and asserts it still satisfies the configureSSO.configureStep shape: create a TypeScript-only test (no runtime assertions) that imports the type for configureSSO.configureStep and the default localization object and then do a type-level assertion (e.g., const _check: typeof defaultLocalization.configureSSO.configureStep = {} as typeof configureSSO.configureStep or using the TS 4.9 `satisfies` operator) so the build fails if any keys are missing/renamed; ensure the test references configureSSO.configureStep and the default SSO localization export and is added to the test suite/CI.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/shared/src/types/localization.ts`:
- Around line 1403-1573: Add a compile-time regression check that imports the
default SSO/localization resource and asserts it still satisfies the
configureSSO.configureStep shape: create a TypeScript-only test (no runtime
assertions) that imports the type for configureSSO.configureStep and the default
localization object and then do a type-level assertion (e.g., const _check:
typeof defaultLocalization.configureSSO.configureStep = {} as typeof
configureSSO.configureStep or using the TS 4.9 `satisfies` operator) so the
build fails if any keys are missing/renamed; ensure the test references
configureSSO.configureStep and the default SSO localization export and is added
to the test suite/CI.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 23bb4169-5d71-4bc6-bc43-572d98d5cf04
📒 Files selected for processing (11)
packages/localizations/src/en-US.tspackages/shared/src/types/localization.tspackages/ui/src/components/ConfigureSSO/elements/Wizard/InnerStepCounter.tsxpackages/ui/src/components/ConfigureSSO/steps/ConfigureStep.tsxpackages/ui/src/components/ConfigureSSO/steps/ConfigureStep/index.tsxpackages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlCustomConfigureSteps.tsxpackages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlOktaConfigureSteps.tsxpackages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/AttributeMappingTable.tsxpackages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/IdentityProviderMetadataForm.tsxpackages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsxpackages/ui/src/components/ConfigureSSO/steps/configureStepTranslations.ts
💤 Files with no reviewable changes (2)
- packages/ui/src/components/ConfigureSSO/steps/configureStepTranslations.ts
- packages/ui/src/components/ConfigureSSO/steps/ConfigureStep.tsx
✅ Files skipped from review due to trivial changes (1)
- packages/ui/src/components/ConfigureSSO/elements/Wizard/InnerStepCounter.tsx
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/ui/src/components/ConfigureSSO/steps/VerifyDomainStep.tsx
- packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/index.tsx
- packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlCustomConfigureSteps.tsx
- packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/AttributeMappingTable.tsx
- packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/SamlOktaConfigureSteps.tsx
- packages/ui/src/components/ConfigureSSO/steps/ConfigureStep/saml/shared/IdentityProviderMetadataForm.tsx
- packages/localizations/src/en-US.ts
07db24a to
70e7f5a
Compare
API Changes Report
Summary
@clerk/sharedCurrent version: 4.14.0 Subpath
|
f72b9a6 to
2ff9888
Compare
2ff9888 to
443acc7
Compare
21ec94d to
5d10b87
Compare
5d10b87 to
aa90ec7
Compare
aa90ec7 to
8be9b23
Compare
Description
Introduces new architecture for adding configuration steps per IdP and protocol, making it more flexible to add Microsoft Entra + Google Workspace for SAML, and later OpenID connect.
Now, each protocol has it's folder within the provider types, and each provider should have it's inner steps created within a module, which allows for flexibility when composing the UI.
How to add a new SAML provider
ProviderTypeunionConfigureStep/index.tsxChecklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change