Skip to content

feat: upgrade universal-components previews to react 3.1.2 - #1712

Merged
grandmaester merged 3 commits into
mainfrom
feat/uc-3.1.2-upgrade
Aug 13, 2026
Merged

feat: upgrade universal-components previews to react 3.1.2#1712
grandmaester merged 3 commits into
mainfrom
feat/uc-3.1.2-upgrade

Conversation

@grandmaester

@grandmaester grandmaester commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Upgrades the interactive component previews in universal-components/ from @auth0/universal-components-react 2.0.1 to 3.1.2, and reshapes the preview mocks that 3.x broke.

This is split out of #1697 so the library upgrade can be reviewed and merged on its own, separately from the Member Management docs work that depends on it.

Why the mocks had to change

Preview mocks are any-typed, so tsc reports nothing when a View's prop contract changes — a stale mock type-checks and then renders blank or throws at runtime. Each mock was diffed against the installed dist/index.d.ts rather than trusting the build:

  • UserMFAMgmtViewUserMFAManagementView (route componentKey rename)
  • DomainTableViewProps: flat → nested under domainTable
  • SsoProviderTableViewProps / SsoProviderEditViewProps: { logic, handlers } → flat
  • SsoProviderCreateViewProps / OrganizationDetailsEditViewProps: verified unchanged
  • Spinner - ComponentLoader self-contained to stop Spinner render errors

Two latent defects found while validating the above

Both were pre-existing and would have failed at render, not at build:

  • refetchDomains and refetchProviders are typed as a TanStack Query refetch, which must resolve a complete QueryObserverResult (26 fields — isError, isPending, status, …). Both mocks returned a bare { data }, which throws as soon as the component destructures the result. Adds a shared mockRefetch helper in src/mocks/query-result.ts.
  • The domain mock's local Domain interface was looser than the real OrgDomain: status: string instead of the 'failed' | 'pending' | 'verified' union, and verification_txt / verification_host optional when OrgDomain requires them — the two verified rows omitted them entirely.

Dependency note

Adds @tanstack/react-query as an explicit dependency. The 3.x bundle imports it directly, so without it no preview mounts at all.

Testing

cd universal-components
pnpm install
pnpm tsc -b && pnpm lint && pnpm build   # all pass

Beyond the build, each reshaped mock was checked against the real contract with a temporary one-assertion-per-prop type file — the check tsc -b cannot do through any. All six component keys and their View symbols are confirmed present in the rebuilt bundle (1.0.20 → 1.0.21).

Then cd main && mint dev and load the five existing component pages (domain table, SSO provider table/create/edit, organization details, user MFA) to confirm each preview still renders and its modals behave as before. Requires Node 20.19+ for mint dev.

Checklist

  • I've read and followed CONTRIBUTING.md.
  • I've tested the site build for this change locally.
  • I've made appropriate docs updates for any code or config changes.
  • I've coordinated with the Product Docs and/or Docs Management team about non-trivial changes.

@grandmaester
grandmaester requested a review from a team as a code owner August 12, 2026 15:11
@grandmaester grandmaester self-assigned this Aug 12, 2026
@grandmaester
grandmaester marked this pull request as draft August 12, 2026 15:12
@mintlify

mintlify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0 🟢 Ready View Preview Aug 12, 2026, 10:05 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0-docs-dev 🟢 Ready View Preview Aug 12, 2026, 10:08 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
auth0-docs-staging 🟢 Ready View Preview Aug 12, 2026, 10:05 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@grandmaester
grandmaester marked this pull request as ready for review August 12, 2026 16:33
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Status Count
🔍 Total 6
✅ Successful 0
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 6
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0
Full Github Actions output

avanscoy
avanscoy previously approved these changes Aug 13, 2026
@grandmaester
grandmaester merged commit 008ceaf into main Aug 13, 2026
5 checks passed
@grandmaester
grandmaester deleted the feat/uc-3.1.2-upgrade branch August 13, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants