fix(ui): tighter order card — calculator-scale font, corner-flush ✕;
Tests · UI / test (push) Has been cancelled
Tests · UI / test (pull_request) Successful in 2m47s

stabilise report-sections e2e

Owner review on PR #58:

- shrink the order-card body to 0.8rem (matching the calculator's body
  text scale) so the order list reads as part of the sidebar's
  density, not its own larger surface;
- shrink the delete ✕ to 0.95rem and glue it flush to the card's
  top-right corner (no offset, sized to fit the corner padding-space);
- tighten the card padding to match the smaller text.

Independently — the same review asked to fix `report-sections › every
TOC anchor lands its section in view`, which had been a long-standing
e2e flake (run #366 on `development` already failed it twice before
passing on retry; my PR's run #367 simply exhausted all five retries).
The root cause is the smooth `scrollIntoView` settling slower than
Playwright's 5 s viewport wait under heavy CI load. The production
TOC already honours `prefers-reduced-motion: reduce` and swaps to an
instant scroll there; switching the Playwright config to that media
mode makes every spec deterministic without touching production code.
This commit is contained in:
Ilia Denisov
2026-05-26 08:28:58 +02:00
parent 5ca30df334
commit 2294d8b3d9
3 changed files with 30 additions and 13 deletions
+9 -4
View File
@@ -114,10 +114,15 @@ as `--color-danger-subtle`, and `draft` / `valid` / `submitting` as
`--color-warning-subtle` (the "not yet acknowledged by the server"
group, including the offline mode). The textual status name stays in
the DOM as a `.sr-only` node so screen readers and the existing
`order-command-status-N` testids still observe it. The per-row delete
control is a small framed `✕` button absolutely positioned in the
card's top-right corner — always visible (no hover-only reveal) and
labelled by `game.sidebar.order.command_delete` for assistive tech.
`order-command-status-N` testids still observe it. Card text sits at
`0.8rem` — the same scale the calculator tab uses for its body labels
— so the order list reads as part of the same sidebar density rather
than its own larger surface. Long labels wrap inside the card
(`overflow-wrap: anywhere`) instead of being truncated. The per-row
delete control is a tiny framed `✕` flush against the card's
top-right corner (no offset, sized to fit the corner padding-space)
— always visible, never hover-only, and labelled by
`game.sidebar.order.command_delete` for assistive tech.
## Discriminated union shape