Skip to content

Conversation

thinkasany
Copy link
Member

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

🔗 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 feat: ConfigProvider support classNames and styles for Result
🇨🇳 Chinese feat: ConfigProvider 支持 Result 组件的classNames 和styles 配置

Copy link

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

Copy link
Contributor

github-actions bot commented Dec 30, 2024

👁 Visual Regression Report for PR #52171 Passed ✅

🎯 Target branch: next (89c1a05)
📖 View Full Report ↗︎

🎊 Congrats! No visual-regression diff found.

Copy link
Contributor

github-actions bot commented Dec 30, 2024

Preview is ready

Copy link

Walkthrough

This pull request introduces a new feature to the ConfigProvider component, allowing it to support classNames and styles for the Result component. This enhancement provides developers with more flexibility in customizing the appearance of the Result component by specifying custom class names and styles.

Changes

Files Changed Summary
components/config-provider/context.ts Added ResultConfig type to support classNames and styles for Result.
components/config-provider/index.en-US.md Updated documentation to include classNames and styles for Result.
components/config-provider/index.zh-CN.md Updated Chinese documentation to include classNames and styles for Result.
components/result/tests/index.test.tsx Added tests to verify custom styles and class names are applied to Result.
components/result/demo/_semantic.tsx Added a new demo showcasing semantic DOM usage for Result.
components/result/index.en-US.md Added semantic DOM section to English documentation.
components/result/index.tsx Enhanced Result component to accept classNames and styles props.
components/result/index.zh-CN.md Added semantic DOM section to Chinese documentation.

@@ -52,14 +68,13 @@ const ExceptionStatus = Object.keys(ExceptionMap);
*/

interface IconProps {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IconProps interface has been modified to replace prefixCls with className and added an optional style property. Ensure that all usages of IconProps are updated accordingly to prevent potential runtime errors.

Copy link

pkg-pr-new bot commented Dec 30, 2024

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (89c1a05) to head (1523cf8).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52171   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          763       763           
  Lines        13643     13650    +7     
  Branches      3561      3563    +2     
=========================================
+ Hits         13643     13650    +7     

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

subTitle: '副标题元素',
body: '内容元素',
extra: '额外元素',
image: '图标元素',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个应该是 icon?

Copy link

codecov bot commented Dec 30, 2024

Bundle Report

Changes will increase total bundle size by 5.08kB (0.15%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.38MB 5.08kB (0.15%) ⬆️

);

const bodyClassNames = classNames(
`${prefixCls}-content`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里也要变成 body,否则会让人疑惑的。挪到 next 里吧。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@thinkasany thinkasany changed the base branch from feature to next December 30, 2024 11:02
@thinkasany thinkasany requested a review from zombieJ December 30, 2024 11:58
);

const bodyClassNames = classNames(
`${prefixCls}-body`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这边替换后,style/index.ts 里的没有替换。

@zombieJ zombieJ merged commit 6f2b330 into ant-design:next Dec 31, 2024
37 checks passed
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