Skip to content

feat: use cssVar by default#52671

Merged
MadCcc merged 24 commits intonextfrom
feat/cssVar
Feb 24, 2025
Merged

feat: use cssVar by default#52671
MadCcc merged 24 commits intonextfrom
feat/cssVar

Conversation

@MadCcc
Copy link
Member

@MadCcc MadCcc commented Feb 6, 2025

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English Use CSS variables by default
🇨🇳 Chinese 默认使用 CSS 变量

@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 6, 2025

Preview is ready

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2025

👁 Visual Regression Report for PR #52671 Failed ❌

🎯 Target branch: next (e9fa1ab)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎
📊 Summary: 🔄 15 changed, 🛑 2643 removed

Expected (Branch next) Actual (Current PR) Diff
affix-basic.compact.css-var.png affix-basic.compact.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-basic.dark.css-var.png affix-basic.dark.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-basic.default.css-var.png affix-basic.default.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-debug.compact.css-var.png affix-debug.compact.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-debug.dark.css-var.png affix-debug.dark.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-debug.default.css-var.png affix-debug.default.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-on-change.compact.css-var.png affix-on-change.compact.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨
affix-on-change.dark.css-var.png affix-on-change.dark.css-var.png ⛔️⛔️⛔️ Missing ⛔️⛔️⛔️ 🚨🚨🚨 Removed 🚨🚨🚨

Warning

There are more diffs not shown in the table. Please check the Full Report for details.


Important

There are 2658 diffs found in this PR: 🔄 15 changed, 🛑 2643 removed.
Please check all items:

  • Checked all diffs in the full report
  • Visual diff is acceptable

@petercat-assistant
Copy link

Walkthrough

This pull request refactors the codebase to use CSS variables by default, removing the previous wrapCSSVar method. It updates multiple components to directly apply styles using CSS variables, enhancing maintainability and consistency across the project.

Changes

Files Summary
.dumi/theme/builtins/DemoWrapper/index.tsx Removed ConfigProvider wrapping DumiDemoGrid.
components/* Replaced [wrapCSSVar, hashId, cssVarCls] with [hashId, cssVarCls] and removed wrapCSSVar in return statements.
components/config-provider/hooks/useTheme.ts Replaced useThemeKey with useId for generating unique keys.
components/theme/context.ts Changed default hashed value to false.
components/theme/useToken.ts Updated cssVar handling to use mergedCssVar.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2025

size-limit report 📦

Path Size
dist/antd.min.js 509.57 KB (-1.51 KB 🔽)
dist/antd-with-locales.min.js 597.01 KB (-1.96 KB 🔽)

@cloudflare-workers-and-pages
Copy link

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

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: e2777e0
Status: ✅  Deploy successful!
Preview URL: https://401b25b1.ant-design.pages.dev
Branch Preview URL: https://feat-cssvar.ant-design.pages.dev

View logs

@socket-security
Copy link

socket-security bot commented Feb 6, 2025

Updated and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@ant-design/cssinjs-utils@2.0.0-alpha.1 🔁 npm/@ant-design/cssinjs-utils@1.1.3 None 0 89.4 kB afc163, arvinxx, blueboylijian, ...5 more
npm/antd-token-previewer@3.0.0-alpha.0 🔁 npm/antd-token-previewer@2.0.8 None 0 1.21 MB madccc

🚮 Removed packages: npm/p-all@5.0.0, npm/package-manager-detector@0.2.9

View full report↗︎

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 11, 2025

@codecov
Copy link

codecov bot commented Feb 11, 2025

Bundle Report

Changes will decrease total bundle size by 25.43kB (-0.22%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 11.62MB -25.43kB (-0.22%) ⬇️

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.js -12.71kB 6.06MB -0.21%
antd.js -12.71kB 5.56MB -0.23%

@li-jia-nan li-jia-nan mentioned this pull request Feb 20, 2025
16 tasks
@codecov
Copy link

codecov bot commented Feb 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e9fa1ab) to head (e2777e0).
Report is 15 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52671   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          767       765    -2     
  Lines        13813     13758   -55     
  Branches      3620      3609   -11     
=========================================
- Hits         13813     13758   -55     

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

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: a659423
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9d2d81
Status:⚡️  Build in progress...

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: a9d2d81
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: d848e2a
Status:⚡️  Build in progress...

View logs

li-jia-nan
li-jia-nan previously approved these changes Feb 21, 2025
@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: d848e2a
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: f192a29
Status:⚡️  Build in progress...

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: f192a29
Status: ✅  Deploy successful!
Preview URL: https://b69b78de.ant-design.pages.dev
Branch Preview URL: https://feat-cssvar.ant-design.pages.dev

View logs

li-jia-nan
li-jia-nan previously approved these changes Feb 21, 2025
@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: b2fc232
Status:⚡️  Build in progress...

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 380eeb1
Status:⚡️  Build in progress...

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 380eeb1
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: b2fc232
Status: ✅  Deploy successful!
Preview URL: https://0dc23618.ant-design.pages.dev
Branch Preview URL: https://feat-cssvar.ant-design.pages.dev

View logs

@MadCcc MadCcc merged commit 1ac0bca into next Feb 24, 2025
42 checks passed
@MadCcc MadCcc deleted the feat/cssVar branch February 24, 2025 07:35
@li-jia-nan
Copy link
Member

终于合进去了🎉

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.

3 participants