Repository navigation
feat: add PrefixProvider for content antd renders outside of Provider - #341
Merged
Merged
Conversation
Static antd calls such as notification and Modal.confirm of a different antd copy render their content in a separate React root. Components there lose the mll-ant prefix and get no CSS, since the library ships its styles only under that prefix. Wrapping such content in Provider would prefix it, but its locale mounts the global confirm locale and resets it to English on unmount. PrefixProvider sets only the prefix. 🤖 Generated with Claude Code
spawnia
approved these changes
Nov 4, 2026
sp3259
marked this pull request as ready for review
November 4, 2026 09:33
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
# [21.1.0](v21.0.2...v21.1.0) (2026-11-04) ### Features * add PrefixProvider for content antd renders outside of Provider ([#341](#341)) ([813181b](813181b))
|
🎉 This PR is included in version 21.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Static antd calls, such as
notificationandModal.confirmof a consumer's own antd copy, render their content in a separate React root.Library components there lose the
mll-antprefix, and since 21.0.1 nothing styles theirant-classes, so aSelectdropdown never hides after a selection.PrefixProvidersets only the prefix for such content.Wrapping such content in Provider resets the confirm locale to English on unmount
ProviderpasseslocaletoConfigProvider, whoseLocaleProvidersets the global confirm locale on mount and resets it on unmount.Each closed notification would therefore turn the buttons of every later
Modal.confirmwithout own texts into OK/Cancel.The new test
keeps the locale of a surrounding <Provider> once it unmountsfails withProviderin place ofPrefixProvider.For agents 🤖: draft, ready for review once the user agrees
notificationandmessagecalls in a merge request that waits for this release.yarn build.🤖 Generated with Claude Code