feat(select): popup supports Semantic DOM and retire some api#53243
feat(select): popup supports Semantic DOM and retire some api#53243zombieJ merged 4 commits intoant-design:featurefrom
Conversation
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| height={200} | ||
| > | ||
| <div ref={divRef} style={{ marginBottom: 80 }}> | ||
| <Select |
There was a problem hiding this comment.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
| it('legacy dropdownStyle', () => { | ||
| resetWarned(); | ||
| const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); | ||
| const { container } = render(<Select dropdownStyle={{ background: 'red' }} open />); |
There was a problem hiding this comment.
Looks like this element is missing an accessible name or label. That makes it hard for people using screen readers or voice control to use the control.
👁 Visual Regression Report for PR #53243 Failed ❌
Warning There are more diffs not shown in the table. Please check the Full Report for details. Important There are 68 diffs found in this PR: 🔄
|
WalkthroughThis pull request introduces a new feature to the Select component, adding support for a popup semantic node. It allows customization of the dropdown menu using Changes
|
| 'popupMatchSelectWidth', | ||
| ); | ||
| Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => { | ||
| warning.deprecated(!(oldProp in props), oldProp, newProp); |
There was a problem hiding this comment.
The use of Object.entries(deprecatedProps).forEach(([oldProp, newProp]) => { warning.deprecated(!(oldProp in props), oldProp, newProp); }); is a good approach to handle deprecation warnings. However, ensure that props is correctly defined and contains all necessary properties to avoid false warnings.
Bundle ReportChanges will increase total bundle size by 2.33kB (0.07%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
Files in
Files in
|
More templates
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature #53243 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 770 771 +1
Lines 13880 13899 +19
Branches 3639 3647 +8
=========================================
+ Hits 13880 13899 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| const mergedPopupClassName = classNames( | ||
| popupClassName || dropdownClassName, | ||
| const mergedPopupClassName = cls( | ||
| classNames?.popup || contextSelect?.classNames?.popup || popupClassName || dropdownClassName, |
| const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); | ||
| render(<Select onDropdownVisibleChange={() => {}} open />); | ||
| expect(errSpy).toHaveBeenCalledWith( | ||
| 'Warning: [antd: Select] `onDropdownVisibleChange` is deprecated. Please use `onPopupVisibleChange` instead.', |
There was a problem hiding this comment.
onPopupVisibleChange => onPopupOpenChange 应该一步到位


























中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log