wrolpi/app/src/components/ui
Roland 29105da2b6
fix: toasts were covering the navigation bar's controls
Six keyboard-shortcuts e2e tests started failing on CI: clicking the search
glyph was refused because a `mantine-Notification-title` was on top of it.

The toast container is fixed at `top: var(--mantine-spacing-md)` -- 16px --
while the bar occupies the first 54px of the page.  Every toast has therefore
been landing on the bar's right-hand corner: the search glyph, the hamburger,
Help and Admin.  For as long as the toast is up those controls cannot be
clicked, and an error toast is precisely the moment a user reaches for Admin.

It surfaced now because the previous commit gave the search glyph a proper hit
area.  At 18px it sat in the gap beneath the toast; grown to the height of the
bar, it moved into the overlap.  The toast has been covering that corner all
along -- there was nothing there to hit.  So this is not a test that needs
loosening: CI found a real defect that predates the change that exposed it.

Toasts now start below the bar.  `--navbar-height` is shared between the bar's
min-height and the offset so the two cannot drift, and the rule matches
`[data-position^='top']` so a future move to bottom-right does not silently
inherit a top offset.  Mantine's own positioning uses `:where()`, which has zero
specificity, so a single class wins.

Tested by `elementFromPoint` rather than by comparing rectangles: that is the
question Cypress's actionability check asks and the one a mouse asks.  A
geometry test would miss a toast that overlaps but sits behind, and a z-index
test would miss one that is in front but elsewhere on screen.  Three cases --
the search control, every control in the corner, and the offset itself, which is
stated separately because the first two would also pass on a toast that merely
happened to be narrow enough to miss at one viewport.  Removing the offset
reddens all three.

Confirmed on the running app with a real error toast up: toast top 70px, bar
bottom 54px, all six corner controls topmost at their own centres.  The e2e
spec passes locally, 12 of 12.

1124 jest / 62 suites, 199 in ui-layout.cy.js, clean npm run build.
2026-08-05 18:38:13 -06:00
..
Button.tsx ui: an icon button is the same height as the button beside it 2026-08-05 18:37:51 -06:00
DataTable.tsx ui: give tables a real header, drop the column grid, quiet the row rules 2026-08-05 18:37:26 -06:00
Feedback.tsx ui: semantic roles, so night and amber can tell severity apart at all 2026-08-05 18:37:28 -06:00
Icon.tsx ui: map the twelve icon names that were rendering as question marks 2026-08-05 18:37:25 -06:00
index.ts ui: nine leaf files off Semantic, and the components they needed 2026-08-05 18:34:49 -06:00
Inputs.tsx fix: break the import cycle that put useCalculators in the TDZ 2026-08-05 18:37:53 -06:00
modal-stack.cy.js review: the spread was overwriting the stack, and the guard was blind 2026-08-05 18:38:09 -06:00
Navigation.tsx ui: nine leaf files off Semantic, and the components they needed 2026-08-05 18:34:49 -06:00
Overlays.tsx review: the spread was overwriting the stack, and the guard was blind 2026-08-05 18:38:09 -06:00
SearchBox.tsx ui: fix the cypress failures, and two real defects behind them 2026-08-05 18:35:07 -06:00
Surfaces.tsx ui: cards get legible titles, contained posters, and meta beside the title 2026-08-05 18:37:49 -06:00
ThemePicker.tsx ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-05 18:34:47 -06:00
toast.test.js ui: semantic roles, so night and amber can tell severity apart at all 2026-08-05 18:37:28 -06:00
toast.ts ui: semantic roles, so night and amber can tell severity apart at all 2026-08-05 18:37:28 -06:00
ui-layout.cy.js fix: toasts were covering the navigation bar's controls 2026-08-05 18:38:13 -06:00
ui.css ui: the corner triggers, the More button, and the search modal 2026-08-05 18:38:04 -06:00
ui.test.js review: the spread was overwriting the stack, and the guard was blind 2026-08-05 18:38:09 -06:00