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>![category 
Design](https://img.shields.io/badge/Design-0d9488)</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>
   
   [![Report a problem with this 
comment](https://img.shields.io/badge/Report%20a%20problem%20with%20this%20comment-gray.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiNmNWVjMDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10cmlhbmdsZS1hbGVydCI+PHBhdGggZD0ibTIxLjczIDE4LTgtMTRhMiAyIDAgMCAwLTMuNDggMGwtOCAxNEEyIDIgMCAwIDAgNCAyMWgxNmEyIDIgMCAwIDAgMS43My0zIi8+PHBhdGggZD0iTTEyIDl2NCIvPjxwYXRoIGQ9Ik0xMiAxN2guMDEiLz48L3N2Zz4=)](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]

Reply via email to