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: Drawer support z-index manager #45417

Merged
merged 3 commits into from Oct 20, 2023

Conversation

kiner-tang
Copy link
Member

@kiner-tang kiner-tang commented Oct 19, 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 9c5f143

Added support for nested Drawer components with proper z-index values. This involved adding a new test case in Drawer.test.tsx and using a custom hook and context in Drawer.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at 9c5f143

  • Import useZIndex hook and zIndexContext from ../_util (link, link)
  • Wrap Drawer component with zIndexContext.Provider and pass context z-index value to children (link)
  • Pass z-index value generated by useZIndex hook to RcDrawer component (link)
  • Add test case for nested Drawer components with Select components inside them (link, link)
    • Import Select component from antd (link)
    • Render three levels of Drawer components, each with a Select component (link)
    • Expect z-index values to be accumulated according to Drawer level and Select popup position (link)

@stackblitz
Copy link

stackblitz bot commented Oct 19, 2023

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2023

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bff04cd) 100.00% compared to head (282b674) 100.00%.
Report is 3 commits behind head on refactor-z-index-context.

Additional details and impacted files
@@                    Coverage Diff                     @@
##           refactor-z-index-context    #45417   +/-   ##
==========================================================
  Coverage                    100.00%   100.00%           
==========================================================
  Files                           697       697           
  Lines                         11732     11733    +1     
  Branches                       3137      3137           
==========================================================
+ Hits                          11732     11733    +1     
Files Coverage Δ
components/drawer/index.tsx 100.00% <100.00%> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 399.34 KB (+39 B 🔺)
./dist/antd-with-locales.min.js 458.64 KB (+38 B 🔺)

@kiner-tang kiner-tang merged commit 3627031 into refactor-z-index-context Oct 20, 2023
88 checks passed
@kiner-tang kiner-tang deleted the feat-z-index-Drawer branch October 20, 2023 11:22
@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