Skip to content

Conversation

thinkasany
Copy link
Member

🤔 This is a ...

  • 🆕 New feature

🔗 Related Issues

react-component/segmented#296

📝 Change Log

Language Changelog
🇺🇸 English 🆕 ConfigProvider support segmented semantic props classNames and styles.
🇨🇳 Chinese 🆕 ConfigProvider 支持 segmented组件语义化 classNamesstyles

Copy link

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

Copy link
Contributor

github-actions bot commented Jan 13, 2025

👁 Visual Regression Report for PR #52376 Failed ❌

🎯 Target branch: next (50da162)
📖 View Full Report ↗︎
📊 Summary: 🔄 1 changed

Expected (Branch next) Actual (Current PR) Diff
input-group.compact.png input-group.compact.png input-group.compact.css-var.png input-group.compact.css-var.png

Important

There are 1 diffs found in this PR: 🔄 1 changed.
Please check all items:

  • Visual diff is acceptable

Copy link
Contributor

github-actions bot commented Jan 13, 2025

Preview is ready

Copy link

Walkthrough

This pull request introduces a new feature to the ConfigProvider component, adding support for segmented semantic properties classNames and styles. This enhancement allows developers to apply custom class names and styles to segmented components, improving customization and styling flexibility.

Changes

Files Summary
components/config-provider/context.ts Added SegmentedConfig type to support classNames and styles for segmented components.
components/config-provider/index.en-US.md, components/config-provider/index.zh-CN.md Updated documentation to reflect new segmented properties classNames and styles.
components/segmented/tests/index.test.tsx Added tests to verify custom styles and class names for segmented components.
components/segmented/demo/_semantic.tsx Added a new demo file to showcase semantic DOM usage with segmented components.
components/segmented/index.en-US.md, components/segmented/index.zh-CN.md Updated documentation to include semantic DOM information.
components/segmented/index.tsx Implemented support for classNames and styles in segmented components.

}}
>
{icon}
</span>
{label && <span>{label}</span>}

Choose a reason for hiding this comment

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

Ensure that the label span also supports custom classNames and styles similar to the icon span to maintain consistency in customization options.

Copy link

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

Package New capabilities Transitives Size Publisher
npm/eslint-plugin-jest@28.11.0 None 0 350 kB aaronabramov, jeysal, jsonp, ...6 more

🚮 Removed packages: npm/rc-segmented@2.7.0

View full report↗︎

Copy link

pkg-pr-new bot commented Jan 16, 2025

Copy link

codecov bot commented Jan 16, 2025

Bundle Report

Changes will decrease total bundle size by 606 bytes (-0.02%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.39MB 606 bytes (-0.02%) ⬇️

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (50da162) to head (c8afe6d).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52376   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          760       760           
  Lines        13695     13695           
  Branches      3584      3584           
=========================================
  Hits         13695     13695           

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

@zombieJ zombieJ merged commit 0b6d56c into ant-design:next Jan 16, 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