ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
93.72k stars 51.17k forks source link

type: improve for semantic #52656

Closed thinkasany closed 1 week ago

thinkasany commented 1 week ago

中文版模板 / Chinese template

🤔 This is a ...

🔗 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 type: improve for semantic
🇨🇳 Chinese type: 语义化类型优化
stackblitz[bot] commented 1 week ago

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

github-actions[bot] commented 1 week ago

👁 Visual Regression Report for PR #52656 Failed ❌

🎯 Target branch: next (26234bcd029090ad0b0c834806c4313676daac9d) 📖 View Full Report ↗︎ 📊 Summary: 🔄 131 changed

Expected (Branch next) Actual (Current PR) Diff
card-component-token.compact.png card-component-token.compact.png card-component-token.compact.png card-component-token.compact.png
card-component-token.compact.png card-component-token.compact.png card-component-token.compact.css-var.png card-component-token.compact.css-var.png
card-component-token.dark.png card-component-token.dark.png card-component-token.dark.png card-component-token.dark.png
card-component-token.dark.png card-component-token.dark.png card-component-token.dark.css-var.png card-component-token.dark.css-var.png
card-component-token.default.png card-component-token.default.png card-component-token.default.png card-component-token.default.png
card-component-token.default.png card-component-token.default.png card-component-token.default.css-var.png card-component-token.default.css-var.png
card-tabs.compact.png card-tabs.compact.png card-tabs.compact.png card-tabs.compact.png
card-tabs.compact.png card-tabs.compact.png card-tabs.compact.css-var.png card-tabs.compact.css-var.png

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


[!IMPORTANT] There are 131 diffs found in this PR: 🔄 131 changed. Please check all items:

  • [x] Checked all diffs in the full report
  • [x] Visual diff is acceptable
github-actions[bot] commented 1 week ago

Preview is ready

petercat-assistant[bot] commented 1 week ago

Walkthrough

This pull request improves TypeScript definitions by introducing semantic naming for classNames and styles in the Result and Space components. This change enhances the semantic clarity and maintainability of the code.

Changes

Files Summary
components/result/index.tsx, components/space/index.tsx Introduced SemanticName type for semantic naming of classNames and styles, replacing previous object structures with Partial<Record<SemanticName, ...>> for better semantic clarity.
github-actions[bot] commented 1 week ago

size-limit report 📦

Path Size
dist/antd.min.js 499.44 KB
dist/antd-with-locales.min.js 568.04 KB
pkg-pr-new[bot] commented 1 week ago

Open in Stackblitz

More templates

- [farm-normal](https://pkg.pr.new/template/42b9bbc1-ef02-4566-be5f-9e079b5d70a3) - [rsbuild-normal](https://pkg.pr.new/template/6c31594d-9d2e-492d-99b3-1864f09fd679) - [vite-normal](https://pkg.pr.new/template/129923a6-5708-4f9e-9418-bc85f79932cf) - [umi-normal](https://pkg.pr.new/template/9084cd47-0626-4a85-9374-b82fdf3b265a) - [vite-practice](https://pkg.pr.new/template/c2f559ae-d29b-41f6-ac7c-2d44187630e8) - [with-nextjs-app-router-inline-style](https://pkg.pr.new/template/a4bf2207-9d79-46cd-9c03-5ebb61c5e794) - [with-nextjs-extract-style](https://pkg.pr.new/template/fe054341-cedc-4092-bd44-1bd73b742da1) - [with-nextjs-generate-css-on-demand](https://pkg.pr.new/template/53940ec1-ca71-4525-bdab-011500da5911) - [with-nextjs-inline-style](https://pkg.pr.new/template/287740f5-aa19-464e-987b-6dfeca0b57eb)

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

commit: 1e8f6a6

cloudflare-workers-and-pages[bot] commented 1 week ago

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e8f6a6
Status: ✅  Deploy successful!
Preview URL: https://11d9ad53.ant-design.pages.dev
Branch Preview URL: https://type-improve.ant-design.pages.dev

View logs

thinkasany commented 1 week ago

现在ci是next分支都坏了,默认升级了 @rc-component/table。 image

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (b9e3fb8) to head (1e8f6a6). Report is 4 commits behind head on next.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #52656 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 765 765 Lines 13738 13738 Branches 3578 3578 ========================================= Hits 13738 13738 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.