Repository navigation
style(editor): compact buttons with shared radius tokens - #94
Merged
Merged
Conversation
Replace the mix of 2 to 8 px radii and ad-hoc button heights with two radius tokens and two control-height tokens. Desktop text buttons, menu items and fields are 32 px tall (was 34 to 40 px); narrow screens keep a 36 px regular height. Icon hit areas, tab strip heights and focus rings are unchanged. Document the tokens in DESIGN.md.
Comment on selection and Place pin kept 8 px vertical padding, so they measured 34 px instead of the 32 px control height token.
2 tasks done
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.
Summary
Buttons, menu items and fields in the editor were sized one rule at a time. Text buttons ranged from 32 to 40 px tall depending on the screen (Export 37.5 px, File 35.5 px, Home project rows 40 px, menu items and dialog buttons 36 px, comment Save 32 px), and corner radii were a mix of 2, 3, 4, 5, 6 and 8 px. The result felt heavy next to the denser parts of the editor and looked inconsistent from one surface to the next. The project website already moved to a tighter, single-radius button style, so the editor should follow the same direction at editor density.
This PR adds two radius tokens and two control-height tokens in
apps/web/src/styles.cssand applies them to every text button, field, menu and dialog. Desktop text buttons and fields are now one height (32 px) with a 4 px control radius, and larger surfaces share one 6 px radius. Narrow screens keep a 36 px regular height so tap targets stay comfortable. Colors, layout, behavior and focus treatment are unchanged.What users will see
Affected areas
CSS and docs only. The document model, commands, MCP, saving and import/export are untouched, so those paths do not apply.
Tokens
--radius-control--radius-surface--control-height--control-height-compactScreenshots
Same synthetic workspace and state for each pair, Chromium. Before is
origin/main.Desktop, 1440 x 1000
Editor with a layer selected (header, tool rail, Properties fields, Arrange buttons, zoom):
File menu open:
Export menu open:
Projects dialog:
Comment composer:
Narrow, 390 x 844
Properties panel scrolled to Arrange:
File menu open:
Comment composer:
Verification
Run on Node 24.22.1 and pnpm 12.21.0 in the feature worktree, final commit:
corepack pnpm run check: passed.corepack pnpm run build: passed (Vite's existing chunk size warning only).corepack pnpm run changeset:status --since=origin/main: passed,@open-cavas/webpatch.git diff --check origin/main..HEAD: clean.Real browser (Chromium via agent-browser, dev server on its own ports, synthetic workspace) at 1440 x 1000 and 390 x 844:
origin/main. Review panel was checked on desktop only.getBoundingClientRect: desktop text buttons, menu items, selects, color field and numeric fields all 32 px; narrow equivalents 36 px; icon hit areas and the 40 px narrow tab strip unchanged. Every measured control reported a 4 px radius.:focus-visiblewith a 2 px blue outline and the black separation shadow.Not covered: Firefox and Safari, a real touch device, the Review list with existing threads, and the narrow Projects dialog beyond measurements. Label weight and letter spacing were not changed: only Export uses weight 500 among buttons, so nothing felt heavy enough to lighten.
Docs and limits
DESIGN.mdhas a new Control sizing section with the token table and the fixed sizes that stay outside it, and drops the old "3 to 5 px" radius line..changeset/compact-buttons.mdadds a patch note for@open-cavas/web.docs/verification.mdis not updated with these browser results.🤖 Generated with Claude Code