wrolpi/app/src/components/ui
Roland 5778808b8e review: a busy button is not a disabled one, and night's danger is not red
Acting on the review of #624.  Two bugs, both real, both confirmed in the
browser against the live stylesheet before fixing.

Mantine renders a loading button as `disabled={disabled || loading}`, so every
busy control in the app is `:disabled` -- an APIButton mid-request, the refresh
button, the flasher's connect.  Mantine's own grey repaint is careful to exclude
`[data-loading]` for exactly that reason; the new rule was not, so "working..."
faded to 0.45 and read as unavailable rather than active.  Measured: a loading
button came back at opacity 0.45.  Both roots now mirror Mantine's exclusion.

Night encodes danger as a dashed border on a transparent fill, because it has no
second hue to spend.  The general disabled rule repaints from `--button-bg` --
the filled red Mantine leaves in the variable -- and at (0,2,1) it tied with
`html[data-theme="night"] .wrolpi-button-danger` and won on source order.
Measured: background rgb(255,87,87), border solid transparent.  So the file
browser's Delete, which is role='danger' and disabled until a selection exists,
became a solid red chip in the one theme where that is not what danger means.
Restated at (0,3,1) so it no longer depends on where it sits in the file.

The specificity note in the comment was also wrong, and wrong in a way that
would mislead the next person: Mantine's disabled paint is
`:where(:disabled:not([data-loading]), ...)`, and `:where()` contributes
nothing, so it scores (0,1,0).  The `html` prefix is not needed to beat that --
it is needed to stay level with the app's own `html ...` overrides, and the
night danger collision is the demonstration.

The fade is now `--disabled-opacity`, read by the tests instead of restated, and
asserted for equality rather than against a band -- a band tolerates an
accidental different fade or an opacity leaking in from elsewhere and still
reports success.

Five new cases from the review: loading versus disabled (paired, so it cannot
pass by nothing fading at all), night's dashed danger with a light-theme inverse
proving the fill is not stripped everywhere, cross-colour distinctness in all
four themes rather than only light -- night and amber are where one hue makes
collapse most likely -- and an outline pair checking text and border, which are
the only things a fill-less variant has to lose.  Each planted: dropping the
loading exclusion reddens one, dropping the night restatement reddens one.

1128 jest / 63 suites, 216 in ui-layout.cy.js, clean npm run build.
2026-08-02 16:58:31 -06:00
..
Button.tsx ui: an icon button is the same height as the button beside it 2026-08-02 11:52:59 -06:00
DataTable.tsx ui: give tables a real header, drop the column grid, quiet the row rules 2026-08-01 17:10:03 -06:00
Feedback.tsx ui: semantic roles, so night and amber can tell severity apart at all 2026-08-01 17:54:22 -06:00
Icon.tsx ui: map the twelve icon names that were rendering as question marks 2026-08-01 16:30:20 -06:00
index.ts ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
Inputs.tsx fix: break the import cycle that put useCalculators in the TDZ 2026-08-02 12:41:23 -06:00
modal-stack.cy.js review: the spread was overwriting the stack, and the guard was blind 2026-08-02 16:01:46 -06:00
Navigation.tsx ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
Overlays.tsx review: the spread was overwriting the stack, and the guard was blind 2026-08-02 16:01:46 -06:00
SearchBox.tsx ui: fix the cypress failures, and two real defects behind them 2026-07-30 12:54:24 -06:00
Surfaces.tsx ui: cards get legible titles, contained posters, and meta beside the title 2026-08-02 11:52:59 -06:00
ThemePicker.tsx ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-07-30 09:15:04 -06:00
toast.test.js ui: semantic roles, so night and amber can tell severity apart at all 2026-08-01 17:54:22 -06:00
toast.ts ui: semantic roles, so night and amber can tell severity apart at all 2026-08-01 17:54:22 -06:00
ui-layout.cy.js review: a busy button is not a disabled one, and night's danger is not red 2026-08-02 16:58:31 -06:00
ui.css review: a busy button is not a disabled one, and night's danger is not red 2026-08-02 16:58:31 -06:00
ui.test.js review: the spread was overwriting the stack, and the guard was blind 2026-08-02 16:01:46 -06:00