Group page redesign and visual bug fixes

Layout, from the approved mock:
- Group header on Expenses/Balances: my balance as the headline number
  (Money component de-emphasises currency and decimals), total spent, and
  round quick actions Add / Payment / Settle up / Share. The floating +
  shows only once those scroll off screen.
- Expense rows on two lines (title | amount, payer | my part) with round
  icons tinted per category; sentence-case section headings.
- Balances: larger avatars, paired avatars on settle-up rows, tinted button.

Bugs found in a screenshot pass (phone 320/390, desktop 1280; dark, black,
light; English and Czech):
- A long title or member name widened the group page past the screen and
  phones zoomed out (grid tracks without minmax(0, ...)); same in Stats.
- Long titles were clipped mid-word with no ellipsis.
- Category emoji nearly invisible on its grey circle in the light theme.
- Stats period labels wrapped (en) or ran off screen (cs); shortened.
- Icons next to wrapping text were squashed (lock on Home/App settings).
- Dialogs opened with a focus ring on the close button after a tap.
- New expenses always defaulted to Food & drink; now the group's default
  category (settable in group settings), else Other.

e2e: the Balances check now targets the Settle up heading, which the new
quick action shares its text with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVKYyo9BHLHPW4qr4x
This commit is contained in:
agent 2026-11-06 20:36:33 +00:00
parent c12fd64f09
commit b3b57c156e
17 changed files with 275 additions and 65 deletions

View file

@ -42,14 +42,14 @@
<div class="list">
{#each members as { m, i, bal } (m.id)}
<div class="item">
<Avatar member={m} index={i} size={32} />
<Avatar member={m} index={i} size={40} />
<span class="grow">
<span class="title" style:display="block">{m.name}{m.id === session.me ? ` (${t('you')})` : ''}</span>
<span class="bar" aria-hidden="true">
<span class={bal >= 0 ? 'fill pos-fill' : 'fill neg-fill'} style:width="{(Math.abs(bal) / maxAbs) * 100}%"></span>
</span>
</span>
<span class="end num {bal > 0 ? 'pos' : bal < 0 ? 'neg' : 'muted'}">
<span class="end num {bal > 0 ? 'pos' : bal < 0 ? 'neg' : 'muted'}" style:font-weight="650">
{bal === 0 ? t('settled') : (bal > 0 ? '+' : '−') + conv(Math.abs(bal))}
</span>
</div>
@ -62,12 +62,18 @@
{:else}
<div class="list">
{#each transfers as tr}
{@const from = session.state.members.findIndex((m) => m.id === tr.from)}
{@const to = session.state.members.findIndex((m) => m.id === tr.to)}
<div class="item">
<span class="pair" aria-hidden="true">
<Avatar member={session.state.members[from]} index={from} size={34} />
<Avatar member={session.state.members[to]} index={to} size={34} />
</span>
<span class="grow">
<span class="title" style:display="block">{session.memberName(tr.from)} → {session.memberName(tr.to)}</span>
<span class="num" style:font-weight="700">{conv(tr.amount)}</span>
<span class="num sub" style:display="block">{conv(tr.amount)}</span>
</span>
<button class="btn small" onclick={() => record(tr.from, tr.to, tr.amount)}>{t('mark_paid')}</button>
<button class="btn small tint" onclick={() => record(tr.from, tr.to, tr.amount)}>{t('mark_paid')}</button>
</div>
{/each}
</div>
@ -85,7 +91,10 @@
</div>
<style>
.bar { display: block; height: 6px; margin-top: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.pair { display: flex; flex-shrink: 0; }
.pair :global(.avatar) { box-shadow: 0 0 0 3px var(--surface); }
.pair :global(.avatar + .avatar) { margin-left: -10px; }
.bar { display: block; height: 5px; margin-top: 7px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 3px; }
.pos-fill { background: var(--accent); }
.neg-fill { background: var(--owe); }