korbit-ai[bot] commented on code in PR #32691:
URL: https://github.com/apache/superset/pull/32691#discussion_r1997486240
##########
superset-frontend/src/components/MessageToasts/ToastPresenter.tsx:
##########
@@ -31,7 +31,7 @@ const StyledToastPresenter = styled.div<VisualProps>`
right: 0px;
margin-right: 50px;
margin-bottom: 50px;
- z-index: ${({ theme }) => theme.zIndex.max};
+ z-index: ${({ theme }) => theme.zIndex.max + 1};
Review Comment:
### Theme Z-Index Override <sub></sub>
<details>
<summary>Tell me more</summary>
###### What is the issue?
Direct modification of a theme's maximum z-index value creates a fragile
design that could lead to z-index wars and unintended layering issues.
###### Why this matters
By incrementing the maximum z-index, we're breaking the theme's intended
layer hierarchy. This can lead to other components needing to similarly
increment their z-index to maintain proper stacking order, creating a
maintenance nightmare.
###### Suggested change ∙ *Feature Preview*
Instead of incrementing the max z-index, define a specific z-index level for
toasts in the theme system:
```typescript
// In theme definition
zIndex: {
max: 9999,
toast: 10000,
// other z-indices...
}
// In component
z-index: ${({ theme }) => theme.zIndex.toast};
```
</details>
<sub>
[](https://app.korbit.ai/feedback/aa91ff46-6083-4491-9416-b83dd1994b51/ef36d578-5573-4a0a-871b-c53b005cd5c6?suggestedFixEnabled=true)
💬 Looking for more details? Reply to this comment to chat with Korbit.
</sub>
<!--- korbi internal id:d68ebed5-c7f3-43db-8920-6dc884356c4c -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]