Skip to content

Conversation

thinkasany
Copy link
Member

🤔 This is a ...

  • 🆕 New feature
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support classname and style for watermark
🇨🇳 Chinese feat: ConfigProvider support classname and style for watermark

Copy link

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

Copy link
Contributor

github-actions bot commented Feb 14, 2025

👁 Visual Regression Report for PR #52811 Failed ❌

🎯 Target branch: next (a963f00)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 2 changed

Expected (Branch next) Actual (Current PR) Diff
input-group.compact.png input-group.compact.png input-group.compact.css-var.png input-group.compact.css-var.png
input-otp.compact.png input-otp.compact.png input-otp.compact.css-var.png input-otp.compact.css-var.png

Important

There are 2 diffs found in this PR: 🔄 2 changed.
Please check all items:

  • Visual diff is acceptable

Copy link
Contributor

github-actions bot commented Feb 14, 2025

Preview failed

Copy link

Walkthrough

This pull request introduces a new feature to the ConfigProvider component, allowing it to support className and style properties specifically for the Watermark component. This enhancement enables developers to customize the appearance of watermarks more flexibly within the Ant Design framework.

Changes

Files Changed Summary
components/config-provider/tests/style.test.tsx Added tests to verify that className and style properties work correctly with the Watermark component.
components/config-provider/context.ts Added watermark to the ComponentStyleConfig interface.
components/config-provider/index.tsx Integrated watermark into the ConfigProvider props and context.
components/watermark/index.tsx Modified to utilize useComponentConfig for applying className and style from context.

Copy link
Contributor

size-limit report 📦

Path Size
dist/antd.min.js 509.09 KB (+30 B 🔺)
dist/antd-with-locales.min.js 596.53 KB (+41 B 🔺)

Copy link

codecov bot commented Feb 14, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
antd.min-array-push 3.75MB -7.9MB (-67.8%) ⬇️

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.03MB 2.03MB 100.0% 🚀
antd.min.js (New) 1.72MB 1.72MB 100.0% 🚀
antd-with-locales.js (Deleted) -6.08MB 0 bytes -100.0% 🗑️
antd.js (Deleted) -5.57MB 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

Copy link

pkg-pr-new bot commented Feb 14, 2025

Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: ce43dcf
Status: ✅  Deploy successful!
Preview URL: https://92784817.ant-design.pages.dev
Branch Preview URL: https://cp-watermark.ant-design.pages.dev

View logs

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a963f00) to head (ce43dcf).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52811   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          765       765           
  Lines        13798     13799    +1     
  Branches      3616      3616           
=========================================
+ Hits         13798     13799    +1     

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

@thinkasany thinkasany merged commit 676ccd5 into next Feb 14, 2025
46 checks passed
@thinkasany thinkasany deleted the cp-watermark branch February 14, 2025 10:12
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