TheYuchen commited on
Commit
2e22380
·
1 Parent(s): 530ca91

Typography audit: 9px floor, label/decimal convergence, conventions note

Browse files

Inventoried font sizes, label casing, chip styles and number
formatting across the seven views. The system is already largely
convergent; three real drifts fixed, and the convention is now
written down next to the tokens (index.css UI-conventions block):

- 9px floor: the only two sub-9px labels (CompareView "divergence
point", BlockPicker "plugin" suffix) bumped from 8px to 9px.
- Section-label convention: FinalMetrics' uppercase labels were the
one instance missing tracking-wider.
- Compact-line decimals: the fidelity card's across-runs line mixed a
2dp mean with a 1dp range in one sentence — now 1dp like every
other strip/board stat (headline metrics and mono detail lines
stay 2dp; targets stay whole pp).

Deliberately NOT churned (documented instead): tracking-widest on
palette family badges (distinct role), micro-chips in 28px history
rows and tab count badges (px exceptions), CompareView's 2dp Δ (it
sits in a 2dp mono detail line).

frontend/src/components/BlockPicker.tsx CHANGED
@@ -212,7 +212,7 @@ export function BlockPicker({
212
  <span className="text-[11px] text-ink block truncate">
213
  {n.label}
214
  {isPlugin && (
215
- <span className="ml-1 text-[8px] uppercase tracking-wider text-mute/60">
216
  plugin
217
  </span>
218
  )}
 
212
  <span className="text-[11px] text-ink block truncate">
213
  {n.label}
214
  {isPlugin && (
215
+ <span className="ml-1 text-[9px] uppercase tracking-wider text-mute/60">
216
  plugin
217
  </span>
218
  )}
frontend/src/components/CompareView.tsx CHANGED
@@ -75,7 +75,7 @@ function CompareRow({
75
  )}
76
  {divergence && (
77
  <span
78
- className="ml-1.5 text-[8px] uppercase tracking-wider text-accent"
79
  title="First step where the two compositions differ (node kind, params, or transformation signature). Everything above is shared prefix."
80
  >
81
  divergence point
 
75
  )}
76
  {divergence && (
77
  <span
78
+ className="ml-1.5 text-[9px] uppercase tracking-wider text-accent"
79
  title="First step where the two compositions differ (node kind, params, or transformation signature). Everything above is shared prefix."
80
  >
81
  divergence point
frontend/src/components/ResultsPane.tsx CHANGED
@@ -467,7 +467,7 @@ function FinalMetrics({ metrics }: { metrics: Record<string, unknown> }) {
467
  <div className="grid grid-cols-2 gap-2">
468
  {items.map((m) => (
469
  <div key={m.key} className="panel-alt p-2">
470
- <div className="text-[10px] text-mute uppercase">{m.label}</div>
471
  <div className={`font-mono text-lg ${m.tone ?? "text-ink"}`}>
472
  {m.big}
473
  </div>
 
467
  <div className="grid grid-cols-2 gap-2">
468
  {items.map((m) => (
469
  <div key={m.key} className="panel-alt p-2">
470
+ <div className="text-[10px] uppercase tracking-wider text-mute">{m.label}</div>
471
  <div className={`font-mono text-lg ${m.tone ?? "text-ink"}`}>
472
  {m.big}
473
  </div>
frontend/src/components/results/cards.tsx CHANGED
@@ -601,7 +601,7 @@ function ReplicateStrip({ currentPoint }: { currentPoint: number }) {
601
  <div className="panel-alt p-2 space-y-1">
602
  <div className="text-[10px] text-mute">
603
  Across {points.length} archived runs of this configuration: mean{" "}
604
- {(mean * 100).toFixed(2)}% · range {(min * 100).toFixed(1)}–
605
  {(max * 100).toFixed(1)}%
606
  </div>
607
  <div className="relative h-4 rounded bg-surfaceAlt" aria-hidden>
 
601
  <div className="panel-alt p-2 space-y-1">
602
  <div className="text-[10px] text-mute">
603
  Across {points.length} archived runs of this configuration: mean{" "}
604
+ {(mean * 100).toFixed(1)}% · range {(min * 100).toFixed(1)}–
605
  {(max * 100).toFixed(1)}%
606
  </div>
607
  <div className="relative h-4 rounded bg-surfaceAlt" aria-hidden>
frontend/src/index.css CHANGED
@@ -83,6 +83,34 @@
83
  }
84
  }
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  @layer components {
87
  .panel {
88
  @apply bg-surface border border-edge rounded-xl shadow-card;
 
83
  }
84
  }
85
 
86
+ /* ============================================================
87
+ * UI conventions (typography / spacing / numbers) — audit 2026-07
88
+ *
89
+ * Type scale (floor is 9px — nothing smaller anywhere):
90
+ * text-[9px] micro-annotations only: legend lines, strip labels,
91
+ * role suffixes ("plugin", "divergence point").
92
+ * text-[10px] dense metadata rows, section labels, chip-adjacent
93
+ * stats inside cards/boards.
94
+ * text-[11px] body copy of dense panels (hints, tooltips, captions).
95
+ * text-xs(12) tab labels, toolbar copy, pane headers' metadata.
96
+ * text-sm(14) primary copy, card titles, buttons.
97
+ *
98
+ * Labels: section labels are `text-[10px] uppercase tracking-wider
99
+ * text-mute`; `tracking-widest` is reserved for the palette/picker
100
+ * family badges. Kickers (tour, hints) are `text-xs uppercase
101
+ * tracking-wider text-mute`.
102
+ *
103
+ * Chips: the .chip component (px-2 py-0.5, rounded-full) is the
104
+ * default. Deliberate exceptions: micro-chips inside 28px history
105
+ * rows (px-1, rounded) and count badges inside tabs (!px-1 !py-0).
106
+ *
107
+ * Numbers: all values that update or align vertically render in
108
+ * font-mono or tabular-nums. Percent/pp decimals — headline metric
109
+ * values and mono detail lines: 2dp; compact strips, chips, board
110
+ * stats and legends: 1dp; precision targets are whole pp (±2pp).
111
+ * Units are stated at the value, not in the label.
112
+ * ============================================================ */
113
+
114
  @layer components {
115
  .panel {
116
  @apply bg-surface border border-edge rounded-xl shadow-card;