Skip to content

fix(chat): size bubbles to iOS's max width - #1595

Merged
bmc08gt merged 3 commits into
code/cashfrom
fix/chat-bubble-width-ios
Sep 28, 2026
Merged

bmc08gt merged 3 commits into
code/cashfrom
fix/chat-bubble-width-ios

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Text, reply, deleted, and encrypted bubbles capped at 0.78 of the row after the transcript inset. iOS (ChatViewController.maxBubbleWidthFraction) and our own link cards take 0.78 of the transcript's full width, so our bubbles came out about 31dp narrower than iOS's on a normal-width phone.

The cash card keeps its 0.64 of the inset row. iOS drew it at a fixed 232pt and now takes the same 0.64 of its inset row in its own PR (code-payments/code-ios-app#890).

  • transcriptCardWidth becomes transcriptBubbleMaxWidth and sizes every bubble and link card. bubbleMaxWidth(content, …) picks the width per message: a system notice spans the row, a cash card takes 0.64 of the inset row, everything else takes transcriptBubbleMaxWidth.
  • The reaction pill row under a bubble calls bubbleMaxWidth instead of keeping its own copy of the fraction, so it stays the width of the bubble or cash card above it.

Text, reply, deleted, and encrypted bubbles capped at 0.78 of the row
after the transcript inset, while iOS and our own link cards take 0.78
of the transcript's full width. The bubbles came out about 31dp
narrower than iOS's on a normal-width phone.

transcriptCardWidth becomes transcriptBubbleMaxWidth and sizes both.
The reaction pill row under a bubble calls it too, in place of its own
copy of the fraction. Cash and media bubbles keep their 0.64 of the
inset row.
@bmc08gt bmc08gt self-assigned this Sep 28, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Sep 28, 2026
The cash card took 0.64 of the inset row. It now takes the same 0.78
of the transcript width as every other bubble, which is the rule iOS
moves its fixed 232pt card to as well. The reaction pill row under a
cash card already used that width, so it now lines up with the card.
@bmc08gt bmc08gt changed the title fix(chat): size text bubbles to iOS's max width fix(chat): size bubbles and the cash card to iOS's max width Sep 28, 2026
The cash card goes back to the width it had before this branch: 0.64 of the
row after the transcript inset, not the shared 0.78 bubble width. The reaction
pill row under it sizes by the same rule, so it stays the card's width.
@bmc08gt bmc08gt changed the title fix(chat): size bubbles and the cash card to iOS's max width fix(chat): size bubbles to iOS's max width Sep 28, 2026
@bmc08gt
bmc08gt merged commit 069f00c into code/cash Sep 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant