wrolpi/app/src/components/ui
Roland 1f890668b2
ui: a disabled button keeps its own colour
The file browser's footer is eight buttons, six of them disabled until something
is selected, so the toolbar a user meets on arriving at /files was an
undifferentiated grey row: Delete, Rename, Move, Ignore and Tag rendered as five
identical pixels.  Colour is how those are told apart at a glance.

Mantine repaints a disabled button flat grey -- background, text and border all
replaced with `--mantine-color-disabled`.  Semantic kept the colour and dropped
the whole control to `opacity: 0.45`; measured on the QA Pi, a disabled Delete
is still red at 0.45, Rename still yellow, Tag still violet.  That is the better
signal: it says "not available" without also saying "no longer the delete
button".

Mantine leaves the variables alone and overrides only the painted properties, so
the colour the call site asked for is still sitting in `--button-bg` and can
simply be reinstated.  Applies to every disabled Button and ActionIcon, not only
the file browser's -- it is one convention, and having two would be worse than
either.

A pre-existing test earned its keep here: the IconStack corner disc was pinned
to `--mantine-color-disabled` so it would follow a disabled button's grey, and
it reddened the moment the button stopped being grey.  That override is gone;
`--button-bg` is now correct in both states, so the general rule covers them.

Ten new cases.  Fill equality is checked against each button's own enabled twin
in all four themes, and separately across the five colours at once -- comparing
each against its twin would still pass if every pair were grey, which is the
actual bug.  Opacity is asserted from both sides, because keeping the colour
must not cost the affordance.  Removing the rule reddens eleven.

1128 jest / 63 suites, 209 in ui-layout.cy.js, clean npm run build.
2026-08-08 18:05:49 -06:00
..
Button.tsx ui: an icon button is the same height as the button beside it 2026-08-08 18:05:47 -06:00
DataTable.tsx ui: give tables a real header, drop the column grid, quiet the row rules 2026-08-08 18:05:45 -06:00
Feedback.tsx ui: semantic roles, so night and amber can tell severity apart at all 2026-08-08 18:05:46 -06:00
Icon.tsx ui: map the twelve icon names that were rendering as question marks 2026-08-08 18:05:45 -06:00
index.ts ui: nine leaf files off Semantic, and the components they needed 2026-08-08 18:04:00 -06:00
Inputs.tsx fix: break the import cycle that put useCalculators in the TDZ 2026-08-08 18:05:47 -06:00
modal-stack.cy.js review: the spread was overwriting the stack, and the guard was blind 2026-08-08 18:05:49 -06:00
Navigation.tsx ui: nine leaf files off Semantic, and the components they needed 2026-08-08 18:04:00 -06:00
Overlays.tsx review: the spread was overwriting the stack, and the guard was blind 2026-08-08 18:05:49 -06:00
SearchBox.tsx ui: fix the cypress failures, and two real defects behind them 2026-08-08 18:04:01 -06:00
Surfaces.tsx ui: cards get legible titles, contained posters, and meta beside the title 2026-08-08 18:05:47 -06:00
ThemePicker.tsx ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-08 18:04:00 -06:00
toast.test.js ui: semantic roles, so night and amber can tell severity apart at all 2026-08-08 18:05:46 -06:00
toast.ts ui: semantic roles, so night and amber can tell severity apart at all 2026-08-08 18:05:46 -06:00
ui-layout.cy.js ui: a disabled button keeps its own colour 2026-08-08 18:05:49 -06:00
ui.css ui: a disabled button keeps its own colour 2026-08-08 18:05:49 -06:00
ui.test.js review: the spread was overwriting the stack, and the guard was blind 2026-08-08 18:05:49 -06:00