Repository navigation
feat(payment-requests): share payment, marked-paid and closed rows in the chat - #1247
Merged
Merged
Conversation
… the chat
A cash message that pays a share now draws as a centred row with the request's ring
("You paid Alex $40 · Tahoe cabin") instead of an ordinary cash bubble. Consecutive
payments on one request collapse into one row with a count and a total. A share marked
paid by hand and a closed request get a row too. Neither has a message behind it, so
both are built from the stored request and merged into the transcript by time.
- The ring shows progress as of that payment: the creator's share plus every share paid
at or before the payer's `paid_at`, by amount.
- A row that doesn't fit shortens the title to 8 characters, then names to 6, then wraps
to two lines.
- `paymentRequestId` is a column on the stored message, so a share payment is still a
row after a relaunch. Schema version goes 66 to 67; the store is rebuilt from the server.
- A share payment is the chat-list preview for everyone, but counts as unread only for
its receiver. `unread_seq` is one stamp per message for all members, so other members
look past it for the unread dot and subtract it from the count.
Spec: code-payments/flipcash-client-orchestrator#128
… payment with no receiver A share payment row that wraps to two lines now keeps its fading rules beside line 1, as Android draws it, instead of centred between the lines. A share payment whose message names no receiver, for a request that isn't stored, read "Jordan paid Someone $40" in the row and the chat list preview. Both now read "Jordan paid $40", the copy Android uses.
…share payment's row A collapsed share payment row, a marked-paid row and a closed row drew "You" and "you" semibold. Android draws them regular and keeps the semibold only on a single share payment's row, where the word stands beside a name. iOS now does the same.
…e caption and at 60% opacity Each rule is 1pt in textSuccess at 60% opacity. The half beside the caption is solid and the outer half fades to clear at the outer end. The rules used to fade across their full length at 28% opacity. Design node 13591:871, option B.
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.
A cash message that pays a request share now draws as a centred row with the request's ring ("You paid Alex $40 · Tahoe cabin"). It used to draw as an ordinary cash bubble. A share the creator marks paid and a closed request get a row too.
Rows
paid_atorclosed_at.paid_at, by amount. A later payment leaves earlier rings alone.textSuccessat 60% opacity. The half beside the caption is solid and the outer half fades to clear (design node 13591:871, option B).Fit
A row too wide for its line shortens the title to 8 characters, then each name to 6, and only then moves the title and ring to a second line. The amount is never cut.
ChatRequestEvent.fit(maxWidth:width:)is a pure function over a measuring closure, so the rule is tested without a view.Chat list and unread
The chat list previews a share payment for every member, with "for" in place of the dot: "Jordan paid Alex $40 for Tahoe cabin". It counts as unread only for the member it paid.
unread_seqis one stamp per message for all members, so for everyone else the unread dot looks past a trailing share payment and the count subtracts the ones not addressed to them. The unread divider skips them the same way.Storage
paymentRequestIdis now a column on the stored message, so a share payment is still a row after a relaunch.Database.schemaVersiongoes from 66 to 67 and the store is rebuilt from the server.Strings are inline English, as elsewhere in the chat. The Android side is the matching branch
feat/request-share-payment-rowsin code-android-app.Spec: code-payments/flipcash-client-orchestrator#128,
docs/specs/group-requests.mdcases 63 to 82.