Skip to content

Iago/configure sso layers#8493

Draft
iagodahlem wants to merge 10 commits intomainfrom
iago/configure-sso-layers
Draft

Iago/configure sso layers#8493
iagodahlem wants to merge 10 commits intomainfrom
iago/configure-sso-layers

Conversation

@iagodahlem
Copy link
Copy Markdown
Member

Description

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:

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 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 7, 2026 2:20am

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

⚠️ No Changeset found

Latest commit: 552009b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

iagodahlem added 9 commits May 6, 2026 17:27
…rActions context

Adds a parallel wizard primitive at packages/ui/src/components/ConfigureSSO/elements/Wizard/,
copied verbatim from packages/ui/src/components/ConfigureSSO/wizard/, then refactored:

- Renamed exports from ConfigureSSOWizard / useConfigureSSOWizard to Wizard / useWizard.
- Split FooterActionsContext from WizardContext. WizardContext owns navigation only
  (activeSteps, currentStep, goNext, goPrev, isLoading). FooterActionsContext owns
  step-action registration (continueAction, setContinueAction, chrome stack registry).
- Stripped UI from the Wizard root: removed Header, Footer, StepIndicator, Body, and
  helpers. Wizard now provides context + step extraction + active-step rendering only.
  Header and Footer will be added back as ConfigureSSO layout components in a follow-up.
- Preserved nested-wizard URL scoping via Option (a): the Wizard root keeps a Switch
  with a Route per step, so each Route children get a scoped RouteContext for nested
  wizards. Step itself stays a null-returning descriptor (its children are harvested
  by extractSteps and rendered inside the Switch). This stays close to the existing
  shape and avoids requiring a free-floating Route from Step.

Laura's existing wizard/ folder is untouched and still in use by ConfigureSSO.tsx.
The new elements/Wizard/ is dormant until ConfigureSSO.tsx switches over in a later
commit.
The Wizard primitive renders step children directly inside each Route, with
no Col wrapper and no element descriptors. Layout sizing belongs to the
host's ConfigureSSO layout component, and per-step descriptors belong to
each step's own root element — neither is the wizard's concern.
Extracts the numbered breadcrumb rendering from the existing wizard
Header into a presentational primitive at packages/ui/src/components/
ConfigureSSO/elements/Breadcrumbs/. The primitive takes items,
currentIndex, and onItemClick — no awareness of the wizard or its
context. Wires existing element descriptors (configureSSOWizardHeader*)
through to the same DOM elements they covered in the old Header.
Replaces the items/currentIndex prop pair with `<Breadcrumbs.Item>`
children and a `currentId` prop on the parent. Mirrors the pattern
used by `<Wizard>` / `<Wizard.Step>` in the same component folder.
Breadcrumbs walks its children via an extractItems helper (with
fragment support) and computes the active index from `currentId`
internally. Reachability logic, element descriptors, and the visual
rendering are unchanged.
Adds three new top-level components under packages/ui/src/components/
ConfigureSSO/ that consume the wizard primitive and the breadcrumbs
primitive:

- ConfigureSSOLayout: ProfileCard shell with the navbar sidebar and a
  body Col that owns the flex sizing for the wizard's step output.
- ConfigureSSOHeader: thin wrapper that drives the declarative
  Breadcrumbs primitive from the wizard's active steps + currentStep.
- ConfigureSSOFooter: shared Previous / Continue footer that
  dispatches to the deepest mounted wizard via the FooterActions
  context registry.

Nothing wires these in yet — that swap lands in a follow-up commit.
Removes the shared StepLayout wrapper from each step file and inlines
the header (Heading + subtitle) plus body Col directly. Each step now
owns its own visual chrome:

- ProvideEmailStep, VerifyDomainStep, ConfigureCreateAppStep,
  TestConfigurationStep render their own header row and body.
- ConfirmationStep drops the header entirely per the Figma design.

Step files also switch wizard hook imports from the old wizard/ folder
to the new elements/Wizard/ primitive, and each step attaches its own
configureSSOWizardBody descriptor at its outermost rendered element.

Flow.Part does not accept elementDescriptor / elementId props, so each
step uses the fallback shape: a Col wrapper inside Flow.Part carries
the descriptor. The wrapper Col keeps flex: 1 / minHeight: 0 so the
inner body Col's flex: 1 / overflowY: auto continues to size against
the layout's flex column context.

useRegisterContinueAction usage is unchanged in this commit; the move
to a Wizard.Step canContinue prop lands separately. The shared
StepLayout file is left on disk (no more imports) and gets removed in
a final cleanup commit.
Wires the new ConfigureSSO surface into the layered components shipped
in the previous commits:

- ConfigureSSO.tsx adopts the new shape — Flow.Part wrap inside
  Flow.Root for convention parity with OrganizationProfile, an initial
  load gate at the root that returns a centered spinner inside
  ConfigureSSOLayout, and a FooterActionsProvider wrap around the
  layout. The inline ProfileCard / NavBar / Col chrome moves out;
  ConfigureSSOLayout owns it now.
- ConfigureSSOSteps switches its wizard imports from the old wizard/
  folder to the new elements/Wizard/ primitive. The declarative step
  tree shape is preserved.
- isLoading is lifted out of ConfigureSSOFlowContext and out of the
  wizard's context value. The root-level gate handles initial loading;
  subsequent re-fetches no longer flip the wizard into a loading state
  in context. ConfigureSSOFooter drops the isLoading-driven disable.
- The Wizard primitive no longer imports useConfigureSSOFlow — it's a
  fully generic primitive at the navigation layer now.
- The unused legacy wizard folder also drops its isLoading reads
  (spinner branch in Body, skeleton in Header, force-disable in
  Footer) so the typechecker stays clean while it sits on disk.

The old wizard/ folder is unused after this commit but stays on disk
for a final cleanup commit.
Replaces the route-based wizard primitive with a state-driven version:

- Wizard renders {children} directly. Header, Footer, and step
  descriptors all render as siblings inside the wizard scope. The
  Switch / Route / useRouter routing layer is gone.
- Wizard.Step is a self-rendering component now: it registers itself
  with the parent wizard via useLayoutEffect on mount, then renders
  its children only when its id matches the wizard's currentStep.
  Inactive steps render null.
- Active-step state is internal — first registered step becomes the
  default; goNext / goPrev / goToStep mutate that state. Nested
  wizards still bubble to parent.goNext on inner-last-step continue.
- Step descriptors no longer carry a path; navigation is purely by id.
- Footer now reads the deepest wizard's value from reactive context
  state (not a ref), so navigation inside a nested wizard re-renders
  the Footer and isFirstStep / isLastStep stay in sync.

Also picks up earlier in-flight work in ConfigureSSO: rename
ConfigureSSOLayout to ConfigureSSOCard (the inner Col flex wrapper
was dropped — the body Col on the card scrollbox owns sizing now),
and Header / Steps / Footer mount as siblings inside the wizard
scope so the breadcrumb and footer chrome render alongside the
active step body.
Splits the navbar chrome into ConfigureSSONavbar so the layout
composition is more readable. Adds a ConfigureSSOSkeleton that
mirrors the live shell — breadcrumb placeholders, centered content
spinner, disabled footer buttons — used by the initial-load gate.

Drops the orphaned ConfigureSSOCard (replaced by inline
ProfileCard.Root + the new navbar component). Adjusts breadcrumb
bullet sizing and the separator caret to match the latest visual
direction.
- Add elements/ProfileCard with ProfileCardHeader + ProfileCardFooter
  primitives (semantic <header>/<footer>, border + padding chrome).
- ConfigureSSOHeader, ConfigureSSOFooter, and ConfigureSSOSkeleton
  wrap their content in the new primitives instead of inlining the
  Flex chrome.
- Breadcrumbs primitive trimmed: outer Flex no longer renders its
  own border / padding (lives in ProfileCardHeader now). Bullet
  refined — neutralAlpha400 background, foreground-on-completed
  label color, white check, number wrapped in Text for color
  contrast. Descriptor placement flagged with TODOs for the
  cleanup sweep.
- Wrap the wizard tree in ConfigureSSOFlowProvider so steps can
  read enterpriseConnection state.
- VerifyDomainStep's placeholder isDisabled commented out for
  manual step-navigation testing until verification ships.
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.

1 participant