wrolpi/app/src
Roland 1d4374854a
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-08 18:05:51 -06:00
..
api controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
components ui: let a confirmation choose its width 2026-08-08 18:05:51 -06:00
contexts test: one place for fixtures, real providers instead of mocked context modules 2026-08-08 18:04:04 -06:00
hooks ui: the corner triggers, the More button, and the search modal 2026-08-08 18:05:49 -06:00
themes style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
types ui: the last Semantic UI file, and the stylesheet with it 2026-08-08 18:04:03 -06:00
api.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-08 18:04:01 -06:00
App.css style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
App.js ui: the last Semantic UI file, and the stylesheet with it 2026-08-08 18:04:03 -06:00
DashboardPage.js ui: only the top modal answers Escape, and the audited widths 2026-08-08 18:05:49 -06:00
DashboardPage.test.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-08 18:04:01 -06:00
Events.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-08 18:04:01 -06:00
import-cycles.test.js fix: break the import cycle that put useCalculators in the TDZ 2026-08-08 18:05:47 -06:00
index.css ui: the last Semantic UI file, and the stylesheet with it 2026-08-08 18:04:03 -06:00
index.js Fixing changes before merge. 2023-02-08 21:18:51 -07:00
logo.svg Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
reportWebVitals.js Renaming examples to avoid grouping of pdf with ebooks. Reworking URLs for media files to avoid escaping url safe characters. 2023-03-29 13:46:39 -06:00
semantic-baseline.json ui: the last Semantic UI file, and the stylesheet with it 2026-08-08 18:04:03 -06:00
semantic-baseline.test.js build: uninstall Semantic UI 2026-08-08 18:04:03 -06:00
setupTests.js ui: Common.js and thirteen more files off Semantic 2026-08-08 18:04:00 -06:00
Tags.cy.js Video downloads have many more options. Downloads are migrated. 2024-11-28 09:48:57 -07:00
Tags.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
Tags.test.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
test-fixtures.js test: check declared types, not just field names, and fix the three that were wrong 2026-08-08 18:05:08 -06:00
test-fixtures.test.js test: one place for fixtures, real providers instead of mocked context modules 2026-08-08 18:04:04 -06:00
test-utils.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00
test-utils.test.js style: spell it "color" everywhere 2026-08-08 18:05:50 -06:00