Skip to content

Comments

feat(Mentions): support classNames and styles for component and ConfigProvider#52961

Merged
zombieJ merged 6 commits intonextfrom
cp-mention
Feb 28, 2025
Merged

feat(Mentions): support classNames and styles for component and ConfigProvider#52961
zombieJ merged 6 commits intonextfrom
cp-mention

Conversation

@thinkasany
Copy link
Member

@thinkasany thinkasany commented Feb 25, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

wait for react-component/mentions#289

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support classnames and styles for mentions
🇨🇳 Chinese feat: ConfigProvider support classnames and styles for mentions

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2025

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2025

👁 Visual Regression Report for PR #52961 Passed ✅

🎯 Target branch: next (ab4f326)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

@petercat-assistant
Copy link

Walkthrough

This pull request introduces a new feature to the ConfigProvider, allowing it to support classnames and styles for mentions. This enhancement enables developers to customize the appearance of mentions more flexibly by using additional properties like classNames and styles.

Changes

Files Summary
components/config-provider/context.ts Updated MentionsConfig type to include classNames and styles.
components/mentions/demo/_semantic.tsx Added a new demo file showcasing semantic DOM usage with mentions.
components/mentions/index.en-US.md, components/mentions/index.zh-CN.md Added a section for Semantic DOM with a code example.
components/mentions/index.tsx Modified MentionProps to include classNames and styles, and updated component logic to utilize these new properties.

@thinkasany thinkasany mentioned this pull request Feb 25, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2025

size-limit report 📦

Path Size
dist/antd.min.js 504.93 KB (+82 B 🔺)
dist/antd-with-locales.min.js 598.13 KB (+98 B 🔺)

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 25, 2025

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 04a7281
Status: ✅  Deploy successful!
Preview URL: https://b9aba568.ant-design.pages.dev
Branch Preview URL: https://cp-mention.ant-design.pages.dev

View logs

@socket-security
Copy link

socket-security bot commented Feb 27, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 6.27 kB types
npm/@types/[email protected] None 0 23.3 kB types
npm/[email protected] filesystem +13 382 kB mrmlnc
npm/[email protected]3.5.2 None 0 7.88 MB azz, duailibe, fisker, ...8 more
npm/[email protected] None 0 2.05 MB rundevelopment
npm/[email protected] None 0 0 B

🚮 Removed packages: npm/@types/[email protected], npm/[email protected]

View full report↗︎

@codecov
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (next@ab4f326). Learn more about missing BASE report.
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff            @@
##             next    #52961   +/-   ##
========================================
  Coverage        ?   100.00%           
========================================
  Files           ?       766           
  Lines           ?     13775           
  Branches        ?      3615           
========================================
  Hits            ?     13775           
  Misses          ?         0           
  Partials        ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2025

Open in Stackblitz

More templates

npm i https://pkg.pr.new/ant-design/ant-design/antd@52961

commit: 04a7281

@codecov
Copy link

codecov bot commented Feb 27, 2025

Bundle Report

Changes will decrease total bundle size by 7.78MB (-66.67%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.89MB -7.78MB (-66.67%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js (New) 2.14MB 2.14MB 100.0% 🚀
antd.min.js (New) 1.76MB 1.76MB 100.0% 🚀
antd-with-locales.js (Deleted) -6.14MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -5.54MB 0 bytes -100.0% 🗑️

Files in antd-with-locales.min.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

Files in antd.min.js:

  • ./components/config-provider/context.ts → Total Size: 1.51kB

@zombieJ zombieJ self-assigned this Feb 28, 2025
@zombieJ zombieJ merged commit 05468b7 into next Feb 28, 2025
42 checks passed
@zombieJ zombieJ deleted the cp-mention branch February 28, 2025 09:40
@Wxh16144 Wxh16144 changed the title feat: ConfigProvider support classnames and styles for mentions feat(Mentions): support classNames and styles for component and ConfigProvider Nov 28, 2025
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.

2 participants