feat: upgrade universal-components previews to react 3.1.2 - #1712
Merged
Conversation
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
grandmaester
marked this pull request as ready for review
August 12, 2026 16:33
4 tasks
agiannelli-auth0
previously approved these changes
Aug 12, 2026
Contributor
Summary
|
agiannelli-auth0
previously approved these changes
Aug 13, 2026
avanscoy
previously approved these changes
Aug 13, 2026
grandmaester
dismissed stale reviews from avanscoy and agiannelli-auth0
via
August 13, 2026 14:13
2427e04
avanscoy
approved these changes
Aug 13, 2026
agiannelli-auth0
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Upgrades the interactive component previews in
universal-components/from@auth0/universal-components-react2.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, sotscreports 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 installeddist/index.d.tsrather than trusting the build:UserMFAMgmtView→UserMFAManagementView(routecomponentKeyrename)DomainTableViewProps: flat → nested underdomainTableSsoProviderTableViewProps/SsoProviderEditViewProps:{ logic, handlers }→ flatSsoProviderCreateViewProps/OrganizationDetailsEditViewProps: verified unchangedSpinner- ComponentLoader self-contained to stop Spinner render errorsTwo latent defects found while validating the above
Both were pre-existing and would have failed at render, not at build:
refetchDomainsandrefetchProvidersare typed as a TanStack Queryrefetch, which must resolve a completeQueryObserverResult(26 fields —isError,isPending,status, …). Both mocks returned a bare{ data }, which throws as soon as the component destructures the result. Adds a sharedmockRefetchhelper insrc/mocks/query-result.ts.Domaininterface was looser than the realOrgDomain:status: stringinstead of the'failed' | 'pending' | 'verified'union, andverification_txt/verification_hostoptional whenOrgDomainrequires them — the two verified rows omitted them entirely.Dependency note
Adds
@tanstack/react-queryas an explicit dependency. The 3.x bundle imports it directly, so without it no preview mounts at all.Testing
Beyond the build, each reshaped mock was checked against the real contract with a temporary one-assertion-per-prop type file — the check
tsc -bcannot do throughany. 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 devand 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+ formint dev.Checklist
CONTRIBUTING.md.