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: Tooltip support z-index manager #45422

Merged
merged 4 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 Tooltip 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 1e6c15f

Added a new feature to Tooltip component to support nested tooltips and custom z-index values. Implemented a custom hook useZIndex and a context ZIndexContext to manage the z-index values of tooltips and other components. Updated the test file tooltip.test.tsx to cover the new feature.

🔍 Walkthrough

🤖 Generated by Copilot at 1e6c15f

  • Enable nested z-index values and respect zIndex prop for Tooltip component (link, link, link)
    • Import useZIndex hook and zIndexContext from ../_util (link, link)
    • Wrap Tooltip with zIndexContext.Provider and pass contextZIndex value to child components (link)
    • Pass zIndex value from hook to RcTooltip prop (link)
  • Add test case for nested Tooltip and Select components with different popupClassName and rootClassName props (link)
    • Import Select component from antd (link)
    • Render three levels of Tooltip and Select components and expect z-index values to be accumulated (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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 399.32 KB (+25 B 🔺)
./dist/antd-with-locales.min.js 458.63 KB (+26 B 🔺)

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (refactor-z-index-context@bff04cd). Click here to learn what that means.

Additional details and impacted files
@@                     Coverage Diff                      @@
##             refactor-z-index-context    #45422   +/-   ##
============================================================
  Coverage                            ?   100.00%           
============================================================
  Files                               ?       697           
  Lines                               ?     11736           
  Branches                            ?      3138           
============================================================
  Hits                                ?     11736           
  Misses                              ?         0           
  Partials                            ?         0           

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

@kiner-tang kiner-tang merged commit bf1468a into refactor-z-index-context Oct 20, 2023
88 checks passed
@kiner-tang kiner-tang deleted the feat-z-index-Tooltip branch October 20, 2023 06:53
@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.

2 participants