Darker rank chip; drop duplicate count line from stats card

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
simandClaude Sonnet 5.5 committed 2026-11-06 14:16:41 +01:00
1 parent cbe8074df8
commit eceea097c4
3 files changed
+7 -10

No files matched your search

+6 -6
View File
@@ -55,16 +55,16 @@ test("live picks: counts, podium stamp, expand/collapse, frozen after close", as
const banner = page.getByRole("button", { name: /stats/i });
await expect(banner).toContainText("Live stats · 1 order");
await expect(page.getByText("#1st")).toBeVisible();
await expect(page.getByText("1 person has ordered")).toBeHidden();
await expect(page.locator(".live-card-body")).toBeHidden();
// polling picks up another participant without a reload
await submit((await signIn()).userId, order.id, { burger: "Classic" });
await expect(banner).toContainText("Live stats · 2 orders", { timeout: 10_000 });
await banner.click();
await expect(page.getByText("2 people have ordered")).toBeVisible();
await expect(page.locator(".live-card-body")).toBeVisible();
await banner.click();
await expect(page.getByText("2 people have ordered")).toBeHidden();
await expect(page.locator(".live-card-body")).toBeHidden();
await api(`/api/orders/${order.id}/admin/status`, { userId: user.userId, method: "PUT", body: { closed: true } });
await expect(page.getByText(/This order is closed/)).toBeVisible({ timeout: 10_000 });
@@ -82,11 +82,11 @@ test("live picks on phones: bolt button with count opens a popup and minimizes a
const fab = page.getByRole("button", { name: "Show live stats, 1 order" });
await expect(fab).toBeVisible();
await fab.click();
await expect(page.getByText("1 person has ordered")).toBeVisible();
await expect(page.locator(".live-card-body")).toBeVisible();
await page.reload();
await expect(page.getByText("1 person has ordered")).toBeVisible(); // expanded state is remembered
await expect(page.locator(".live-card-body")).toBeVisible(); // expanded state is remembered
await page.getByRole("button", { name: /stats · 1 order/i }).click();
await expect(page.getByText("1 person has ordered")).toBeHidden();
await expect(page.locator(".live-card-body")).toBeHidden();
await expect(fab).toBeVisible();
await page.close();
});
@@ -23,9 +23,6 @@ function Bars({ stats }: { stats: OrderStats }) {
const n = stats.participant_count;
return (
<>
<Text type="secondary" style={{ display: "block", marginBottom: 8 }}>
{n} {n === 1 ? "person has" : "people have"} ordered
</Text>
{stats.categories.map((category) => (
<div key={category.label} style={{ marginBottom: 10 }}>
<Text strong>{category.label}</Text>
+1 -1
View File
@@ -537,7 +537,7 @@ export default function ParticipantView({ orderId }: { orderId: string }) {
<Tag
bordered={false}
title={`You were ${["1st", "2nd", "3rd"][stats.my_rank - 1]} to order`}
style={{ margin: 0, borderRadius: 8, padding: "2px 10px", background: token.colorPrimaryBgHover, color: token.colorPrimary, fontWeight: 600 }}
style={{ margin: 0, borderRadius: 8, padding: "2px 10px", background: `color-mix(in srgb, ${token.colorPrimary} 12%, color-mix(in srgb, ${token.colorBgContainer} 80%, #000))`, color: token.colorPrimary, fontWeight: 600 }}
>
{["🥇", "🥈", "🥉"][stats.my_rank - 1]} #{["1st", "2nd", "3rd"][stats.my_rank - 1]}
</Tag>