Skip to content

Resolve button/toast off-scale padding (#202)#203

Merged
dprodger merged 1 commit into
mainfrom
control-padding-token-202
May 29, 2026
Merged

Resolve button/toast off-scale padding (#202)#203
dprodger merged 1 commit into
mainfrom
control-padding-token-202

Conversation

@dprodger

Copy link
Copy Markdown
Owner

Resolves the button / toast vertical padding slice of #202 (the 14pt off-scale value used by ApproachNoteButton and ToastView).

Decision

Per-component, since the two share the value but not the intent:

  • Button — kept at 14pt, but introduced a named token ApproachNoteTheme.controlVerticalPadding so the off-scale value reads as intentional rather than a stray literal. It sizes the pill's tap-target height, not inter-element rhythm, so it deliberately sits outside the spacing scale (between sm=12 and md=16). No visual change.
  • Toast — snapped to spacingMD (16). Its padding is card breathing room, not a tap target, so it belongs on the scale. Toast card is ~4pt taller (2pt top + bottom).

Changes

  • ApproachNoteTheme.swift — new controlVerticalPadding token in a separate, documented "component metrics" extension
  • ApproachNoteButton.swift — adopt the token
  • ToastView.swift14spacingMD
  • doc/design/layout.md — document the off-scale exception and the toast decision

🤖 Generated with Claude Code

Button keeps its 14pt vertical padding but via a new
ApproachNoteTheme.controlVerticalPadding token, semantically distinct
from the spacing scale (sizes the control's tap target, not rhythm).
ToastView snaps to spacingMD (16) since its padding is card breathing
room rather than a tap target. Documented both in doc/design/layout.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dprodger dprodger merged commit 0336c66 into main May 29, 2026
1 check passed
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