Skip to content

Every button is a PulseButton, at least 52dp tall - #61

Merged
gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd
Nov 4, 2026
Merged

gabrielbr merged 1 commit into
mainfrom
ccr-67ccb970-dqwwqd

Conversation

@gabrielbr

Copy link
Copy Markdown
Owner

This closes P2-1 from the v2.11.56 design-system audit. The design system wants every button at least 52dp tall; PulseLoop's were Material3's default 40dp.

Audit: audits/2026-11-04-v2.11.57-pulse-button.md. It has one section per skill and scores 18/20, with no P0/P1/P2 findings left open.

Changes

  • ui/components/PulseButton.kt: a single PulseButton(style, onClick, …) with four styles: Filled, Tonal, Outlined and Text.
    • Minimum height is 52dp (heightIn(min = 52.dp)). Because it's a minimum, not a fixed height, a long pt-BR label or a large font makes the button grow instead of clipping.
    • Pressing scales it to 97%, which respects Android's "Remove animations" setting.
    • Colours, border, shape and padding default to the matching Material3 button's.
  • All 247 direct Material button calls in 32 files now use it. The fixed 48/52/56dp heights that some buttons had are removed.
  • PulseButtonTest fails if any code calls a Material button directly (Glance widgets are exempt), and it pins the 52dp minimum.
  • AGENTS.md carries the rule.

Not done in this PR

  • Design canvas: its tools weren't reachable from this session, so the canvas buttons (.btn 48px and .btn.sm 40px) still need to become 52px.
  • Design-system repo: the button size token exists only in the uikit layer. I propose moving it to core so PulseLoop's tokens include it. This session can't write to that repo.
  • P3-2, button corners: the system's buttons use a 4dp corner radius, while PulseLoop's keep Material's pill shape. This is your call.

Generated by Claude Code

The design system sets buttons at a 52dp minimum; PulseLoop's were
Material3 defaults (40dp, 48dp target). One PulseButton(style, ...)
now wraps Filled / Tonal / Outlined / Text with heightIn(min = 52dp)
and the 97% press scale, and all 247 direct Material button calls go
through it. Fixed 48-56dp heights on buttons are gone; the height is a
minimum, so long pt-BR labels grow the button. PulseButtonTest fails on
a direct Material button call.

Audit: audits/2026-11-04-v2.11.57-pulse-button.md

Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
@gabrielbr
gabrielbr merged commit 53bfc1c into main Nov 4, 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.

2 participants