Skip to content

Conversation

kiner-tang
Copy link
Member

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ❓ Other (about what?)

🔗 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 Retire deprecated api for modal
🇨🇳 Chinese modal 废弃 api 退休

@kiner-tang kiner-tang requested review from zombieJ and MadCcc January 4, 2025 13:05
Copy link

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

Copy link
Contributor

github-actions bot commented Jan 4, 2025

👁 Visual Regression Report for PR #52237 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 350 diffs found in this PR: 🔄 314 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 Jan 4, 2025

Preview is ready

Copy link

Walkthrough

This pull request focuses on retiring the deprecated visible API for modals in the Ant Design library. The changes involve removing the visible property and replacing it with the open property across various components, tests, and interfaces. This update aims to streamline the modal API and remove legacy support.

Changes

Files Summary
components/modal/ConfirmDialog.tsx, components/modal/Modal.tsx Removed the deprecated visible property and updated the logic to use open.
components/modal/tests/Modal.test.tsx, components/modal/tests/confirm.test.tsx Updated tests to reflect the removal of the visible property and ensure compatibility with the open property.
components/modal/confirm.tsx Removed legacy support for the visible property.
components/modal/interface.ts Removed the deprecated visible property from the interface definitions.

@@ -161,7 +158,7 @@ const Modal: React.FC<ModalProps> = (props) => {
prefixCls={prefixCls}
rootClassName={classNames(hashId, rootClassName, cssVarCls, rootCls)}
footer={dialogFooter}
visible={open ?? visible}
visible={open}
mousePosition={restProps.mousePosition ?? mousePosition}
onClose={handleCancel as any}
closable={

Choose a reason for hiding this comment

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

Ensure that the removal of the visible property does not affect any existing functionality that might have relied on it. The transition to open should be thoroughly tested.

Copy link
Contributor

github-actions bot commented Jan 4, 2025

size-limit report 📦

Path Size
dist/antd.min.js 441.18 KB (-24 B 🔽)
dist/antd-with-locales.min.js 509.38 KB (-25 B 🔽)

Copy link

pkg-pr-new bot commented Jan 4, 2025

Copy link

Deploying ant-design with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1242bb9
Status: ✅  Deploy successful!
Preview URL: https://9159e878.ant-design.pages.dev
Branch Preview URL: https://v6-kiner-retire-deprecated-a-47dy.ant-design.pages.dev

View logs

Copy link

codecov bot commented Jan 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b75fd72) to head (1242bb9).
Report is 18 commits behind head on next.

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

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

@zombieJ zombieJ merged commit 8087523 into next Jan 7, 2025
46 checks passed
@zombieJ zombieJ deleted the v6-kiner-retire-deprecated-api-modal branch January 7, 2025 06:20
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