Skip to content

refactor(ui): unify type scale and shell density - #201

Merged
Blankll merged 5 commits into
masterfrom
refactor/ui-density-tokens
Nov 2, 2026
Merged

Blankll merged 5 commits into
masterfrom
refactor/ui-density-tokens

Conversation

@Blankll

@Blankll Blankll commented Oct 30, 2026

Copy link
Copy Markdown
Member

Summary

Full implementation of the UI density / typography consistency review: a single token-driven type scale replaces the 20+ ad-hoc font sizes, and the shell is re-densified so navigation and lists stop competing with data surfaces.

Type scale (token-driven)

  • index.css defines --font-size-caption / dense / body / form / title / page-title = 11 / 12 / 13 / 14 / 16 / 20px; uno.config.ts maps the two sizes missing from the default scale (text-caption, text-body); the rest reuse text-xs / sm / base / xl.
  • Every bare px/rem font-size in components is replaced by scale tokens (136 declarations across 52 files, incl. the whole AI panel with its 8.5–13.5px fractional sizes); text-[8/9/10/11px] collapses into text-caption, removing sub-11px state text.
  • Ordered markdown heading hierarchy in agent messages: 20/16/14/13/12/11px.

Base components

  • CardTitle 24px → 16px; dialog / alert titles 18px → 16px.
  • Button sizes: new xs 24px, sm 28px (was identical to default), icon-sm / icon-xs variants — removes the need for per-component h-6/h-7 overrides.

Shell density

  • Navigation rail 64 → 56px, entries 40×40 → 36×36, user area 56 → 48px; dead AI badge removed.
  • Object tree 14px → 12px text on uniform 24px rows (aligns with the spec's dense-data rule); connection selector rows at 13px; saved-query names at 13px.
  • Status dots unified (8px inline / 10px standalone); vendor logos fixed to 14 / 16 / 20px; dropdown-menu icons on the shared 16px size.
  • Grid toolbar fixed at 36px to match the result toolbar; query-tab DbTypeIcon 12 → 14px; TransferPage title aligned to the page-title level.

Docs

  • DESIGN.md typography/layout/shapes/buttons sections updated with the scale, icon scale, status-dot and vendor-logo rules, and the "no bare font-size" constraint.

Test plan

  • npm run lint:check clean
  • npm run build passes (text-caption / text-body verified in emitted CSS)
  • npm test — 855 tests pass (61 suites)
  • Manual: light/dark screenshots at 1280 / 1600 widths (shell, query page, connections, settings, AI panel)

- Add a token-driven type scale in index.css (--font-size-caption/dense/
  body/form/title/page-title = 11/12/13/14/16/20px) and map the two
  missing sizes as text-caption / text-body in uno.config.ts
- Replace every bare px/rem font-size in components with scale tokens
  (136 declarations across 52 files) and collapse text-[8/9/10/11px]
  into text-caption, removing sub-11px state text
- Fix base components: CardTitle 24px -> 16px, dialog/alert titles
  18px -> 16px, button size variants now xs=24px / sm=28px / default
  32px / lg=36px with matching icon-sm / icon-xs
- Compact the shell: navigation rail 64 -> 56px with 36x36 entries,
  object tree text 14 -> 12px on uniform 24px rows, connection
  selector rows at 13px, status dots unified (8px inline / 10px
  standalone), vendor logos fixed to 14/16/20px
- Unify workspace chrome: grid toolbar fixed at 36px like the result
  toolbar, dropdown menu icons on the shared 16px size, JSON row
  action raised to a 24px target
- AI / transfer surfaces mapped onto the scale with an ordered
  markdown heading hierarchy (20/16/14/13/12/11px)
- Document the scale, icon scale, and density rules in DESIGN.md
Sidebar trees and query tabs are reading-distance surfaces, not
data-density surfaces: mainstream desktop clients put sidebar trees at
13-14px text on ~28px rows and tab labels at 13px+. Object tree rows,
the tree search input, and query tab labels move from text-xs (12px)
to text-body (13px), which puts tree rows at 28px (20px line + 8px
padding). Empty-state hints and grid/toolbars stay on the 12px dense
tier; DESIGN.md scale-usage and layout tables updated.
@Blankll
Blankll force-pushed the refactor/ui-density-tokens branch from 485fdbb to 1f92b3d Compare November 2, 2026 13:51
@Blankll
Blankll merged commit 9768d3c into master Nov 2, 2026
3 checks passed
@Blankll
Blankll deleted the refactor/ui-density-tokens branch November 2, 2026 14:49
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