Consolidate dashboard font sizes onto a three-step type scale - #156
Merged
Conversation
Dashboard CSS used ~25 distinct font sizes, mixing relative `em` values that compounded through nesting with hard-coded pixel values. Sizes drifted apart with no shared vocabulary, so every new component picked an arbitrary value. Introduce `--fs-sm` (11px), `--fs-base` (13px) and `--fs-lg` (15px) on `:root`, set `font-size: var(--fs-base)` on `body`, and map every rule in `src/Client/index.html` onto one of the three tokens. Form controls get an explicit rule because they do not inherit `font-size` from `body`. SVG axis labels keep their user-unit size, since they scale with the chart viewBox rather than the screen. Font weights are normalised alongside to the same small set.
There was a problem hiding this comment.
Pull request overview
Consolidates dashboard typography into shared CSS tokens.
Changes:
- Adds small, base, and large font-size tokens.
- Applies tokens across dashboard components and form controls.
- Documents the SVG axis-label exception.
Show a summary per file
| File | Description |
|---|---|
src/Client/index.html |
Defines and applies the typography scale. |
Review details
Comments suppressed due to low confidence (4)
src/Client/index.html:368
- This introduces
200, although the PR defines the normalized weight set as only400/600. Keep this label at normal weight so the CSS and documented scale agree.
.overview-bd-repo-name { font-size: var(--fs-sm); font-weight: 200; text-transform: uppercase; letter-spacing: 0.6px; color: #6c7086; margin: 0 0 7px; }
src/Client/index.html:907
- This changes the empty-state text from inherited
400to200, contrary to the PR's stated400/600normalization. Keep it at400unless the documented weight scale is intentionally expanded.
font-weight: 200;
src/Client/index.html:950
- This adds a
200weight outside the PR's documented400/600set and changes the title from its previous inherited normal weight. Use400to preserve the stated normalization.
font-weight: 200;
src/Client/index.html:676
- The new
200weight falls outside the PR's stated normalized400/600set and makes this label lighter than its previous inherited normal weight. Use400here.
.modal-field-label { font-size: var(--fs-base); font-weight: 200; color: #a6adc8; text-transform: uppercase; letter-spacing: 0.04em; }
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Medium
0101
enabled auto-merge (squash)
July 29, 2026 11:30
0101
added a commit
that referenced
this pull request
Jul 29, 2026
Treemon's mechanical sync conflicted and aborted; resolved by hand. main added repository-declared diff categories (#155) and consolidated the dashboard font sizes (#156) while this branch moved the scheduler state slice into SchedulerState and reshaped worktreeApi's dependencies, so the two collided on five files: - WorktreeApi: kept both sides - main's diffCategoryReport helper and this branch's WorktreeApiDependencies record. The record already carries AutoSyncStore, which main's positional signature did not have. - CanvasDocServer: took main's resolveDiffTarget (it replaces the older getDiffComparisonContext) and retyped it to SchedulerState.StateMsg, dropping the stale duplicate resolver body this branch still had. - DiffEndpointTests: took main's deletion - those helpers now live in the new DiffEndpointTestHelpers.fs. This branch's only edits there were the module rename, which is reapplied below. - CanvasDocServerTests: kept main's new repoId binding with this branch's SchedulerState.createAgent. - worktree-monitor.md: kept this branch's GitWorktree/GitBranchSync rows and took main's TreemonConfig row, which now names the diffCategories read. main's new files still referenced RefreshScheduler for the state members this branch moved, so DiffEndpointTestHelpers.fs, DiffCategoryEndToEndTests.fs and one WorktreeApi call site were repointed at SchedulerState. Server, client and tests build clean; fast suite 1878 passed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 80f775f5-e421-45b9-acac-d4f981b3f691
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The dashboard CSS in
src/Client/index.htmlhad accumulated roughly 25 distinct font sizes with no shared vocabulary:emvalues (0.7em,0.75em,0.78em,0.8em,0.82em,0.85em,0.88em,0.9em,0.95em,1.05em) that compound through nesting — a0.82embadge inside a0.9emrow renders at neither size.10px,10.5px,11px,11.5px,12.5px,15px) that were immune to any global adjustment.font-sizeonbody, so everything was relative to the UA default (16px), and form controls silently fell back to 13.333px Arial.The result: sizes that drifted apart for no design reason, and no answer to "what size should this new component be?"
Changes
Introduce a three-step type scale as CSS custom properties on
:rootand map every rule onto it:--fs-sm--fs-base--fs-lgbodynow setsfont-size: var(--fs-base), so the scale has a real anchor instead of the UA default.button, input, select, textarea { font-size: var(--fs-base); }rule — form controls do not inheritfont-size, so without it they revert to the browser default font.em-based sizes replaced with tokens, removing the compounding problem entirely..history-charts .axis-label, which is SVG text inside a fixed760x170viewBox. Its size is in user units that scale with the chart, not screen pixels, so it is deliberately not a scale token. A comment documents this.400/600), replacing scattered500/700values.--fs-smfor.main-behind, and.nav-hint kbddrops its redundant nested0.9em.Pure CSS change — no F# or behaviour changes.
Tests
No test changes. The diff touches only
<style>content insrc/Client/index.html; existing E2E tests assert on CSS classes and DOM structure, which are unchanged.