Skip to content

Comments

feat: [v6] Tag support disabled and href#52229

Merged
zombieJ merged 30 commits intoant-design:nextfrom
aojunhao123:tag-disabled
Jan 14, 2025
Merged

feat: [v6] Tag support disabled and href#52229
zombieJ merged 30 commits intoant-design:nextfrom
aojunhao123:tag-disabled

Conversation

@aojunhao123
Copy link
Contributor

@aojunhao123 aojunhao123 commented Jan 3, 2025

🤔 This is a ...

  • 🆕 New feature

🔗 Related Issues

💡 Background and Solution

Before
QQ_1735919300691

After
QQ_1735919306325

📝 Change Log

Language Changelog
🇺🇸 English feat: Tag support disabled and href
🇨🇳 Chinese feat: Tag新增disabledhref属性

@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 3, 2025

👁 Visual Regression Report for PR #52229 Failed ❌

🎯 Target branch: next (5669073)
📖 View Full Report ↗︎
📊 Summary: 🔄 6 changed, 🆕 6 added

Expected (Branch next) Actual (Current PR) Diff
input-group.compact.png input-group.compact.png input-group.compact.png input-group.compact.png
input-group.compact.png input-group.compact.png input-group.compact.css-var.png input-group.compact.css-var.png
input-group.dark.png input-group.dark.png input-group.dark.png input-group.dark.png
input-group.dark.png input-group.dark.png input-group.dark.css-var.png input-group.dark.css-var.png
input-group.default.png input-group.default.png input-group.default.png input-group.default.png
input-group.default.png input-group.default.png input-group.default.css-var.png input-group.default.css-var.png
tag-disabled.compact.css-var.png tag-disabled.compact.css-var.png 🆕🆕🆕 Added 🆕🆕🆕
tag-disabled.compact.png tag-disabled.compact.png 🆕🆕🆕 Added 🆕🆕🆕

Warning

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


Important

There are 12 diffs found in this PR: 🔄 6 changed, 🆕 6 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 3, 2025

Preview is ready

@petercat-assistant
Copy link

Walkthrough

This pull request introduces a new feature that adds disabled support for the Tag component in the Ant Design library. This enhancement allows tags to be disabled, preventing user interactions such as clicks and changes. The update includes modifications to the component's logic, styles, and tests to ensure proper functionality and visual representation when the tag is disabled.

Changes

Files Summary
components/_util/colors.ts Refactored PresetStatusColorTypes to PresetStatusColors for consistency.
components/tag/CheckableTag.tsx Added disabled prop and logic to handle disabled state in CheckableTag.
components/tag/tests/index.test.tsx Added tests to verify behavior of disabled tags and checkable tags.
components/tag/demo/disabled.md Added documentation for the disabled tag feature.
components/tag/demo/disabled.tsx Added a demo showcasing the disabled tag functionality.
components/tag/index.en-US.md Updated API documentation to include disabled prop.
components/tag/index.tsx Implemented disabled state handling in Tag component.
components/tag/index.zh-CN.md Updated Chinese API documentation to include disabled prop.
components/tag/style/index.ts Added styles for disabled tags.
components/tag/style/presetCmp.ts Updated styles to support disabled state.
components/tag/style/statusCmp.ts Updated styles to support disabled state.
🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

@aojunhao123 aojunhao123 changed the title Tag disabled feat(tag): Tag support disabled Jan 3, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 3, 2025

Open in Stackblitz

More templates

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

commit: f8ce783

@codecov
Copy link

codecov bot commented Jan 3, 2025

Bundle Report

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

Detailed changes
Bundle name Size Change
antd.min-array-push 3.39MB 4.12kB (0.12%) ⬆️

@aojunhao123
Copy link
Contributor Author

先提一版,可能样式上还得优化一下?等大佬们review😪

@codecov
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (cd3c3d8) to head (f8ce783).
Report is 2 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff            @@
##              next    #52229   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          760       760           
  Lines        13673     13681    +8     
  Branches      3570      3576    +6     
=========================================
+ Hits         13673     13681    +8     

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

@aojunhao123 aojunhao123 changed the title feat(tag): Tag support disabled feat(tag): [v6] Tag support disabled Jan 4, 2025
@aojunhao123 aojunhao123 changed the title feat(tag): [v6] Tag support disabled feat: [v6] Tag support disabled Jan 4, 2025
@aojunhao123 aojunhao123 changed the title feat: [v6] Tag support disabled feat: [v6] Tag support disabled and href Jan 14, 2025
@zombieJ zombieJ merged commit 6c401b9 into ant-design:next Jan 14, 2025
37 checks passed
@aojunhao123 aojunhao123 deleted the tag-disabled branch January 15, 2025 02:22
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.

4 participants