Skip to content

chore(ui): Add wizard steps to <ConfigureSSO />#8468

Open
LauraBeatris wants to merge 11 commits intomainfrom
laura/add-wizard-to-configure-sso
Open

chore(ui): Add wizard steps to <ConfigureSSO />#8468
LauraBeatris wants to merge 11 commits intomainfrom
laura/add-wizard-to-configure-sso

Conversation

@LauraBeatris
Copy link
Copy Markdown
Member

@LauraBeatris LauraBeatris commented May 4, 2026

Description

  • Introduces Wizard component with support for root and inner steps
  • Introduce basic boilerplate of modules per step
  • Add different Flow.Part per step type
  • Handles initial loading UI state when querying enterprise connections

To be handled in next PRs:

  • Whether a step is considered "complete" (green mark)
CleanShot.2026-05-05.at.00.18.48.mp4

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@LauraBeatris LauraBeatris self-assigned this May 4, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: a7f1340

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension Patch

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment May 5, 2026 11:11pm

Request Review

@github-actions github-actions Bot added the ui label May 4, 2026
@LauraBeatris LauraBeatris force-pushed the laura/add-configure-sso-component branch 6 times, most recently from 67fbe0d to bcc4254 Compare May 4, 2026 20:09
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from ff61174 to e8b8f9a Compare May 4, 2026 22:14
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from e8b8f9a to 18f5bfd Compare May 4, 2026 22:40
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from 7d5575c to 24fadad Compare May 5, 2026 01:01
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from 24fadad to e4b796e Compare May 5, 2026 01:04
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from e4b796e to 541f9aa Compare May 5, 2026 01:11
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from 541f9aa to b5e2c1a Compare May 5, 2026 01:14
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from b5e2c1a to 0caf48e Compare May 5, 2026 02:16
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from 0caf48e to 1db042b Compare May 5, 2026 02:20
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from 1db042b to 265c4b1 Compare May 5, 2026 02:28
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from c0e5daf to aa04cf0 Compare May 5, 2026 21:16
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@packages/ui/src/components/ConfigureSSO/ConfigureSSO.tsx`:
- Line 1: The import line in ConfigureSSO.tsx duplicates useUser, causing an
import/no-duplicates lint error; edit the import statement `import {
__internal_useUserEnterpriseConnections, useOrganization, useUser, useUser }
from '@clerk/shared/react';` to remove the second `useUser` so each symbol is
only listed once (keep `__internal_useUserEnterpriseConnections`,
`useOrganization`, and `useUser`).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 57d13034-c273-46f4-8e70-b521d99cd2d8

📥 Commits

Reviewing files that changed from the base of the PR and between 798ee78 and c0e5daf.

📒 Files selected for processing (2)
  • packages/ui/src/components/ConfigureSSO/ConfigureSSO.tsx
  • packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx

Comment thread packages/ui/src/components/ConfigureSSO/ConfigureSSO.tsx Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@packages/ui/src/components/ConfigureSSO/wizard/ConfigureSSOWizard.tsx`:
- Around line 180-181: The isFirstStep and isLastStep flags in
ConfigureSSOWizard.tsx are incorrectly computed to force nested wizards to never
be absolute-first/last by ANDing with !parentWizard; update the logic so
isFirstStep becomes (index <= 0) and isLastStep becomes (index ===
activeSteps.length - 1) regardless of parentWizard, while preserving any
existing local/relative navigation behavior elsewhere; adjust any places that
relied on the old flags (e.g., footer/navigation render) to respect the absolute
boundary flags so Previous/Next become no-op-disabled at true first/last
positions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 4d798647-9ece-48ff-86be-e806b52877e1

📥 Commits

Reviewing files that changed from the base of the PR and between c0e5daf and aa04cf0.

📒 Files selected for processing (4)
  • packages/ui/src/components/ConfigureSSO/ConfigureSSO.tsx
  • packages/ui/src/components/ConfigureSSO/ConfigureSSOContext.tsx
  • packages/ui/src/components/ConfigureSSO/steps/index.ts
  • packages/ui/src/components/ConfigureSSO/wizard/ConfigureSSOWizard.tsx

Comment thread packages/ui/src/components/ConfigureSSO/wizard/ConfigureSSOWizard.tsx Outdated
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from aa04cf0 to 8c7e926 Compare May 5, 2026 21:46
@LauraBeatris LauraBeatris force-pushed the laura/add-wizard-to-configure-sso branch from 8c7e926 to 551b23a Compare May 5, 2026 21:47
return;
}

if (noUserExists(this)) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this one that got missed on the first PR

Copy link
Copy Markdown
Member

@iagodahlem iagodahlem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The declarative shape is great 👏 — I think we still need some improvements to better structure it and separate the wizard responsibilities into more layers, so we can easily extract those components for reuse later, but I think it's good enough as it is for now and we can follow up. Just two small alignment items I'd flag for this PR before the bigger refactor lands as a follow-up:

  1. Flow.Part part= naming convention.
  2. isLoading flowing through ConfigureSSOFlowContext.

label='Configure'
>
<ConfigureSSOWizard>
{/* TODO: Implement configure steps */}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{/* TODO: Implement configure steps */}

>
<ConfigureSSOFlowProvider
enterpriseConnection={enterpriseConnection}
isLoading={isLoadingEnterpriseConnections}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think passing the initial isLoading down to the context and rendering it on the wizard might lead us to issues when invalidating the query, and also for instance, when we start determining the current step after a refresh I think it would be good to have the loading before the wizard even renders, so what do you think of lifting the initial loading state here to ConfigureSSO root? Something like:

const AuthenticatedContent = withCoreUserGuard(() => {
  const { data, isLoading } = __internal_useUserEnterpriseConnections({ enabled: true });
  
  if (isLoading && !data) {
    return <FullSpinner />;
  }
  
  return (
    // …existing layout…
    <ConfigureSSOFlowProvider enterpriseConnection={data?.[0]}>
      <ConfigureSSOSteps />
    </ConfigureSSOFlowProvider>
  );
});

Happy to take this as a separate PR if you'd rather keep this one tight.


export const TestConfigurationStep = (): JSX.Element => {
return (
<Flow.Part part='test-sso'>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the convention for Flow.Part part= is camelCase across Sign-In / Sign-Up / SessionTasks / UserVerification (phoneCode2Fa, alternativeMethods, enterpriseConnections, chooseOrganization, etc.). The four other ConfigureSSO steps already follow that — only test-sso here and sso-confirmation in ConfirmationStep are kebab-case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants