feat(ui): implement LocalizationProvider within Mosaic#8863
feat(ui): implement LocalizationProvider within Mosaic#8863alexcarpenter wants to merge 4 commits into
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| <MosaicProvider | ||
| localization={{ | ||
| overrides: { | ||
| organizationProfile: { | ||
| title: 'hello world', | ||
| }, | ||
| }, | ||
| }} | ||
| > |
There was a problem hiding this comment.
| <MosaicProvider | |
| localization={{ | |
| overrides: { | |
| organizationProfile: { | |
| title: 'hello world', | |
| }, | |
| }, | |
| }} | |
| > | |
| <MosaicProvider> |
Just demoing overrides in practice
Summary
@clerk/i18ninto the Mosaic design system as a peer dependencyMosaicProvider.tsxinto three focused providers underproviders/:appearance-provider.tsx,localization-provider.tsx, andmosaic-provider.tsxLocalizationProvider+useMessageshook — components pass a base message object and receive merged overrides from the nearest provideri18n-registry.tsas the central type registry for all Mosaic UI message namespacesorganization-profile.messages.tsas the first consumer (orgProfile AIO messages)StoryEmbed,StoryPreview) to wrap stories in the newMosaicProvidertreeStacking note
This branch targets
carp/i18n(PR #8861). After that PR squash-merges tomain, rebase this branch ontomainbefore merging — the single commit here touches onlypackages/uiandpackages/swingset, so the rebase will be conflict-free.Test plan
pnpm --filter=@clerk/i18n test— 104 tests passpnpm --filter=@clerk/ui test— no new failures vs base branch (pre-existing failures inConfigureSSO/OrganizationSecurityPageare unrelated)