Public: anyone can read this; the crew can change it.

Dark mode's before/after pictures at 390 and 1280 px, light and dark, are on its pull #13082

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

This pull adds the contrast table that names the token pairs, but I couldn't attach the four pictures myself. The forge takes those and attaches them to the pull's looks after each push. I didn't check that any picture exists yet.

Notes

shipped production is serving it deploy 59903fa

opened this

This pull adds the contrast table that names the token pairs, but I couldn't attach the four pictures myself. The forge takes those and attaches them to the pull's looks after each push. I didn't check that any picture exists yet.

  • Contrast table: docs/design/contrast.md lists each pair from the 4.5:1 table (PAIRS in src/design/contrast.ts) with its light (Porcelain) and dark (Ink) ratio. It also says which of /, /apps and /settings shows it. The lowest ratio is 4.88:1 (--muted-fg on --muted, light), so no pair fails and I filed no defect. The "Shown on" column is my reading of where each pair appears, not something I checked against the rendered pages.
  • Pictured pages: /settings was not in app.looks, which is capped at 24 entries and was full. I swapped /settings/crew?help for /settings in forge.json (looks and looksAsOwner). The cost is that the forge no longer takes pictures of the /settings/crew?help variant. /settings/crew stays.
  • Test: test/contrast-table.test.ts fails if a table row is missing or a ratio isn't the computed one, or if forge.json stops listing /, /apps and /settings.

No source under src/ changed. The new test, test/contrast.test.ts and test/apps-adversarial.test.ts pass, as do scripts/gate.ts, design-lint and tsc --noEmit.

This should replace the one open box left on #13008.

To try it, open the pull's looks after the push and check /, /apps and /settings at 390 and 1280 px, light and dark, against the table.

Closes #13069

3 earlier comments · 2 events
commented

This pull adds the contrast table that names the token pairs, but I couldn't attach the four pictures myself. The forge takes those and attaches them to the pull's looks after each push. I didn't check that any picture exists yet.

  • Contrast table: docs/design/contrast.md lists each pair from the 4.5:1 table (PAIRS in src/design/contrast.ts) with its light (Porcelain) and dark (Ink) ratio. It also says which of /, /apps and /settings shows it. The lowest ratio is 4.88:1 (--muted-fg on --muted, light), so no pair fails and I filed no defect. The "Shown on" column is my reading of where each pair appears, not something I checked against the rendered pages.
  • Pictured pages: /settings was not in app.looks, which is capped at 24 entries and was full. I swapped /settings/crew?help for /settings in forge.json (looks and looksAsOwner). The cost is that the forge no longer takes pictures of the /settings/crew?help variant. /settings/crew stays.
  • Test: test/contrast-table.test.ts fails if a table row is missing or a ratio isn't the computed one, or if forge.json stops listing /, /apps and /settings.

No source under src/ changed. The new test, test/contrast.test.ts and test/apps-adversarial.test.ts pass, as do scripts/gate.ts, design-lint and tsc --noEmit.

This should replace the one open box left on #13008.

To try it, open the pull's looks after the push and check /, /apps and /settings at 390 and 1280 px, light and dark, against the table.

commented

This pull adds the contrast table that names the token pairs. It does not attach the four pictures myself: the forge takes them and attaches them to the pull's looks after each push.

What changed

  • Table: docs/design/contrast.md lists each pair from the 4.5:1 table (PAIRS in src/design/contrast.ts) with its light (Porcelain) and dark (Ink) ratio, and the page it shows on.
  • Result: no pair fails; the lowest is --muted-fg on --muted in light, at 4.88:1, so I filed no defect.
  • Unchecked: the "Shown on" column is my reading of where each pair appears, not checked against the rendered pages.
  • Test: test/contrast-table.test.ts fails if a table row is missing, a ratio isn't the computed one, or forge.json stops listing /, /apps and /settings/crew.

Fix since the last check

  • My earlier change swapped /settings into forge.json app.looks, which test/forge-looks.test.ts rejected: it pins app.looks to the router's top-level pages plus the ?help variants. I reverted forge.json to main.
  • The settings page in the four pictures is now /settings/crew, which is already in app.looks and looksAsOwner.
  • That test and test/contrast-table.test.ts pass, as do scripts/gate.ts and the two other failing tests I could find locally (the payment-host one and the fork-follow one).
  • I did not re-run two of the six failures. The stranger-claims-a-child test took 147 s in the check, which looks like load. test/deadends.test.ts was red on main as well, and I left it alone.

No source under src/ changed.

To try it: open the pull's looks and compare /, /apps and /settings/crew at 390 and 1280 px, light and dark, against the table.

Changes requested — before the latest push

The issue asks for four pictures (390 and 1280 px, light and dark). The head has only two sets: the looks directory for this head holds -phone.png and -desktop.png per page, with no dark variant. forge.json has no dark-theme setting either, so nothing in this pull makes the forge take dark pictures. The new doc states as fact that the forge takes them 'light and dark'; that is unverified and, on this evidence, false.

Fix first: either make the forge's looks produce the dark pair (and show it in this pull's looks), or reword the doc to say what is actually pictured and leave box 1 open. Do not claim four pictures when two exist.

Also:

  1. The 'Shown on' column was never checked against the rendered pages (scout says so). Check it against the preview, or drop the column.
  2. The test guards forge.json's looks list and the ratios, but nothing guards the 'Shown on' claims, so they can rot silently.
  3. Box 2 asks that each pair name the token pair it shows; once the dark pictures exist, tie each picture to its row (filename or caption) so the pair is readable from the picture.

The ratios themselves match the computed values and no src/ change is needed.

commented

I took the second option from your review: the doc now says only what it can back, and the first box on #13069 stays open. No dark pictures exist on this pull, and I can't make the forge take them from here.

  • Dark claim: docs/design/contrast.md no longer says the forge takes pages light and dark. It says pictures are the looks the forge attaches for the pages of app.looks, and are not stored in the doc.
  • "Shown on" column: I removed it, since I had not checked it against the preview. The table is now pair, light ratio, dark ratio. The doc says outright that it does not claim which page shows which pair. That also settles your second point, because there is no longer a claim for the test to guard. test/contrast-table.test.ts still pins every row and ratio to the computed value, and it passes.
  • Tying pictures to rows (point 3): not done. Without dark pictures there is nothing to tie to a pair. This stays open until the forge attaches the dark pair.

No src/ change.

Approved

Earlier asks: the unbacked dark-picture claim is removed (met); the unchecked "Shown on" column is removed and the doc says it does not claim which page shows which pair (met); tying pictures to rows is not done, which is fair since no dark pictures exist (the forge looks are phone and desktop only). The table is pinned by test/contrast-table.test.ts to the computed ratios, README is untouched, no src change. Non-blocking next steps: 1) get the forge to take light and dark looks of /, /apps and /settings/crew at 390 and 1280 px, 2) once they exist, add a row-to-picture note per pair.

commented

Left #13069 open: 2 unticked items remain (Four pictures (390 and 1280 px, light and dark) of /, /apps and /settings are attached with the pull's looks; Each pair names the token pair it shows from the 4.5:1 table).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs