Skip to content

Commit a20f010

Browse files
committed
site(css): the filter notes stopped overlapping each other
Two sentences rendered on top of one another under CELL SHOWN, illegibly. `.filters .fnote` pinned `grid-row: 3`. That was right while exactly ONE axis had an explanatory sentence - it put the note below both axes so they read as a pair. The concurrency axis added a second sentence, both were placed in the same cell, and a hardcoded row cannot hold two occupants. The row is now left to auto-placement, so each sentence follows the axis it explains - which is also what makes it obvious WHICH control it describes, now that there is more than one. Column 2 is kept, so every sentence still starts at its own chips' left edge rather than the label's, and a hidden axis still takes its note with it. Guarded: the layout test now refuses a hardcoded row on that rule and asserts the block carries more than one sentence, which is the condition that broke it. Proven red by restoring `grid-row: 3`.
1 parent f065280 commit a20f010

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

‎site/style.css‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,14 @@ td.failcell {
584584
line of 0.76rem text run to 1440px is not a sentence anyone reads.
585585
The bound must be legible as WORDS and not only as a highlighted button: the defect this whole surface
586586
exists to prevent is a reader inferring a bar the test never enforced. */
587-
/* Explicitly the THIRD row, so it sits BELOW both axes rather than between them. In DOM order it belongs to
588-
the bound axis (it explains the bound), but auto-placed it split the two axis rows apart and they stopped
589-
reading as a pair - which is the one thing this block exists to make legible. Explicit placement does not
590-
advance the auto cursor, so the cell axis still lands on row 2, and when the bound axis is hidden this
591-
element is hidden with it and the row simply does not exist. */
592-
.filters .fnote { grid-column: 2; grid-row: 3; font-size: .76rem; max-width: 46rem; margin: 0; }
587+
/* IN THE CONTROLS COLUMN, ON THE ROW AFTER ITS OWN AXIS - not pinned to a fixed row.
588+
This was `grid-row: 3`, correct while exactly ONE axis had a sentence: it put the note below both axes
589+
so they read as a pair. A second axis with a sentence (concurrency) then landed in the SAME cell and the
590+
two rendered on top of each other, illegibly - a hardcoded row cannot hold more than one occupant.
591+
Column 2 keeps every sentence starting at its chips' left edge; the row is left to auto-placement so
592+
each note follows the axis it explains, which is also what makes it obvious WHICH control it describes
593+
once there is more than one. A hidden axis still takes its own note with it. */
594+
.filters .fnote { grid-column: 2; font-size: .76rem; max-width: 46rem; margin: 0; }
593595
.filters .fnote:empty { display: none; }
594596
/* CONSISTENT CHIP GEOMETRY WITHIN AN AXIS. "1 ms" and "no bound" are the same kind of choice, so they are
595597
the same size of target; six chips of six different widths was the other half of "ugly". Centred, because

‎site/test.mjs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6639,6 +6639,16 @@ test("UI: the two filter axes are ONE labelled control block, not two ragged row
66396639
assert.ok(note, "the explanatory sentence has its own rule");
66406640
assert.match(note[0], /grid-column:\s*2/, "it starts at the chips' left edge, not the label's");
66416641
assert.match(note[0], /max-width:/, "and is capped rather than running to whatever width the page happens to be");
6642+
/* AND IT IS NOT PINNED TO A FIXED ROW. `grid-row: 3` was correct while exactly one axis had a
6643+
sentence; the concurrency axis added a second, both were placed in the same cell, and they
6644+
rendered on top of each other. A hardcoded row cannot hold two occupants, and the block now has
6645+
three axes - so the row is left to auto-placement and each sentence follows the axis it explains. */
6646+
assert.doesNotMatch(note[0], /grid-row:/,
6647+
`the note's row must not be hardcoded, or a second axis's sentence overlaps the first: ${note[0]}`);
6648+
// More than one axis carries a sentence now, which is what broke the fixed row.
6649+
const html2 = readFileSync(join(HERE, "index.html"), "utf8");
6650+
const notes = (html2.match(/class="fnote muted"/g) || []).length;
6651+
assert.ok(notes >= 2, `the block carries ${notes} explanatory sentences; the layout must hold them all`);
66426652

66436653
// CONSISTENT CHIP GEOMETRY across both axes: "1 ms" and "100 ms" must not be two different-sized chips.
66446654
assert.match(css, /#bound-seg \.seg-btn \{[^}]*min-width:/,

0 commit comments

Comments
 (0)