fix(components): [config-provider] preserve zero zIndex#24331
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCompute logic for global component zIndex now treats 0 as a valid configured value and falls back to defaultInitialZIndex only when zIndex is null/undefined or NaN. Tests were added verifying that zIndex={0} is preserved and zIndex={Number.NaN} falls back to defaultInitialZIndex. ChangesZ-Index handling fix and tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1857622971
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🧪 Playground Preview: https://element-plus.run/?pr=24331 |
|
I've made the requested changes. Please review when convenient. Thanks! |
|
@guozi9999 Thanks for your contribution! ❤️ |

Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.Summary
fix: #24330
0as a valid global z-index value.ConfigProvider zIndex={0}.Problem
useGlobalComponentSettingsused||to fall back todefaultInitialZIndex:This caused
0to be treated as missing because0is falsy.Solution
Use
??so onlynullorundefinedfall back to the default:Summary by CodeRabbit
Bug Fixes
Tests