Skip to content

feat(Upload): support classNames and styles for component and ConfigProvider - #52972

Merged
zombieJ merged 2 commits into
nextfrom
cp-upload
Mar 2, 2025
Merged

zombieJ merged 2 commits into
nextfrom
cp-upload

Conversation

@thinkasany

Copy link
Copy Markdown
Member

🤔 This is a ...

  • 🆕 New feature

📝 Change Log

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

@bolt-new-by-stackblitz

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Feb 26, 2025 •

Copy link
Copy Markdown
Contributor

👁 Visual Regression Report for PR #52972 Passed ✅

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

🎊 Congrats! No visual-regression diff found.

@github-actions

github-actions Bot commented Feb 26, 2025 •

Copy link
Copy Markdown
Contributor

Preview is ready

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Feb 26, 2025 •

Copy link
Copy Markdown

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: dfbbd3e
Status: ✅  Deploy successful!
Preview URL: https://41767056.ant-design.pages.dev
Branch Preview URL: https://cp-upload.ant-design.pages.dev

View logs

@petercat-assistant

Copy link
Copy Markdown

Walkthrough

This pull request introduces a new feature to the ConfigProvider component, allowing it to support classnames and styles for the Upload component. This enhancement provides developers with more flexibility in customizing the appearance of upload components within their applications.

Changes

Files Summary
components/config-provider/context.ts Added UploadConfig type to support classnames and styles for upload.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to reflect new classnames and styles support for upload.
components/upload/Upload.tsx Modified to use useComponentConfig for Upload component, integrating classnames and styles.
components/upload/UploadList/ListItem.tsx, components/upload/UploadList/index.tsx Enhanced to accept and apply classnames and styles for list items.
components/upload/tests/uploadlist.test.tsx Added tests to verify classnames and styles functionality.
components/upload/demo/_semantic.tsx Added a demo showcasing the semantic DOM structure with classnames and styles.
components/upload/index.en-US.md, components/upload/index.zh-CN.md Added Semantic DOM section to documentation.
components/upload/interface.ts Introduced SemanticName type and updated interfaces to include classnames and styles.

@github-actions

github-actions Bot commented Feb 26, 2025 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/antd.min.js 505.09 KB (+161 B 🔺)
dist/antd-with-locales.min.js 598.29 KB (+174 B 🔺)

@pkg-pr-new

pkg-pr-new Bot commented Feb 26, 2025 •

Copy link
Copy Markdown

@codecov

codecov Bot commented Feb 26, 2025 •

Copy link
Copy Markdown

Bundle Report

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

Detailed changes
Bundle name Size Change
antd.min-array-push 3.89MB -7.79MB (-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

@thinkasany thinkasany mentioned this pull request Feb 26, 2025
@codecov

codecov Bot commented Feb 26, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (05468b7) to head (dfbbd3e).
Report is 2 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52972   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          766       766           
  Lines        13775     13776    +1     
  Branches      3615      3615           
=========================================
+ Hits         13775     13776    +1     

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

@thinkasany
thinkasany force-pushed the cp-upload branch 2 times, most recently from 9a65025 to d5de3bb Compare February 27, 2025 14:17
zombieJ
zombieJ previously approved these changes Feb 28, 2025
@zombieJ
zombieJ merged commit 2055bcf into next Mar 2, 2025
@zombieJ
zombieJ deleted the cp-upload branch March 2, 2025 09:59
@Wxh16144 Wxh16144 changed the title feat: ConfigProvider support classnames and styles for upload feat(Upload): 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