Skip to content

feat: add PrefixProvider for content antd renders outside of Provider - #341

Merged
sp3259 merged 1 commit into
masterfrom
prefix-provider
Nov 4, 2026
Merged

sp3259 merged 1 commit into
masterfrom
prefix-provider

Conversation

@sp3259

@sp3259 sp3259 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Static antd calls, such as notification and Modal.confirm of a consumer's own antd copy, render their content in a separate React root.
Library components there lose the mll-ant prefix, and since 21.0.1 nothing styles their ant- classes, so a Select dropdown never hides after a selection.
PrefixProvider sets only the prefix for such content.

Wrapping such content in Provider resets the confirm locale to English on unmount

Provider passes locale to ConfigProvider, whose LocaleProvider sets the global confirm locale on mount and resets it on unmount.
Each closed notification would therefore turn the buttons of every later Modal.confirm without own texts into OK/Cancel.
The new test keeps the locale of a surrounding <Provider> once it unmounts fails with Provider in place of PrefixProvider.

For agents 🤖: draft, ready for review once the user agrees
  • Consumer: limes-frontend wraps the content of its antd 3 notification and message calls in a merge request that waits for this release.
  • Checked locally: lint, typecheck, all 204 jest tests, yarn build.
  • Not checked: Storybook.

🤖 Generated with Claude Code

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
@sp3259
sp3259 requested a review from spawnia November 4, 2026 08:58
@sp3259
sp3259 marked this pull request as ready for review November 4, 2026 09:33
@sp3259
sp3259 merged commit 813181b into master Nov 4, 2026
10 checks passed
@sp3259
sp3259 deleted the prefix-provider branch November 4, 2026 09:34
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))
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 21.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants