Skip to content

Comments

feat: ConfigProvider support root for Space#52248

Merged
zombieJ merged 2 commits intoant-design:nextfrom
thinkasany-forks:cp-space
Jan 7, 2025
Merged

feat: ConfigProvider support root for Space#52248
zombieJ merged 2 commits intoant-design:nextfrom
thinkasany-forks:cp-space

Conversation

@thinkasany
Copy link
Member

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature

📝 Change Log

Language Changelog
🇺🇸 English feat: ConfigProvider support root for Space
🇨🇳 Chinese feat: ConfigProvider 支持Space组件 root配置

@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 Jan 5, 2025

👁 Visual Regression Report for PR #52248 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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2025

Preview is ready

@petercat-assistant
Copy link

Walkthrough

This pull request introduces a new feature to the ConfigProvider component, allowing it to support a root configuration for the Space component. This enhancement includes updates to classNames and styles, enabling more flexible customization of the Space component.

Changes

Files Summary
components/space/tests/index.test.tsx Updated tests to verify the application of custom classNames and styles for the Space component.
components/space/demo/_semantic.tsx Added localization support for the root element in both Chinese and English.
components/space/index.tsx Modified the Space component to accept root classNames and styles, enhancing customization capabilities.

className={cls}
style={{ ...gapStyle, ...space?.style, ...style }}
{...otherProps}
className={rootClassNames}

Choose a reason for hiding this comment

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

Ensure that the merging of styles in the style prop maintains the correct order of precedence. The current order seems correct, but any future changes should preserve this order to avoid unexpected style overrides.

@thinkasany thinkasany mentioned this pull request Jan 5, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 5, 2025

Open in Stackblitz

More templates

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

commit: ecfa9b2

@codecov
Copy link

codecov bot commented Jan 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b75fd72) to head (ecfa9b2).
Report is 19 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52248   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          763       763           
  Lines        13734     13732    -2     
  Branches      3585      3583    -2     
=========================================
- Hits         13734     13732    -2     

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

@zombieJ zombieJ merged commit 7444a89 into ant-design:next Jan 7, 2025
36 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