Skip to content
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: ColorPicker support z-index manager #45496

Merged
merged 10 commits into from Oct 24, 2023

Conversation

kiner-tang
Copy link
Member

@kiner-tang kiner-tang commented Oct 23, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Drawer Support z-index context to manage z-index
🇨🇳 Chinese 抽屉支持通过 z-index 上下文管理 z-index

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at 7069bec

This pull request refactors several components that use dropdown menus to use the useZIndex hook for managing their zIndex values. This improves the consistency and compatibility of the zIndex values across different components and contexts. The dropdownStyle prop is also simplified to avoid conflicts with the hook. The useZIndex hook is tested with specific consumer components.

🔍 Walkthrough

🤖 Generated by Copilot at 7069bec

  • Import and use the useZIndex hook in the auto-complete, cascader, color-picker, dropdown, and tree-select components to manage the zIndex of their dropdown menus or panels (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Import and use the zIndexContext in the dropdown component to pass the context value from the hook to the children components that may also use the hook (link)
  • Simplify the dropdownStyle prop in the select component to only include the zIndex value from the hook, as the zIndex prop is not needed anymore (link)
  • Update the test cases for the useZIndex hook to use specific consumer components instead of all the keys of the consumerComponent object, and enable the test case for testing the component (link, link)

@stackblitz
Copy link

stackblitz bot commented Oct 23, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2023

Preview Is ready

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 399.61 KB (+14 B 🔺)
./dist/antd-with-locales.min.js 458.92 KB (+13 B 🔺)

@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3cb2738) 100.00% compared to head (eae83ea) 100.00%.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           refactor-z-index-context    #45496   +/-   ##
==========================================================
  Coverage                    100.00%   100.00%           
==========================================================
  Files                           697       697           
  Lines                         11740     11741    +1     
  Branches                       3137      3137           
==========================================================
+ Hits                          11740     11741    +1     
Files Coverage Δ
components/color-picker/ColorPicker.tsx 100.00% <100.00%> (ø)

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

Signed-off-by: kiner-tang(文辉) <1127031143@qq.com>
@kiner-tang kiner-tang merged commit e7109d3 into refactor-z-index-context Oct 24, 2023
88 checks passed
@kiner-tang kiner-tang deleted the feat-z-index-colorPicker branch October 24, 2023 13:17
@MadCcc MadCcc mentioned this pull request Nov 3, 2023
20 tasks
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.

None yet

2 participants