Skip to content

chore(design): audit every locale, and measure CJK in CJK - #198

Merged
chaxus merged 1 commit into
mainfrom
audit-all-locales
Aug 23, 2026
Merged

chore(design): audit every locale, and measure CJK in CJK#198
chaxus merged 1 commit into
mainfrom
audit-all-locales

Conversation

@chaxus

@chaxus chaxus commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

bin/design-audit.mjs is the only thing that measures the rendered pages, so
its blind spots are the design system's blind spots. It had two.

Its page list was six English routes plus /zh-CN/, leaving five languages
unmeasured. It now derives the list from LOCALES in build-pages.mjs -- six
page shapes across all seven languages, plus the three untranslated pages --
so the eighth language will be audited the day it lands. English stays the
default; --all expands to the full matrix.

More importantly, the character probe was hard-coded Latin. Every language
therefore reported 72 characters per line, which looked like perfect
consistency but was really the container width restated in Latin units. The
CJK pages run at 41 full-width characters and that number had never appeared
in any report. The probe now follows .

Measured: Latin 70-72 (band 45-75, fine); CJK 40-41 (band 30-40, one over).
Left as is -- 660 / 16px is 41.25, and pulling only the paragraphs in would
break their alignment with the headings, rules and tables the whole design
hangs on. Recorded in docs/design-system.md so the next person to touch the
type scale knows it is already at the ceiling.

Two contract tests pin the script's own coverage. Reverse-verified: stashing
the design-audit change turns both red.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

bin/design-audit.mjs is the only thing that measures the rendered pages, so
its blind spots are the design system's blind spots. It had two.

Its page list was six English routes plus /zh-CN/, leaving five languages
unmeasured. It now derives the list from LOCALES in build-pages.mjs -- six
page shapes across all seven languages, plus the three untranslated pages --
so the eighth language will be audited the day it lands. English stays the
default; --all expands to the full matrix.

More importantly, the character probe was hard-coded Latin. Every language
therefore reported 72 characters per line, which looked like perfect
consistency but was really the container width restated in Latin units. The
CJK pages run at 41 full-width characters and that number had never appeared
in any report. The probe now follows <html lang>.

Measured: Latin 70-72 (band 45-75, fine); CJK 40-41 (band 30-40, one over).
Left as is -- 660 / 16px is 41.25, and pulling only the paragraphs in would
break their alignment with the headings, rules and tables the whole design
hangs on. Recorded in docs/design-system.md so the next person to touch the
type scale knows it is already at the ceiling.

Two contract tests pin the script's own coverage. Reverse-verified: stashing
the design-audit change turns both red.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chaxus
chaxus enabled auto-merge (rebase) August 23, 2026 05:20
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying document with  Cloudflare Pages  Cloudflare Pages

Latest commit: 384568d
Status: ✅  Deploy successful!
Preview URL: https://f4542d7e.document-7hm.pages.dev
Branch Preview URL: https://audit-all-locales.document-7hm.pages.dev

View logs

@chaxus
chaxus merged commit 369e07c into main Aug 23, 2026
18 checks passed
@chaxus
chaxus deleted the audit-all-locales branch August 23, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant