wrolpi/app/src/components/ui
Roland 05b1c75310 ui: let a confirmation choose its width
Confirm hardcoded `size='tiny'` and its props interface accepted no size, so every
confirmation in the app was 380px whatever it held.  That is right for eight of the
nine call sites and for the ~30 prose confirmations `useAPIButton` renders behind a
`confirmContent` -- and wrong for TaggedDeleteConfirmModal, which lists file paths
beside their tags in a two-column table and had no way to say so.

`size` is now a default, not a fixture, in the same vocabulary as Modal.  Only
TaggedDeleteConfirmModal changes: `large`, 620px.  The table scrolls sideways in its
own container, so the width decides how much of a path is readable without dragging,
and at 380px that was the first two directories.

Tests, written first:

- Confirm resolves to `sm` by default and `lg` when a call site asks, measured off
  the `--modal-size` Mantine writes on the modal root rather than restated.
- TaggedDeleteConfirmModal renders at `lg` while a plain confirmation beside it stays
  `sm`, so it cannot pass by confirmations having become wide for everyone.
- The existing "no unknown size name" guard now scans `<Confirm` too, since Confirm
  forwards the name to Modal and is the same hazard, with a premise check that at
  least one confirmation names a size.

Both new tests read EVERY modal root, not the first.  A modal is portalled to
document.body, so two renders in one test both land there and querySelector returns
whichever opened first -- which is how the first version reported the default twice
and read as though the size prop had no effect.

The gallery gains the wide confirmation next to the narrow one, so both are
checkable in all four themes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-03 14:06:25 -06:00
..
Button.tsx ui: the map pin buttons were three sizes for three reasons 2026-08-02 17:58:25 -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 style: spell it "color" everywhere 2026-08-02 18:36:47 -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 ui: let a confirmation choose its width 2026-08-03 14:06:25 -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 style: spell it "color" everywhere 2026-08-02 18:36:47 -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 style: spell it "color" everywhere 2026-08-02 18:36:47 -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 style: spell it "color" everywhere 2026-08-02 18:36:47 -06:00
ui.css style: spell it "color" everywhere 2026-08-02 18:36:47 -06:00
ui.test.js ui: let a confirmation choose its width 2026-08-03 14:06:25 -06:00