Nav (AppLayout.astro): brand stays left; everything else is a single
right-aligned flex group — Pulse · Roadmap · Members · Events · [Admin
if fenja] · 0.5px vertical divider · name · Sign out. The .nav-user
wrapper is gone; the name and logout button now belong to the same flex
flow as the link list.
/pulse:
- ActivityTicker render removed. The component file gets a one-line
deprecation comment; the activity table and write hooks stay in place
for later use.
- 'X others online now' chip strip removed — including all its supporting
helpers and styles in the page.
- CouncilMark replaced with <MembershipCard> in the right column of the
preview row. The roadmap preview is now a white --surface-card with
0.5px border; pulse-card switches to the same white surface and
--radius-lg. The .chosen pulse option uses --pigment-terracotta border
and a 6% terracotta tint via color-mix.
- <DispatchesSection limit={4} /> and <RecentlyFromTheCouncil /> stacked
below the preview row, in the position the online-now strip vacated.
- Vote-count denominator pulls from countCabMembers() and renders via
voteCountSentence(votes, total) — a new helper covering 0/1/5+ cases.
- Event row: dark dinner card now uses --ink/--ink-text; light card uses
--surface-card with 0.5px border.
Tests: 3 new cases for voteCountSentence (0/1/5). 36/36 passing.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
932 B
TypeScript
19 lines
932 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { voteCountSentence } from '../src/lib/format.js';
|
|
|
|
describe('voteCountSentence — denominator pluralisation', () => {
|
|
it('reads correctly for a council of 0 (defensive — should never ship)', () => {
|
|
expect(voteCountSentence(0, 0)).toBe('0 of 0 council members have weighed in.');
|
|
});
|
|
|
|
it('uses singular "member has" when the council has exactly 1 member', () => {
|
|
expect(voteCountSentence(0, 1)).toBe('0 of 1 council member has weighed in.');
|
|
expect(voteCountSentence(1, 1)).toBe('1 of 1 council member has weighed in.');
|
|
});
|
|
|
|
it('uses plural "members have" for a council of 5', () => {
|
|
expect(voteCountSentence(0, 5)).toBe('0 of 5 council members have weighed in.');
|
|
expect(voteCountSentence(2, 5)).toBe('2 of 5 council members have weighed in.');
|
|
expect(voteCountSentence(5, 5)).toBe('5 of 5 council members have weighed in.');
|
|
});
|
|
});
|