From 2610a3d3018d8dc18efb05992a5a8f2fa1ecdc92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20B=C3=B6hm?= Date: Sat, 7 Nov 2026 12:11:43 +0000 Subject: [PATCH] Keep tokens, veto and joker on one line when wishing (26.11.34) On a small iPhone the joker button wrapped below the tokens. The veto now sits small under the token count, the joker is a compact button with icon and the word "Neues" (accessible name unchanged), and more than five coins give way to the number. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HUc2nv7rJVU2gp3Bgtha3q --- CLAUDE.md | 2 +- OlaresManifest.yaml | 4 ++-- components/wishes/token-jar.tsx | 7 +++++-- components/wishes/wish-board.tsx | 17 ++++++++++++----- e2e/wuenschen.spec.ts | 13 +++++++++++++ messages/de.json | 3 ++- messages/en.json | 3 ++- messages/es.json | 3 ++- messages/fr.json | 3 ++- olares/Chart.yaml | 4 ++-- olares/OlaresManifest.yaml | 4 ++-- olares/markt/26.11.34.md | 5 +++++ 12 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 olares/markt/26.11.34.md diff --git a/CLAUDE.md b/CLAUDE.md index 7fbaef5..7deeed5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,7 +7,7 @@ > **Plattform:** Olares One (Kubernetes), Repo und CI auf Gitea — kein Supabase, > kein Vercel (E-0001). Eigene Gestaltung, nicht AImighty (E-0002). > Verteilung über den Markt, Repo öffentlich (E-0005). -> **Status:** 26.11.33 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut: +> **Status:** 26.11.34 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut: > Anmeldung (Passkeys, Kinder mit Gerät + PIN), Gerichte (Link, Kochbuchfoto, AI über den > Olares Router), Wünschen, Plan, Einkaufsliste (Echtzeit, offline), Kochmodus mit > Bewertung, Web-App; Einzahl bei Stück-Mengen (26.11.15), Preise und Kosten mit Ampel diff --git a/OlaresManifest.yaml b/OlaresManifest.yaml index 65b2ad6..b28989a 100644 --- a/OlaresManifest.yaml +++ b/OlaresManifest.yaml @@ -21,7 +21,7 @@ metadata: title: What's cooking? description: The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box. icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png - version: 26.11.33 + version: 26.11.34 categories: - Applications @@ -61,7 +61,7 @@ permission: appData: true spec: - versionName: '26.11.33' + versionName: '26.11.34' featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png promoteImage: diff --git a/components/wishes/token-jar.tsx b/components/wishes/token-jar.tsx index d6f3744..27752f6 100644 --- a/components/wishes/token-jar.tsx +++ b/components/wishes/token-jar.tsx @@ -2,10 +2,13 @@ import { cn } from "@/lib/utils"; // TokenJar (Konzept, „Bausteine“): Jetons als Münzen. Volle Münze = noch frei. // Die Zahl steht immer daneben im Text — Farbe allein trägt nichts. +// Mehr als fünf Münzen passen am Handy nicht in eine Zeile; dann trägt die Zahl allein. +const MAX_COINS = 5; + export function TokenJar({ total, left, label, className }: { total: number; left: number; label: string; className?: string }) { return ( - + MAX_COINS && "hidden")}> {Array.from({ length: total }, (_, i) => ( ))} - {label} + {label ? {label} : null} ); } diff --git a/components/wishes/wish-board.tsx b/components/wishes/wish-board.tsx index 3a1081b..552109c 100644 --- a/components/wishes/wish-board.tsx +++ b/components/wishes/wish-board.tsx @@ -129,12 +129,19 @@ export function WishBoard({ return (
-
- - {canVeto && budget.vetos > 0 ? {t("vetosLeft", { n: budget.vetosLeft })} : null} -
diff --git a/e2e/wuenschen.spec.ts b/e2e/wuenschen.spec.ts index 26b6381..861ede6 100644 --- a/e2e/wuenschen.spec.ts +++ b/e2e/wuenschen.spec.ts @@ -15,6 +15,19 @@ test("Today offers to open a round, and the round opens", async ({ page }) => { await expect(page.locator("main article h2").first()).toHaveText("Du hast noch 2 Wünsche für den Einkauf am Samstag."); }); +test("tokens, veto and the joker share one line, even on the iPhone", async ({ page }) => { + await page.goto("/wuenschen"); + const joker = page.getByRole("button", { name: "Etwas Neues" }); + await expect(joker).toHaveText("Neues"); + const bar = await page.getByText("2 Jetons frei").boundingBox(); + const button = await joker.boundingBox(); + const width = page.viewportSize()!.width; + // Gleiche Zeile: die Mitten liegen auf einer Höhe, und der Knopf endet am rechten Rand. + expect(Math.abs(bar!.y + bar!.height / 2 - (button!.y + button!.height / 2))).toBeLessThan(16); + expect(button!.x + button!.width).toBeLessThanOrEqual(width); + await expect(page.getByText("1 Veto frei")).toBeVisible(); +}); + test("each tap spends a token, and the server says when they are gone", async ({ page }) => { await page.goto("/"); await page.getByRole("link", { name: "Wünschen" }).click(); diff --git a/messages/de.json b/messages/de.json index dda157f..25da26b 100644 --- a/messages/de.json +++ b/messages/de.json @@ -543,7 +543,8 @@ "mineChosen": "Dein Gericht: {title} — kommt sicher in den Plan.", "mineExplain": "Eins pro Runde. Kein Veto streicht es, und der Plan setzt es zuerst.", "protected": "Geschützt: Das ist das Gericht von jemandem. Dagegen gibt es kein Veto.", - "vetoCount": "{n, plural, one {1 Veto} other {# Vetos}}" + "vetoCount": "{n, plural, one {1 Veto} other {# Vetos}}", + "jokerShort": "Neues" }, "kids": { "title": "Wer bist du?", diff --git a/messages/en.json b/messages/en.json index 00fa141..6445eed 100644 --- a/messages/en.json +++ b/messages/en.json @@ -543,7 +543,8 @@ "mineChosen": "Your dish: {title} — sure to be in the plan.", "mineExplain": "One per round. No veto removes it, and the plan puts it first.", "protected": "Protected: this is someone's dish. There is no veto against it.", - "vetoCount": "{n, plural, one {1 veto} other {# vetoes}}" + "vetoCount": "{n, plural, one {1 veto} other {# vetoes}}", + "jokerShort": "Something new" }, "kids": { "title": "Who are you?", diff --git a/messages/es.json b/messages/es.json index 18707f7..4985fda 100644 --- a/messages/es.json +++ b/messages/es.json @@ -543,7 +543,8 @@ "mineChosen": "Your dish: {title} — sure to be in the plan.", "mineExplain": "One per round. No veto removes it, and the plan puts it first.", "protected": "Protected: this is someone's dish. There is no veto against it.", - "vetoCount": "{n, plural, one {1 veto} other {# vetoes}}" + "vetoCount": "{n, plural, one {1 veto} other {# vetoes}}", + "jokerShort": "Something new" }, "kids": { "title": "Who are you?", diff --git a/messages/fr.json b/messages/fr.json index ce9b2bf..8ebc960 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -543,7 +543,8 @@ "mineChosen": "Your dish: {title} — sure to be in the plan.", "mineExplain": "One per round. No veto removes it, and the plan puts it first.", "protected": "Protected: this is someone's dish. There is no veto against it.", - "vetoCount": "{n, plural, one {1 veto} other {# vetoes}}" + "vetoCount": "{n, plural, one {1 veto} other {# vetoes}}", + "jokerShort": "Something new" }, "kids": { "title": "Who are you?", diff --git a/olares/Chart.yaml b/olares/Chart.yaml index f1cfe84..8badde8 100644 --- a/olares/Chart.yaml +++ b/olares/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: lunch description: Was gibt's? — die Familie entscheidet gemeinsam, was es gibt; aus dem Plan entsteht die Einkaufsliste type: application -version: 26.11.33 # YY.M. wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen -appVersion: "26.11.33" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran +version: 26.11.34 # YY.M. wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen +appVersion: "26.11.34" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran diff --git a/olares/OlaresManifest.yaml b/olares/OlaresManifest.yaml index 65b2ad6..b28989a 100644 --- a/olares/OlaresManifest.yaml +++ b/olares/OlaresManifest.yaml @@ -21,7 +21,7 @@ metadata: title: What's cooking? description: The family decides together what's for dinner — and the shopping list writes itself. Runs entirely on your own box. icon: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png - version: 26.11.33 + version: 26.11.34 categories: - Applications @@ -61,7 +61,7 @@ permission: appData: true spec: - versionName: '26.11.33' + versionName: '26.11.34' featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png promoteImage: diff --git a/olares/markt/26.11.34.md b/olares/markt/26.11.34.md new file mode 100644 index 0000000..9367233 --- /dev/null +++ b/olares/markt/26.11.34.md @@ -0,0 +1,5 @@ +# Wishing: one line at the top +v26.11.34: On "Wish", tokens, veto and the "Something new" joker share one line again, even on a small iPhone; the veto sits small under the tokens, the joker is a compact button with icon and word. With more than five tokens the coins give way to the number. + +## Deutsch +v26.11.34: Beim Wünschen stehen Jetons, Veto und der Joker „Neues“ wieder in einer Zeile, auch am kleinen iPhone; das Veto steht klein unter den Jetons, der Joker ist ein kompakter Knopf mit Zeichen und Wort. Bei mehr als fünf Jetons weichen die Münzen der Zahl. -- 2.54.0