Skip to content

fix(tipcard): scale the name with the card width - #1313

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/tip-card-name-scale
Aug 23, 2026
Merged

fix(tipcard): scale the name with the card width#1313
bmc08gt merged 1 commit into
code/cashfrom
fix/tip-card-name-scale

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

The tip card derives every metric from its width — the code, the avatar, the corner radius, the name-row padding — except the name itself, which was pinned at textMedium's 16sp. So it read oversized on the 230-wide menu card and undersized on the 305-wide full-screen one.

Figma scales the name with the rest of the card. Both instances land on the same ratio:

Card Width Name
Full screen (node 9277:121421) 302.2 19.10
You page (node 9276:4645) 241.6 15.27

Both are width × 17/269 — the 269-wide base card draws it at 17.

  • Derive the name size from the same width the other metrics come from, keeping textMedium's family, weight, and 1.25 line-height ratio.
  • Converted through the density rather than read as raw .sp: the card is fixed geometry and gets rendered for export, so the name has to hold its proportion whatever the user's font scale is.

Menu card 230 → 14.5sp; scanner / full-screen card up to 305 → 19.3sp.

Also closes a cross-platform divergence: Android drew the name at 16 and iOS at 20 on cards of near-identical width. Mirrors code-payments/code-ios-app#632.

The card already derives every other metric from its width — the code, the
avatar, the corner radius, the name-row padding — but the name itself was
pinned at textMedium's 16sp, so it read oversized on the 230-wide menu card
and undersized on the 305-wide full-screen one.

Figma scales it with the rest of the card: 17 on the 269-wide base, 19.1 on
the 302-wide full-screen card (node 9277:121421), 15.3 on the 242-wide
You-page card (node 9276:4645). Derive it from the same width the other
metrics come from, keeping textMedium's family, weight, and 1.25 line-height
ratio. Converted through the density so the name holds its proportion at any
user font scale, matching the card's fixed geometry.
@github-actions github-actions Bot added the type: fix Bug fix label Aug 23, 2026
@github-actions github-actions Bot added the area: payments Payments, transfers, intents, billing label Aug 23, 2026
@bmc08gt
bmc08gt merged commit d335022 into code/cash Aug 23, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/tip-card-name-scale branch August 27, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: payments Payments, transfers, intents, billing type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant