Skip to content

feat(design-system): add Normal and Compact density - #7535

Draft
mahanti wants to merge 1 commit into
codex/design-system-composerfrom
codex/design-system-density
Draft

feat(design-system): add Normal and Compact density#7535
mahanti wants to merge 1 commit into
codex/design-system-composerfrom
codex/design-system-density

Conversation

@mahanti

@mahanti mahanti commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Adds independent Normal / Compact controls alongside the theme control. Compact reduces default control height from 40px to 32px and panel padding from 24px to 16px while retaining readable text sizes. The preference applies to all design-system pages, shared components, compositions, and portaled menus/dialogs/toasts without remounting inputs or losing their state.

Geometry profiles live together in the public design-token source and generate CSS for both source and compiled consumers. Tailwind's layout rhythm participates; the navigation rail, typography, fine control marks, scrollbars, and resize hit areas keep their dimensions. Foundation pages report the selected profile's values. Density persists locally before mount, synchronizes across tabs, handles invalid saved values, and offers retry when saving fails.

Stack 5 of 6: #7522#7523#7525#7533 → this PR → #7537. Base: codex/design-system-composer. All remain draft.

Validation:

  • Production component/catalog builds and TypeScript pass.

  • Design-system formatting, generated-token freshness, typography, APCA/control contrast, and all 8 token/schema/renderer tests pass.

  • All 29 Chromium tests pass, including density switching by keyboard and pointer, preserved drafts, portal geometry, unchanged typography, persistence across reload/navigation/tabs, save failure and retry, live foundation values, Glass selection, and 390/884/1440px layouts in both themes.

  • Repository-wide just ci stopped in the unchanged Tauri test managed_agents::discovery::bounded_command::tests::returns_when_escaped_descendant_retains_pipe after its descendant-PID parse received an empty value. The isolated rerun passed. No Rust or terminal code is changed; later repository-wide stages were not reached.

Run pnpm --filter buzz-desktop-next dev and open /design/components; Density sits below the theme control. Consumers can use <html data-density="compact"> with the shared stylesheet.

Signed-off-by: Arjun Mahanti <arjun@squareup.com>
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