You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hainenber (via GitHub)" <gi...@apache.org> on 2025/03/16 05:11:08 UTC
[PR] fix(cosmetics): allow toast message to be toggled off when modal is opened [superset]
hainenber opened a new pull request, #32691:
URL: https://github.com/apache/superset/pull/32691
…pened
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
fix(cosmetics): allow toast message to be toggled off when modal is opened
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Fixes #32536
Allow toast message to be interactive when a modal is opened. This is done by always have the toast at least 1 `z-index` higher than the max value.
Maybe I'm simple-minded but I just couldn't find a way to configure AntD to insert Toasts outside of DOM like Evan has suggested in the linked issue.
Normal toast functionality seems to be OK when there's no modal involved.
<img width="1070" alt="image" src="https://github.com/user-attachments/assets/9638ca87-81d4-4953-bd2a-007dcc98a17a" />
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
Before
<img width="1070" alt="image" src="https://github.com/user-attachments/assets/d2fc55d8-51bb-4e07-8135-fff31a0646ec" />
After
<img width="1070" alt="image" src="https://github.com/user-attachments/assets/1d6ff4de-8199-4435-9389-31ff54419e6f" />
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cosmetics): allow toast message to be toggled off when modal is opened [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #32691:
URL: https://github.com/apache/superset/pull/32691
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(cosmetics): allow toast message to be toggled off when modal is opened [superset]
Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org