wrolpi/app/src
Roland 80dbbfa325
ui: progress bars get room for their label, and keep their band inside
Three things, plus an answer to why two sets of bars on the same page were
spaced differently.

The bar was 16px tall with an 11px bold label, leaving about half a pixel of air
above and below.  On the Status page that is 44 of them.  Now 22px with a 12px
label -- these labels carry device names and units, not just a number.

The indeterminate band escaped the bar.  It slides on `margin-left` from -35% to
100%, and nothing clipped it, so the animation ran from outside the left edge to
outside the right one.  `overflow: hidden` on the bar.

The CPU and RAM bars were touching while the drive-bandwidth bars on the same
page were not, and the difference was not the bars: CPU and RAM are bare
siblings inside a Panel, while each bandwidth bar sits alone in a Grid column
and takes its spacing from the Grid.  `* + .wrolpi-progress` distinguishes those
two by itself -- it fires only when a bar actually follows something, so an
only-child bar in a column is untouched.  A blanket margin would have doubled
the Grid's gutter, and that is asserted too.

The gallery gains a Progress section: six percentages, custom labels, no label,
indeterminate, and the four roles.  Its own demo gaps were removed so what it
shows is the spacing the component really has.

MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1
against the fill in light -- the brightness filter is what buys that -- but 2.35
in dark, 2.48 in night and 2.74 in amber.  Against the empty track it is 5.2 to
15:1 everywhere.  Reaching AA over the fill needs the label drawn twice and
clipped at the fill boundary so each half takes its own colour, and in night not
even that suffices: `--text` is only about 4:1 against pure black and a fill is
lighter than black by definition.  Recorded in ui.css and in the test, which
asserts the track half only rather than picking a threshold low enough to pass.

One test was unfalsifiable and is rewritten.  "Keeps a long label from widening
the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no
part in its parent's width.  What a long label actually does is wrap to a second
line inside a 22px bar and get cut in half by the new clip, so the test measures
line boxes now.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 18:37:42 -06:00
..
api controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
components ui: progress bars get room for their label, and keep their band inside 2026-08-05 18:37:42 -06:00
contexts test: one place for fixtures, real providers instead of mocked context modules 2026-08-05 18:36:48 -06:00
hooks build: uninstall Semantic UI 2026-08-05 18:36:31 -06:00
themes test: act on review — and correct an overstated claim about the toast bug 2026-08-05 18:37:29 -06:00
types ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -06:00
api.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
App.css ui: headings open their section, and keep their help icon on one line 2026-08-05 18:37:32 -06:00
App.js ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -06:00
DashboardPage.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
DashboardPage.test.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
Events.js ui: thirty-five files off Semantic, leaving fifteen 2026-08-05 18:34:58 -06:00
index.css ui: the last Semantic UI file, and the stylesheet with it 2026-08-05 18:36:26 -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-05 18:36:26 -06:00
semantic-baseline.test.js build: uninstall Semantic UI 2026-08-05 18:36:31 -06:00
setupTests.js ui: Common.js and thirteen more files off Semantic 2026-08-05 18:34:50 -06:00
Tags.cy.js Video downloads have many more options. Downloads are migrated. 2024-11-28 09:48:57 -07:00
Tags.js ui: map the twelve icon names that were rendering as question marks 2026-08-05 18:37:25 -06:00
Tags.test.js ui: tags look like tags, and stay readable in every theme 2026-08-05 18:37:13 -06:00
test-fixtures.js test: check declared types, not just field names, and fix the three that were wrong 2026-08-05 18:37:01 -06:00
test-fixtures.test.js test: one place for fixtures, real providers instead of mocked context modules 2026-08-05 18:36:48 -06:00
test-utils.js test: the theme drives the colour scheme, and mockModule takes the module 2026-08-05 18:36:53 -06:00
test-utils.test.js test: the theme drives the colour scheme, and mockModule takes the module 2026-08-05 18:36:53 -06:00