Repository navigation
fix(chat): size the cash card to Android's width - #890
Merged
Merged
Conversation
The cash card pinned itself at a fixed 232pt, out of step with text and link bubbles, which cap at 0.78 of the transcript width. Card and reaction row now take the same maxWidth the owner already computes for those cells.
The cash card now takes 0.64 of the row between the column insets instead of the 0.78 bubble fraction, matching Android's cash card. The reaction row under it follows the same width.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cash card in chat was a fixed 232pt. It now takes 0.64 of the row between the column insets (
ChatColumnCell.rowInset), the fraction Android's cash card uses, so the card is the same size on both platforms instead of fixed across phone widths.ChatCashCardCelltakes its width from the owner (ChatViewController.configure(_:with:)), following the stored-constraint patternChatMessageCell/ChatLinkMessageCelluse. In a group, an incoming row gives up the author gutter first, the same way text bubbles do. Card height stays 170pt. Only the card's width and the reaction row'slayoutWidthchange.The notification banner's cash card stays at 232×170, since a banner has no transcript width to size against.
Pairs with the Android change in code-payments/code-android-app#1595.