feat: ConfigProvider support customize trigger for Tooltip/Popover/Popconfirm#55932
feat: ConfigProvider support customize trigger for Tooltip/Popover/Popconfirm#55932zombieJ merged 8 commits intoant-design:featurefrom
Conversation
|
|
👁 Visual Regression Report for PR #55932 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
|
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 Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello @aojunhao123, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new capability to the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 2.83kB (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
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature #55932 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 803 804 +1
Lines 14893 14816 -77
Branches 3954 3914 -40
=========================================
- Hits 14893 14816 -77 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable feature by allowing Tooltip, Popover, and Popconfirm to have their trigger property configured globally via ConfigProvider. This is particularly useful for accessibility, as it enables setting focus triggers across the application. The implementation is solid, correctly propagating the context value and prioritizing component props. The documentation has been updated accordingly, including a helpful new FAQ section. I've found a couple of minor documentation inconsistencies that I've commented on. Overall, great work!
| | tooltip | Set Tooltip common props | { className?: string, style?: React.CSSProperties, classNames?:[Tooltip\["classNames"\]](/components/tooltip#semantic-dom), styles?: [Tooltip\["styles"\]](/components/tooltip#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, unique?: boolean, trigger?: [Tooltip\["trigger"\]](/components/tooltip#api) } | - | | | ||
| | popover | Set Popover common props | { className?: string, style?: React.CSSProperties, classNames?:[Popover\["classNames"\]](/components/popover#semantic-dom), styles?: [Popover\["styles"\]](/components/popover#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popover\["trigger"\]](/components/popover#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | ||
| | popconfirm | Set Popconfirm common props | { className?: string, style?: React.CSSProperties, classNames?:[Popconfirm\["classNames"\]](/components/popconfirm#semantic-dom), styles?: [Popconfirm\["styles"\]](/components/popconfirm#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popconfirm\["trigger"\]](/components/popconfirm#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | |
There was a problem hiding this comment.
There are a couple of issues in this table:
- The version for the new
triggerprop ontooltipis missing. It should be added for consistency. - The markdown links for
popoverandpopconfirmhave a syntax error (an extra}at the end of the link) which breaks them.
| | tooltip | Set Tooltip common props | { className?: string, style?: React.CSSProperties, classNames?:[Tooltip\["classNames"\]](/components/tooltip#semantic-dom), styles?: [Tooltip\["styles"\]](/components/tooltip#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, unique?: boolean, trigger?: [Tooltip\["trigger"\]](/components/tooltip#api) } | - | | | |
| | popover | Set Popover common props | { className?: string, style?: React.CSSProperties, classNames?:[Popover\["classNames"\]](/components/popover#semantic-dom), styles?: [Popover\["styles"\]](/components/popover#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popover\["trigger"\]](/components/popover#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | |
| | popconfirm | Set Popconfirm common props | { className?: string, style?: React.CSSProperties, classNames?:[Popconfirm\["classNames"\]](/components/popconfirm#semantic-dom), styles?: [Popconfirm\["styles"\]](/components/popconfirm#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popconfirm\["trigger"\]](/components/popconfirm#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | |
| | tooltip | Set Tooltip common props | { className?: string, style?: React.CSSProperties, classNames?:[Tooltip["classNames"]](/components/tooltip#semantic-dom), styles?: [Tooltip["styles"]](/components/tooltip#semantic-dom), arrow: boolean | { pointAtCenter: boolean }, unique?: boolean, trigger?: [Tooltip["trigger"]](/components/tooltip#api) } | - | trigger: 6.1.0 | | |
| | popover | Set Popover common props | { className?: string, style?: React.CSSProperties, classNames?:[Popover["classNames"]](/components/popover#semantic-dom), styles?: [Popover["styles"]](/components/popover#semantic-dom), arrow: boolean | { pointAtCenter: boolean }, trigger?: [Popover["trigger"]](/components/popover#api) } | - | 5.23.0, arrow: 6.0.0, trigger: 6.1.0 | | |
| | popconfirm | Set Popconfirm common props | { className?: string, style?: React.CSSProperties, classNames?:[Popconfirm["classNames"]](/components/popconfirm#semantic-dom), styles?: [Popconfirm["styles"]](/components/popconfirm#semantic-dom), arrow: boolean | { pointAtCenter: boolean }, trigger?: [Popconfirm["trigger"]](/components/popconfirm#api) } | - | 5.23.0, arrow: 6.0.0, trigger: 6.1.0 | |
| | tooltip | 设置 Tooltip 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Tooltip\["classNames"\]](/components/tooltip-cn#semantic-dom), styles?: [Tooltip\["styles"\]](/components/tooltip-cn#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, unique?: boolean, trigger?: [Tooltip\["trigger"\]](/components/tooltip-cn#api)} | - | `trigger`: 6.1.0 | | ||
| | popover | 设置 Popover 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Popover\["classNames"\]](/components/popover-cn#semantic-dom), styles?: [Popover\["styles"\]](/components/popover-cn#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popover\["trigger"\]](/components/popover-cn#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | ||
| | popconfirm | 设置 Popconfirm 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Popconfirm\["classNames"\]](/components/popconfirm-cn#semantic-dom), styles?: [Popconfirm\["styles"\]](/components/popconfirm-cn#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popconfirm\["trigger"\]](/components/popconfirm-cn#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | |
There was a problem hiding this comment.
There's a syntax error in the markdown table. The links for tooltip, popover, and popconfirm have an extra closing curly brace } which breaks the link. Please remove it.
| | tooltip | 设置 Tooltip 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Tooltip\["classNames"\]](/components/tooltip-cn#semantic-dom), styles?: [Tooltip\["styles"\]](/components/tooltip-cn#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, unique?: boolean, trigger?: [Tooltip\["trigger"\]](/components/tooltip-cn#api)} | - | `trigger`: 6.1.0 | | |
| | popover | 设置 Popover 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Popover\["classNames"\]](/components/popover-cn#semantic-dom), styles?: [Popover\["styles"\]](/components/popover-cn#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popover\["trigger"\]](/components/popover-cn#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | |
| | popconfirm | 设置 Popconfirm 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Popconfirm\["classNames"\]](/components/popconfirm-cn#semantic-dom), styles?: [Popconfirm\["styles"\]](/components/popconfirm-cn#semantic-dom), arrow: boolean \| { pointAtCenter: boolean }, trigger?: [Popconfirm\["trigger"\]](/components/popconfirm-cn#api)} | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | |
| | tooltip | 设置 Tooltip 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Tooltip["classNames"]](/components/tooltip-cn#semantic-dom), styles?: [Tooltip["styles"]](/components/tooltip-cn#semantic-dom), arrow: boolean | { pointAtCenter: boolean }, unique?: boolean, trigger?: [Tooltip["trigger"]](/components/tooltip-cn#api) } | - | `trigger`: 6.1.0 | | |
| | popover | 设置 Popover 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Popover["classNames"]](/components/popover-cn#semantic-dom), styles?: [Popover["styles"]](/components/popover-cn#semantic-dom), arrow: boolean | { pointAtCenter: boolean }, trigger?: [Popover["trigger"]](/components/popover-cn#api) } | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | | |
| | popconfirm | 设置 Popconfirm 组件的通用属性 | { className?: string, style?: React.CSSProperties, classNames?:[Popconfirm["classNames"]](/components/popconfirm-cn#semantic-dom), styles?: [Popconfirm["styles"]](/components/popconfirm-cn#semantic-dom), arrow: boolean | { pointAtCenter: boolean }, trigger?: [Popconfirm["trigger"]](/components/popconfirm-cn#api) } | - | 5.23.0, `arrow`: 6.0.0, `trigger`: 6.1.0 | |
cdd61fd to
079430c
Compare
Signed-off-by: aojunhao123 <1844749591@qq.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|


🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log