fix(toasts): stop the toast overlay from covering controls behind it#40805
fix(toasts): stop the toast overlay from covering controls behind it#40805jesperct wants to merge 2 commits into
Conversation
Code Review Agent Run #9e2f53Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
The flagged issue is correct. Setting superset-frontend/src/components/MessageToasts/ToastPresenter.tsx |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40805 +/- ##
=======================================
Coverage 64.07% 64.07%
=======================================
Files 2664 2664
Lines 143831 143831
Branches 33084 33084
=======================================
Hits 92160 92160
Misses 50062 50062
Partials 1609 1609
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The toast presenter is a fixed overlay with height: calc(100vh - 100px), so it reserved the full viewport height even with a single toast and its empty area sat on top of controls underneath it (e.g. the dashboard Save/Edit buttons), swallowing their clicks until the toasts cleared. Use max-height instead so the overlay hugs its toasts while still scrolling when they overflow.
2d1fa97 to
f975f91
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses an interaction issue caused by the toast presenter being a large fixed-position overlay that could block clicks on underlying UI controls (e.g., dashboard header buttons) while toasts are visible.
Changes:
- Replace a fixed
heighton the toast presenter with amax-heightcap so the container can shrink-wrap to its toast content while still allowing scrolling when overflowing. - Add a unit test asserting the presenter uses
max-height(and does not set the previous fixedheight).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| superset-frontend/src/components/MessageToasts/ToastPresenter.tsx | Changes presenter sizing from fixed height to max-height to avoid a full-height fixed overlay blocking interactions. |
| superset-frontend/src/components/MessageToasts/ToastPresenter.test.tsx | Adds a style-rule test to verify the presenter uses max-height instead of a fixed height. |
Code Review Agent Run #eee633Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Code Review Agent Run #e7e26eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
The toast notification container (
ToastPresenter) is aposition: fixedoverlay styled withheight: calc(100vh - 100px). That fixed height made it reserve almost the full viewport height even when a single toast was showing, so its empty area sat on top of any controls in the same vertical strip and swallowed their clicks. In practice this blocked the dashboard header's Save / Edit dashboard buttons while a toast was visible, until the toast timed out or was dismissed.Switching
heighttomax-heightlets the overlay shrink to hug its toasts (anchored at the bottom), so it no longer covers controls above it.overflow-y: autostill scrolls the stack when many toasts overflow, and the scrollbar stays fully interactive.BEFORE/AFTER
The red dashed region marks the toast overlay's actual hit area (the
#toast-presenterbox) over a mock dashboard header.Before (
height): the overlay spans the full viewport height and covers the Save / Edit buttons, so a click on them lands on the overlay.After (
max-height): the overlay hugs the toast at the bottom, so the buttons are clear and clickable.TESTING INSTRUCTIONS
Unit test in
ToastPresenter.test.tsxasserts the container caps its height withmax-heightrather than a fixed fullheight.ADDITIONAL INFORMATION