mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 15:36:18 -05:00
test: act on review — a test that could not pass with Reduce Motion on
The indeterminate test read the band's position out of a running animation and asserted it had left the box. Two problems, and the second is the serious one: it samples a moving target, and under `prefers-reduced-motion` the slide is replaced by `width: 100%` with no negative margin, so the band never leaves the box and the assertion is permanently false. Anyone with Reduce Motion turned on -- or a CI host with it set -- gets a hard failure on a correct build. Reproduced it rather than taking it on faith: forcing the reduced-motion branch for the whole run fails the old form and passes the new one. The band is pinned now, to where the animation's first keyframe puts it, and the assertion is on the clip plus that escape. Deterministic, and true on any machine. Added the other branch too: with motion suppressed the bar fills instead of sliding, and a band that never moves must never leave the box. `text-overflow: ellipsis` on the label. `nowrap` alone stopped it wrapping and being bisected by the clip, but left a hard mid-glyph cut, and the call sites that feed this are exactly the ones with long strings -- Upload.js and FileBrowser.js label with a filename, Files.js with the error string. The one-line test was close to circular: with `nowrap` applied, one line box is almost a restatement of the rule. It now also asserts the computed `nowrap` and `ellipsis`, and that the line is genuinely WIDER than the space it has -- without that, a label that simply fits would satisfy it. Dropped a dead ternary from the air-around-label test; it built a rect nothing used and made it look as though the measurement came from somewhere it did not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
80dbbfa325
commit
52405b71f2
2 changed files with 67 additions and 16 deletions
|
|
@ -1057,10 +1057,17 @@ html .mantine-Notification-closeButton:hover {
|
|||
font-weight: 700;
|
||||
color: var(--text);
|
||||
font-variant-numeric: tabular-nums;
|
||||
/* A long label must not push the bar wider than the column it was given. */
|
||||
/*
|
||||
* A long label is a real case, not a hypothetical: uploads label with a filename
|
||||
* (Upload.js, FileBrowser.js) and a failed refresh labels with the error string.
|
||||
* Without `nowrap` it wraps to a second line inside a 22px bar and the clip bisects
|
||||
* it; with a hard clip and no ellipsis, `Complete: very-long-archive-name.tar.gz`
|
||||
* ends mid-glyph and reads as broken rather than truncated.
|
||||
*/
|
||||
padding: 0 6px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue