Adopt the type scale, starting with components/ui #1758

Closed
opened 2026-11-02 04:14:36 +00:00 by sam · 2 comments
Owner

ui/src/style.css defines text-micro, text-caption, text-label and text-title, but the tree has about 250 text-xs against 23 text-caption, plus text-sm, text-lg, text-2xl and arbitrary sizes.

The shared components set the pattern: Button sm/xs and Toggle use text-[0.8rem] (ui/src/components/ui/button/index.ts:30-31, toggle/index.ts:17), and Badge, SettingRow, MetadataList, SecretReference, Tooltip, Kbd, EmptyContent and EmptyDescription use text-xs/text-sm. QuestionnaireChoice.vue:193 uses text-[0.625rem] (= text-micro). Page headings use text-2xl (ui/src/tasks/TaskHeader.vue:127, ui/src/accounts/AccountEntry.vue:35).

Done when: components/ui uses only the scale, then pages follow (captions to text-caption, rows and controls to text-label, panel titles to text-title); rendered markdown may keep Tailwind steps.

`ui/src/style.css` defines `text-micro`, `text-caption`, `text-label` and `text-title`, but the tree has about 250 `text-xs` against 23 `text-caption`, plus `text-sm`, `text-lg`, `text-2xl` and arbitrary sizes. The shared components set the pattern: Button `sm`/`xs` and Toggle use `text-[0.8rem]` (`ui/src/components/ui/button/index.ts:30-31`, `toggle/index.ts:17`), and Badge, SettingRow, MetadataList, SecretReference, Tooltip, Kbd, EmptyContent and EmptyDescription use `text-xs`/`text-sm`. `QuestionnaireChoice.vue:193` uses `text-[0.625rem]` (= `text-micro`). Page headings use `text-2xl` (`ui/src/tasks/TaskHeader.vue:127`, `ui/src/accounts/AccountEntry.vue:35`). Done when: components/ui uses only the scale, then pages follow (captions to `text-caption`, rows and controls to `text-label`, panel titles to `text-title`); rendered markdown may keep Tailwind steps.
sam added the mediumtask labels 2026-11-02 04:14:36 +00:00
sam self-assigned this 2026-11-02 04:14:36 +00:00
Author
Owner

Fixed in 94f79177 and pushed. components/ui now uses only the scale: text-[0.8rem]→text-label (button/toggle sm), text-[0.625rem]→text-micro (questionnaire shortcut), text-xs→text-caption, text-sm/text-base→text-label, title sizes→text-title. Pages follow with the same mapping (196 files total, pure class-token swaps); rendered markdown (ChatMarkdown/ChatInline/markdown.ts) keeps Tailwind steps per the issue. Verified: task check passed on the committed tree; no test or e2e asserts on the old tokens. Note this slightly resizes controls/captions (0.875→0.8125rem, 0.75→0.6875rem) — worth a visual pass in the browser.

Fixed in 94f79177 and pushed. components/ui now uses only the scale: text-[0.8rem]→text-label (button/toggle sm), text-[0.625rem]→text-micro (questionnaire shortcut), text-xs→text-caption, text-sm/text-base→text-label, title sizes→text-title. Pages follow with the same mapping (196 files total, pure class-token swaps); rendered markdown (ChatMarkdown/ChatInline/markdown.ts) keeps Tailwind steps per the issue. Verified: task check passed on the committed tree; no test or e2e asserts on the old tokens. Note this slightly resizes controls/captions (0.875→0.8125rem, 0.75→0.6875rem) — worth a visual pass in the browser.
Author
Owner

Triaged: no code change is needed for this. No code change is needed: the tree already does what issue #1758 asks for, so the issue is stale and can be closed.

What the issue claims, checked against ui/src:

  • "~250 text-xs against 23 text-caption": text-xs does not appear anywhere in the repository (repo-wide grep: no matches). text-caption now appears in 280+ lines across every feature folder (settings, workflows, tasks, chat, accounts, and components/ui).
  • "Button sm/xs and Toggle use text-[0.8rem]": ui/src/components/ui/button/index.ts:30 reads text-caption for size xs and line 31 reads text-label for size sm; ui/src/components/ui/toggle/index.ts:17 reads text-label for size sm. No text-[0.8rem] remains.
  • "Badge, SettingRow, MetadataList, SecretReference, Tooltip, Kbd, EmptyContent, EmptyDescription use text-xs/text-sm": Badge uses text-caption, Kbd uses text-caption, SettingRow uses text-label/text-caption, SecretReference text-label/text-caption, MetadataList text-caption, EmptyContent/EmptyDescription/EmptyTitle text-label; TooltipContent contains no text-size utility at all. No text-xs or text-sm in components/ui.
  • "QuestionnaireChoice.vue:193 uses text-[0.625rem]": that line now uses text-micro, the named equivalent.
  • "Page headings use text-2xl (TaskHeader.vue:127, AccountEntry.vue:35)": text-2xl appears nowhere in the repo; TaskHeader.vue:127 uses text-title and AccountEntry.vue:34 uses text-title.

The scale itself is defined in ui/src/style.css:66-69 (--text-micro: 0.625rem, --text-caption: 0.6875rem, --text-label: 0.8125rem, --text-title: 0.9375rem), and ui/AGENTS.md:53-54 already carries the rule to use text-caption/text-label/text-title instead of pixel sizes.

Residual off-scale sizes, and why they are not work: a grep for text-sm/text-base/text-lg/text-xl/text-2xl/arbitrary rem-px-em sizes across ui/src returns only ui/src/chat/ChatMarkdown.vue:26,61,67,73 (markdown headings and a table at 0.92em) and ui/src/chat/ChatInline.vue:21 (inline code at 0.9em). Both are rendered markdown, which the issue's own completion criteria exclude ("rendered markdown may keep Tailwind steps"). The only remaining arbitrary text-[...] values in components/ui are colours (text-[CanvasText] in NativeSelectOptGroup/NativeSelectOption), not sizes; no CSS or HTML file declares a font-size outside the @theme block.

So both stages of the stated "done when" (components/ui first, then pages) hold in the current tree. There is no defect to reproduce and no design decision left, which is why no workflow is proposed.

Triaged: no code change is needed for this. No code change is needed: the tree already does what issue #1758 asks for, so the issue is stale and can be closed. What the issue claims, checked against ui/src: - "~250 text-xs against 23 text-caption": `text-xs` does not appear anywhere in the repository (repo-wide grep: no matches). `text-caption` now appears in 280+ lines across every feature folder (settings, workflows, tasks, chat, accounts, and components/ui). - "Button sm/xs and Toggle use text-[0.8rem]": `ui/src/components/ui/button/index.ts:30` reads `text-caption` for size `xs` and line 31 reads `text-label` for size `sm`; `ui/src/components/ui/toggle/index.ts:17` reads `text-label` for size `sm`. No `text-[0.8rem]` remains. - "Badge, SettingRow, MetadataList, SecretReference, Tooltip, Kbd, EmptyContent, EmptyDescription use text-xs/text-sm": Badge uses `text-caption`, Kbd uses `text-caption`, SettingRow uses `text-label`/`text-caption`, SecretReference `text-label`/`text-caption`, MetadataList `text-caption`, EmptyContent/EmptyDescription/EmptyTitle `text-label`; TooltipContent contains no text-size utility at all. No `text-xs` or `text-sm` in components/ui. - "QuestionnaireChoice.vue:193 uses text-[0.625rem]": that line now uses `text-micro`, the named equivalent. - "Page headings use text-2xl (TaskHeader.vue:127, AccountEntry.vue:35)": `text-2xl` appears nowhere in the repo; TaskHeader.vue:127 uses `text-title` and AccountEntry.vue:34 uses `text-title`. The scale itself is defined in `ui/src/style.css:66-69` (`--text-micro: 0.625rem`, `--text-caption: 0.6875rem`, `--text-label: 0.8125rem`, `--text-title: 0.9375rem`), and `ui/AGENTS.md:53-54` already carries the rule to use text-caption/text-label/text-title instead of pixel sizes. Residual off-scale sizes, and why they are not work: a grep for text-sm/text-base/text-lg/text-xl/text-2xl/arbitrary rem-px-em sizes across ui/src returns only `ui/src/chat/ChatMarkdown.vue:26,61,67,73` (markdown headings and a table at 0.92em) and `ui/src/chat/ChatInline.vue:21` (inline code at 0.9em). Both are rendered markdown, which the issue's own completion criteria exclude ("rendered markdown may keep Tailwind steps"). The only remaining arbitrary `text-[...]` values in components/ui are colours (`text-[CanvasText]` in NativeSelectOptGroup/NativeSelectOption), not sizes; no CSS or HTML file declares a font-size outside the @theme block. So both stages of the stated "done when" (components/ui first, then pages) hold in the current tree. There is no defect to reproduce and no design decision left, which is why no workflow is proposed.
sam closed this issue 2026-11-06 22:18:35 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1758