mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
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> |
||
|---|---|---|
| .. | ||
| api | ||
| components | ||
| contexts | ||
| hooks | ||
| themes | ||
| types | ||
| api.js | ||
| App.css | ||
| App.js | ||
| DashboardPage.js | ||
| DashboardPage.test.js | ||
| Events.js | ||
| import-cycles.test.js | ||
| index.css | ||
| index.js | ||
| logo.svg | ||
| reportWebVitals.js | ||
| semantic-baseline.json | ||
| semantic-baseline.test.js | ||
| setupTests.js | ||
| Tags.cy.js | ||
| Tags.js | ||
| Tags.test.js | ||
| test-fixtures.js | ||
| test-fixtures.test.js | ||
| test-utils.js | ||
| test-utils.test.js | ||