Repository navigation
Conversation
The payer's line now reads "owes X and gets back Y" instead of only "gets Y", so every person's share is visible. Refunds, settlements and currency conversions are unchanged. Long lines now wrap on narrow screens. Moves NON_SPENDING_SPLIT_TYPES to src/lib/splitTypes.ts so group statistics and expense details share it.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Description
On the expense details page, the person who paid is listed with only what they get back, so their own share of the cost isn't shown. This PR adds it on the same line: "You owe $40 and get back $50". Everyone else's line is unchanged ("Sam Rivera owes $30").
Why
Right now it's hard to tell how an expense was split. Everyone else's line shows their share directly. The payer's line shows only the net amount they get back, so you have to work out their share yourself:
In the current view, you can't see at a glance whether the payer took an equal part or a different one. You have to subtract what they get back from what they paid. With the payer's share on their line, every person's share is listed, and you can see how the cost was divided without doing any math.
What changes
NON_SPENDING_SPLIT_TYPESmoves fromsrc/lib/groupStatistics.tsto a newsrc/lib/splitTypes.ts. This PR uses it too, to decide which expenses get the new line. It's a pure move with an addedisSpendingSplitTypehelper, and the group statistics queries (feat: show paid and share of costs per person in group statistics #807) behave the same.Demo
Screenshots are at 390px wide, except the last one at 360px. Both uneven examples are a $90 dinner split $40 / $30 / $20. Before, the payer's $40 share isn't shown anywhere.
You paid, uneven split
Someone else paid, uneven split
Long name on a narrow phone (360px)
Testing
src/tests/expenseShare.test.ts).tests/e2e/group-expense.spec.ts).Checklist
CONTRIBUTING.mdin its entiretySummary by CodeRabbit