-
-
Notifications
You must be signed in to change notification settings - Fork 50k
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
fix: Fixed image preview in a nested pop-up where z-index Settings did not meet expectations #45979
Conversation
… not meet expectations
Run & review this pull request in StackBlitz Codeflow. |
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 29db8b6:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #45979 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 700 700
Lines 11849 11851 +2
Branches 3158 3159 +1
=========================================
+ Hits 11849 11851 +2 ☔ View full report in Codecov by Sentry. |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
fix #45975
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖[deprecated] Generated by Copilot at d93d306
Added z-index management for the
Image
component with a preview feature. Used theuseZIndex
hook to assign z-index values to the image preview elements and updated therc-image
dependency to support thezIndex
prop. Added a test case for theuseZIndex
hook with theImage
component.🔍 Walkthrough
🤖[deprecated] Generated by Copilot at d93d306
rc-image
dependency to use the latest version that supports thezIndex
prop for thePreviewGroup
component (link)useZIndex
hook inImage
component to get the z-index value for the preview element based on theImagePreview
consumer and the optionalzIndex
prop from thepreview
object (link, link, link)PreviewGroup
component as a prop to set the z-index of the preview element (link)ZIndexConsumer
type andconsumerBaseZIndexOffset
object to include theImagePreview
consumer and assign a base z-index offset value of 1 to it (link, link)ImagePreview
component to theuseZIndex
test file and importImage
component andImageProps
type fromantd
to use them in theImagePreview
component (link, link, link)getConsumerSelector
function in theuseZIndex
test file to handle theImagePreview
consumer case and return the appropriate selector for the preview element based on the root class name (link)