New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: menu support z-index manager #45498
Conversation
Signed-off-by: kiner-tang(文辉) <1127031143@qq.com>
Run & review this pull request in StackBlitz Codeflow. |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## refactor-z-index-context #45498 +/- ##
==========================================================
Coverage 100.00% 100.00%
==========================================================
Files 697 697
Lines 11743 11744 +1
Branches 3137 3137
==========================================================
+ Hits 11743 11744 +1
☔ View full report in Codecov by Sentry. |
// const containers = ['Modal']; | ||
const consumers = ['Dropdown']; | ||
// const consumers = Object.keys(consumerComponent); | ||
// const consumers = ['Dropdown', 'SelectLike', 'ColorPicker', 'DatePicker']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些注释,之后可以清理一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好,我再合并到 feature 的时候清理一下
Signed-off-by: kiner-tang(文辉) <1127031143@qq.com>
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 2110df8
This pull request adds or updates a
useZIndex
hook to several components that have popup or dropdown elements. The hook controls thezIndex
style of the components based on their type and optional props. This improves the positioning and visibility of the components in different scenarios. The pull request also refactors some test and import code for better readability and reliability.🔍 Walkthrough
🤖 Generated by Copilot at 2110df8
useZIndex
hook to assign and applyzIndex
values to various components that have popup or dropdown elements, such asAutoComplete
,Cascader
,ColorPicker
,DatePicker
,Menu
, andTreeSelect
(link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)useZIndex
hook inuseZIndex.test.tsx
to enable testing all the possible consumer components, account for the special case of theTour
component, and prevent timeout errors (link, link, link, link, link)SubMenu.tsx
to follow the convention of importing React first, then external modules, then internal modules (link)