Skip to content

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

Merged
bmc08gt merged 2 commits into
mainfrom
fix/tip-card-name-scale
Aug 23, 2026
Merged

fix(tipcard): scale the name with the card width#632
bmc08gt merged 2 commits into
mainfrom
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's padding — except the name itself, which was pinned at appDisplayXS's 20. So it read oversized on the 242-wide You-page card and undersized on the 302-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 appDisplayXS's family and weight. You page 242 → 15.3, expanded and bill canvas 302 → 19.1, tips-flow screen 300 → 19.0.

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


Also: expand the card as one figure.

Making the name width-derived surfaced a latent problem in the You-tab expansion. The card was laid out at a different size on each side of the transition, so every metric it derives from that size animated as an independent value — and font size isn't animatable at all, so the name snapped. The parts arrived at different moments and overlapped mid-flight.

The card is now drawn once at the widest size it ever reaches (302) and the expansion runs as a single scaleEffect. The whole figure travels together, and since the scale only ever goes down from the drawn size, the card is never sampled up. Layout is unchanged — the fixed slot still governs the page.

Android needs no equivalent change: it animates one cardWidth and derives every metric from it in the same composition, so nothing can drift.

The card already derives every other metric from its width — the code, the
avatar, the corner radius, the name's padding — but the name itself was
pinned at appDisplayXS's 20, so it read oversized on the 242-wide You-page
card and undersized on the 302-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 appDisplayXS's family and weight.
The card was laid out at a new size on each side of the expansion, so
every metric it derives from that size — code, avatar, corner radius,
padding — animated as an independent value, and the name's font size,
which isn't animatable at all, snapped. The parts arrived at different
moments and overlapped mid-flight.

Draw the card once at the widest size it ever reaches (302) and run the
expansion as a single scaleEffect. The whole figure travels together, and
because the scale only ever goes down from the drawn size, the card is
never sampled up.
@bmc08gt
bmc08gt merged commit d4383ee into main Aug 23, 2026
@bmc08gt
bmc08gt deleted the fix/tip-card-name-scale branch August 27, 2026 15:42
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