Skip to content

Conversation

thinkasany
Copy link
Member

@thinkasany thinkasany commented Dec 26, 2024

🤔 This is a ...

  • 🆕 New feature

讨论结果

修正 dom 结构,尊重语义化结构规范, 改为 header 包裹 title的形式,纠正进 next 分支,v5 不允许 breakchange。

🔗 Related

语义化基本复用 #51885

但是 title 确实需要斟酌,符合 原有的 classname 的 title。

不过 modal 组件是因为本身dom那层的classname就命名为header,所以感觉可以启用 title , 待讨论。

这边的坑是: title 和 header的区别是: 是否包含 padding, 但是这边来了个 margin-bottom

image

image
image

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support classNames and styles for Statistic
🇨🇳 Chinese feat: ConfigProvider 支持 Statistic 组件配置 classNamesstyles

Copy link

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

Copy link
Contributor

github-actions bot commented Dec 26, 2024

👁 Visual Regression Report for PR #52141 Failed ❌

🎯 Target branch: next (8e8f4e7)
📖 View Full Report ↗︎

Expected (Branch next) Actual (Current PR) Diff
auto-complete-uncertain-category.compact.png auto-complete-uncertain-category.compact.png auto-complete-uncertain-category.compact.png auto-complete-uncertain-category.compact.png
auto-complete-uncertain-category.compact.png auto-complete-uncertain-category.compact.png auto-complete-uncertain-category.compact.css-var.png auto-complete-uncertain-category.compact.css-var.png
avatar-dynamic.compact.png avatar-dynamic.compact.png avatar-dynamic.compact.png avatar-dynamic.compact.png
avatar-dynamic.compact.png avatar-dynamic.compact.png avatar-dynamic.compact.css-var.png avatar-dynamic.compact.css-var.png
badge-change.compact.png badge-change.compact.png badge-change.compact.png badge-change.compact.png
badge-change.compact.png badge-change.compact.png badge-change.compact.css-var.png badge-change.compact.css-var.png
button-color-variant.compact.png button-color-variant.compact.png button-color-variant.compact.png button-color-variant.compact.png
button-color-variant.compact.png button-color-variant.compact.png button-color-variant.compact.css-var.png button-color-variant.compact.css-var.png

Warning

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


Important

There are 359 diffs found in this PR: 🔄 323 changed, 🆕 36 added.
Please check all items:

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

Copy link
Contributor

github-actions bot commented Dec 26, 2024

Preview is ready

Copy link

Walkthrough

This pull request introduces a new feature that allows the ConfigProvider to support classNames and styles for the Statistic component. This enhancement provides more flexibility in styling and customizing the appearance of the Statistic component.

Changes

File Summary
components/config-provider/context.ts Added StatisticConfig to support classNames and styles for the Statistic component.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to reflect the new classNames and styles support for Statistic.
components/statistic/Statistic.tsx Implemented classNames and styles properties in the Statistic component.
components/statistic/tests/index.test.tsx Added tests to verify custom styles and class names for the Statistic component.
components/statistic/demo/_semantic.tsx Added a demo showcasing the semantic DOM structure for the Statistic component.
components/statistic/index.en-US.md, components/statistic/index.zh-CN.md Updated documentation to include semantic DOM information for the Statistic component.

};
styles?: {
root?: React.CSSProperties;
content?: React.CSSProperties;

Choose a reason for hiding this comment

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

Ensure that the styles object is properly validated to prevent potential security risks such as CSS injection.

Copy link

pkg-pr-new bot commented Dec 26, 2024

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b75fd72) to head (8c52474).
Report is 20 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52141   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          763       763           
  Lines        13734     13745   +11     
  Branches      3585      3588    +3     
=========================================
+ Hits         13734     13745   +11     

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

@thinkasany thinkasany force-pushed the cp-Statistic branch 3 times, most recently from 44362da to a83b93a Compare January 3, 2025 13:30
@thinkasany thinkasany changed the base branch from feature to next January 3, 2025 13:31
Copy link

codecov bot commented Jan 3, 2025

Bundle Report

Changes will increase total bundle size by 6.25MB (185.51%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
antd.min-array-push 9.62MB 6.25MB (185.51%) ⬆️⚠️

@zombieJ zombieJ merged commit 5853377 into ant-design:next Jan 7, 2025
37 of 38 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