26.11.41: Leiste bleibt unten, Ausprobieren sichtbar #42

Merged
kai merged 1 commits from claude/leiste-bleibt into main 2026-11-07 18:25:53 +00:00
23 changed files with 239 additions and 64 deletions

No files matched your search

+3 -2
View File
@@ -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.40 — alle neun Arbeitspakete aus `docs/PROJEKTSTART.md` sind gebaut:
> **Status:** 26.11.41 — 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
@@ -20,7 +20,8 @@
> (26.11.33), foodplanhero für Maike (26.11.35), eine Schrift (26.11.37), Produktgruppen,
> eigene Zutaten und Lieblingsprodukt je Haushalt (26.11.38, E-0015), Löffel und Gebinde
> (26.11.39, E-0016), Anmelden per Mail-Link über Resend (26.11.40, E-0017; nur
> anmelden, keine Geräte oder Passkeys aus einer Mail-Sitzung). Offen: Kai trägt
> anmelden, keine Geräte oder Passkeys aus einer Mail-Sitzung), Leiste bleibt nach der
> Tastatur unten (26.11.41). Offen: Kai trägt
> den Resend-Schlüssel unter Mehr › Mails verschicken ein.
> **Letzte Aktualisierung:** 7. November 2026
+2 -2
View File
@@ -21,7 +21,7 @@ metadata:
title: foodplanhero
description: Plan. Cook. Smile. 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.40
version: 26.11.41
categories:
- Applications
@@ -61,7 +61,7 @@ permission:
appData: true
spec:
versionName: '26.11.40'
versionName: '26.11.41'
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
promoteImage:
+3 -1
View File
@@ -1,4 +1,5 @@
import { ChevronLeft, MonitorPlay } from "lucide-react";
import { TrialNote } from "@/components/dishes/trial-note";
import Link from "next/link";
import { notFound } from "next/navigation";
import { getLocale, getTranslations } from "next-intl/server";
@@ -54,7 +55,7 @@ export default async function DishPage({ params }: { params: Promise<{ id: strin
<div className="relative aspect-[4/3] overflow-hidden sm:mx-4 sm:mt-4 sm:rounded-2xl">
<DishPhoto dishId={dish.id} photo={dish.photo} />
<Link
href="/gerichte"
href={dish.isTrial ? "/gerichte?ansicht=ausprobieren" : "/gerichte"}
aria-label={t("title")}
className="absolute left-3 top-3 flex size-11 items-center justify-center rounded-full bg-background/90 text-foreground"
>
@@ -75,6 +76,7 @@ export default async function DishPage({ params }: { params: Promise<{ id: strin
) : null}
</header>
{photos.length ? <PhotoGallery dishId={dish.id} title={dish.title} photos={photos} canManage={canWrite} /> : null}
{dish.isTrial ? <TrialNote id={dish.id} canWrite={canWrite} /> : null}
{canWrite ? <DishActions id={dish.id} /> : null}
{dish.steps.length || dish.ingredients.length ? (
<Link
+1 -1
View File
@@ -107,7 +107,7 @@ export default async function DishesPage({ searchParams }: { searchParams: Promi
href="/gerichte/hinzufuegen"
className={cn(
buttonVariants({ size: "lg" }),
"fixed bottom-[calc(4.5rem+env(safe-area-inset-bottom))] right-4 z-10 shadow-lg",
"kb-shift fixed bottom-[calc(4.5rem+env(safe-area-inset-bottom))] right-4 z-10 shadow-lg",
)}
>
<Plus aria-hidden />
+17
View File
@@ -0,0 +1,17 @@
import { guardWrite, isResponse } from "@/lib/auth/guard";
import { fail } from "@/lib/auth/http";
import { withHousehold } from "@/lib/db";
export const dynamic = "force-dynamic";
// „In den Pool“ (26.11.41): ein Gericht aus „Ausprobieren“ zu den Stammgerichten.
export async function POST(request: Request, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const session = await guardWrite(request);
if (isResponse(session)) return session;
if (!/^[0-9a-f-]{36}$/.test(id)) return fail("invalid", 400);
const r = await withHousehold(session.householdId, (c) =>
c.query("update dishes set is_trial = false, updated_at = now() where id = $1 and archived_at is null", [id]),
);
return r.rowCount === 1 ? new Response(null, { status: 204 }) : fail("notFound", 404);
}
+6
View File
@@ -79,6 +79,12 @@
--nav-space: 0px;
}
/* Knopfleisten unten folgen der Korrektur der Navigation, wenn iOS nach der
Tastatur zu kurz rechnet (lib/use-keyboard-nav.ts setzt --kb-shift, 26.11.41). */
.kb-shift {
translate: 0 var(--kb-shift, 0px);
}
html {
color-scheme: light dark;
-webkit-text-size-adjust: 100%;
+1 -1
View File
@@ -158,7 +158,7 @@ export function CookingMode({
{error ? <ErrorNotice>{t("error")}</ErrorNotice> : null}
<div className="sticky bottom-[var(--nav-space)] z-10 flex gap-2 bg-background py-2">
<div className="kb-shift sticky bottom-[var(--nav-space)] z-10 flex gap-2 bg-background py-2">
<Button type="button" variant="outline" size="lg" disabled={index < 0} onClick={() => go(-1)} aria-label={t("back")}>
<ChevronLeft aria-hidden />
</Button>
+1 -1
View File
@@ -491,7 +491,7 @@ export function DishForm({ initial }: { initial?: DishFormValue }) {
</section>
{error ? <ErrorNotice>{t(`form.errors.${error}`)}</ErrorNotice> : null}
<div className="sticky bottom-[var(--nav-space)] z-10 flex gap-2 bg-background py-2">
<div className="kb-shift sticky bottom-[var(--nav-space)] z-10 flex gap-2 bg-background py-2">
<Button type="button" variant="outline" onClick={() => router.back()}>
{t("form.cancel")}
</Button>
+1 -1
View File
@@ -61,7 +61,7 @@ export function StarterPicker({ starters }: { starters: Starter[] }) {
})}
</ul>
{error ? <ErrorNotice>{t("form.errors.unknown")}</ErrorNotice> : null}
<div className="sticky bottom-[var(--nav-space)] z-10 bg-background/0 pb-2">
<div className="kb-shift sticky bottom-[var(--nav-space)] z-10 bg-background/0 pb-2">
<Button
size="lg"
className="w-full shadow-lg"
+38
View File
@@ -0,0 +1,38 @@
"use client";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useTranslations } from "next-intl";
import { useState } from "react";
import { Button } from "@/components/ui/button";
// Ein Gericht unter „Ausprobieren“ sagt das selbst (26.11.41, Kai: „neue Gerichte werden
// nicht gespeichert“ — sie standen nur nicht im Pool). Mit einem Tipp in den Pool.
export function TrialNote({ id, canWrite }: { id: string; canWrite: boolean }) {
const t = useTranslations("dishes.detail");
const router = useRouter();
const [busy, setBusy] = useState(false);
async function toPool() {
setBusy(true);
const res = await fetch(`/api/dishes/${id}/pool`, { method: "POST" }).catch(() => null);
setBusy(false);
if (res?.ok) router.refresh();
}
return (
<div role="note" className="flex flex-col gap-3 rounded-xl border border-border px-4 py-3">
<p className="text-sm">
{t("inTrial")}{" "}
<Link href="/gerichte?ansicht=ausprobieren" className="font-semibold underline underline-offset-4">
{t("inTrialLink")}
</Link>
</p>
{canWrite ? (
<Button type="button" variant="outline" className="self-start" disabled={busy} onClick={toPool}>
{t("toPool")}
</Button>
) : null}
</div>
);
}
+1 -1
View File
@@ -186,7 +186,7 @@ export function PlanBoard({
) : null}
{status === "open" && slots.length ? (
<div className="sticky bottom-[var(--nav-space)] z-10 bg-background py-2">
<div className="kb-shift sticky bottom-[var(--nav-space)] z-10 bg-background py-2">
<Button type="button" size="lg" className="w-full" disabled={busy} onClick={() => act("POST", "/api/plan/approve")}>
{t("approve")}
</Button>
+1 -1
View File
@@ -281,7 +281,7 @@ export function ReceiptReview({ receipt }: { receipt: Receipt }) {
{done ? (
<p className="text-sm text-muted-foreground">{t("doneText")}</p>
) : (
<div className="sticky bottom-[var(--nav-space)] z-10 flex gap-2 bg-background py-2">
<div className="kb-shift sticky bottom-[var(--nav-space)] z-10 flex gap-2 bg-background py-2">
<Button type="button" variant="outline" disabled={busy} onClick={remove} aria-label={t("delete")}>
<Trash2 aria-hidden />
</Button>
+27
View File
@@ -208,6 +208,8 @@ test.describe("recipe link", () => {
await amounts.nth(3).fill("50");
await page.getByRole("button", { name: "Speichern" }).click();
await expect(page.getByRole("heading", { level: 1 })).toHaveText("Linsensuppe vom Blog");
// Gespeichert unter „Ausprobieren“ — und die Seite sagt es (26.11.41).
await expect(page.getByRole("note").filter({ hasText: "Steht unter „Ausprobieren“" })).toBeVisible();
await expect(page.locator("main img").first()).toHaveAttribute("src", /\/api\/fotos\//);
await expect(page.locator(`main a[href="${origin}/rezept"]`)).toBeVisible();
});
@@ -467,3 +469,28 @@ test("spoons and cans: the ingredient preselects its measure, the dish shows spo
await page.getByRole("button", { name: "Entfernen" }).click();
await expect(page).toHaveURL(/entfernt=/);
});
// Kai: „Neue Gerichte werden nicht gespeichert“ — sie standen unter „Ausprobieren“, ohne dass
// die Seite es sagte (26.11.41). Jetzt: Hinweis, Weg dorthin, und mit einem Tipp in den Pool.
test("a dish to try says so, links to its tab and moves to the pool with one tap", async ({ page }) => {
await page.goto("/gerichte/neu");
await page.fill("#title", "Probe-Auflauf");
await page.getByRole("combobox", { name: "Zutat suchen" }).first().fill("Zwieb");
await page.getByRole("option", { name: "Zwiebeln", exact: true }).click();
await page.getByRole("textbox", { name: "Menge", exact: true }).first().fill("2");
await page.getByLabel("Erst mal ausprobieren").check();
await page.getByRole("button", { name: "Speichern" }).click();
await expect(page.getByRole("heading", { level: 1 })).toHaveText("Probe-Auflauf");
const note = page.getByRole("note").filter({ hasText: "Steht unter „Ausprobieren“" });
await expect(note).toBeVisible();
await expect(page.locator("main").getByRole("link", { name: "Gerichte", exact: true })).toHaveAttribute("href", "/gerichte?ansicht=ausprobieren");
await note.getByRole("button", { name: "In den Pool" }).click();
await expect(note).toHaveCount(0);
await page.goto("/gerichte");
await expect(page.getByRole("link", { name: /Probe-Auflauf/ })).toBeVisible();
// Aufräumen, damit der Plan danach denselben Bestand vorschlägt.
await page.getByRole("link", { name: /Probe-Auflauf/ }).click();
await page.getByRole("button", { name: "Entfernen" }).click();
await expect(page).toHaveURL(/entfernt=/);
});
+34 -12
View File
@@ -73,29 +73,51 @@ test("scrolling never moves the bar, even while the address bar comes and goes",
}
});
test("after typing, a stale gap is bridged briefly and dropped at the first touch", async ({ page }) => {
const shiftOf = (page: Page) => page.getByRole("navigation", { name: "Navigation" }).evaluate((el) => (el as HTMLElement).style.transform);
const kbShift = (page: Page) => page.evaluate(() => document.documentElement.style.getPropertyValue("--kb-shift"));
// 26.11.41 (Kai, Bild: Leiste und „Speichern“ mitten im Bild): iOS rechnet nach der
// Tastatur in der Web-App manchmal lange zu kurz — auch nach Berührung und Scrollen.
test("after typing, a stuck keyboard gap stays bridged through touch and scroll until iOS recovers", async ({ page }) => {
await page.goto("/mehr");
const field = page.locator("#kid-name");
await field.focus();
await expect(page.getByRole("navigation", { name: "Navigation" })).toBeHidden(); // beim Tippen weg
// iOS lässt das Layout nach dem Schließen der Tastatur 300 px zu kurz stehen.
await moveViewport(page, 300);
await moveViewport(page, 300); // iOS lässt das Layout 300 px zu kurz stehen
await field.blur();
const nav = page.getByRole("navigation", { name: "Navigation" });
await expect(nav).toBeVisible();
await expect.poll(() => nav.evaluate((el) => (el as HTMLElement).style.transform)).toBe("translateY(300px)");
await expect.poll(() => shiftOf(page)).toBe("translateY(300px)");
await expect.poll(() => kbShift(page)).toBe("300px");
// Berühren, scrollen, über die erste Sekunde hinaus: bleibt unten.
await page.evaluate(() => window.dispatchEvent(new Event("touchstart")));
await expect.poll(() => nav.evaluate((el) => (el as HTMLElement).style.transform)).toBe("");
await page.evaluate(() => window.dispatchEvent(new Event("touchend")));
await page.mouse.wheel(0, 400);
await page.waitForTimeout(1300);
await moveViewport(page, 300);
await expect.poll(() => shiftOf(page)).toBe("translateY(300px)");
// iOS rechnet wieder richtig: Korrektur weg, Leiste unten.
await moveViewport(page, 0);
await expect.poll(() => shiftOf(page)).toBe("");
await expect.poll(() => kbShift(page)).toBe("");
await navAtBottom(page);
// Danach ist nichts mehr scharf: eine neue Lücke ohne Tippen bleibt unberührt.
await moveViewport(page, 300);
await page.waitForTimeout(100);
expect(await shiftOf(page)).toBe("");
});
test("the bridge ends by itself after a second, and never starts without typing", async ({ page }) => {
test("never without typing; after the first second only a keyboard-sized gap counts", async ({ page }) => {
await page.goto("/mehr");
const nav = page.getByRole("navigation", { name: "Navigation" });
await moveViewport(page, 300); // ohne Tastatur: nichts tun
await page.waitForTimeout(100);
expect(await nav.evaluate((el) => (el as HTMLElement).style.transform)).toBe("");
expect(await shiftOf(page)).toBe("");
await moveViewport(page, 0);
await page.locator("#kid-name").focus();
await page.locator("#kid-name").blur();
await expect.poll(() => nav.evaluate((el) => (el as HTMLElement).style.transform)).toBe("translateY(300px)");
await expect.poll(() => nav.evaluate((el) => (el as HTMLElement).style.transform), { timeout: 3000 }).toBe("");
await page.waitForTimeout(1300);
// Gummiband oder Rundung (unter STUCK_MIN): Lunch fasst die Leiste nicht an.
await moveViewport(page, 80);
await page.waitForTimeout(100);
expect(await shiftOf(page)).toBe("");
await moveViewport(page, 0);
await navAtBottom(page);
});
+67 -32
View File
@@ -11,8 +11,11 @@ import { useEffect, useRef, useState } from "react";
// Größenereignis des sichtbaren Bereichs. In Safari fährt beim Scrollen die
// Adressleiste ein und aus, iOS meldet das verzögert — die Leiste rutschte mit
// (Kai, 7.11.2026). Jetzt gilt: Beim Scrollen fasst Lunch die Leiste nie an.
// Korrigiert wird nur im Fenster nach dem Schließen der Tastatur, und die erste
// Berührung oder der erste Scroll danach nimmt die Korrektur zurück.
// Korrigiert wird nur nach dem Schließen der Tastatur und nur in der Web-App.
//
// Seit 26.11.41: Die Korrektur bleibt, solange iOS den Bildschirm zu kurz rechnet —
// erkennbar an einer Lücke in Tastaturgröße (STUCK_MIN), die das Scrollen in einer
// Web-App sonst nie erzeugt. Kleine Lücken (Gummiband) fasst Lunch weiter nicht an.
/** Wie lange nach dem Schließen der Tastatur nachgemessen wird. */
export const SETTLE_MS = 1000;
@@ -33,6 +36,22 @@ const EDITABLE =
export const isEditable = (el: Element | null) => !!el && el.matches(EDITABLE);
/**
* Ab dieser Lücke ist es die stehengebliebene Tastatur, kein Gummiband (26.11.41).
* iOS-Tastaturen sind 250–400 pt hoch; Gummiband und Rundungen bleiben weit darunter.
*/
export const STUCK_MIN = 150;
/**
* Die Korrektur nach dem Schließen der Tastatur (26.11.41, Kai: Leiste mitten im Bild,
* auch nach dem Scrollen). Im ersten Augenblick gilt jede Lücke über 40 px; danach nur
* noch eine in Tastaturgröße — so lange, bis iOS selbst wieder richtig rechnet.
*/
export function stuckShift(gap: number, settling: boolean): number {
if (settling) return gap;
return gap >= STUCK_MIN ? gap : 0;
}
/** Liefert, ob gerade getippt wird, und eine Ref für die Leiste, die unten gehalten wird. */
export function useKeyboardSafeNav<T extends HTMLElement>() {
const ref = useRef<T>(null);
@@ -45,17 +64,37 @@ export function useKeyboardSafeNav<T extends HTMLElement>() {
useEffect(() => {
const vv = window.visualViewport;
let until = 0; // Ende des Fensters nach dem Schließen der Tastatur
const root = document.documentElement;
// Nach dem Schließen der Tastatur scharf, bis iOS den Bildschirm wieder voll rechnet.
// In der Web-App gibt es keine Adressleiste — eine Lücke in Tastaturgröße ist dort
// immer der Fehler, auch noch nach Berührung und Scrollen (bis 26.11.40 ließ Lunch
// die Korrektur bei der ersten Berührung fallen, und die Leiste sprang zurück).
let armed = false;
let settleUntil = 0;
let frame = 0;
const apply = (shift: number) => {
if (ref.current) ref.current.style.transform = shift ? `translateY(${shift}px)` : "";
// Klebende Knopfleisten (Speichern, Los geht's …) folgen über --kb-shift (globals.css).
if (shift) root.style.setProperty("--kb-shift", `${shift}px`);
else root.style.removeProperty("--kb-shift");
};
const clear = () => {
until = 0;
if (ref.current) ref.current.style.transform = "";
armed = false;
settleUntil = 0;
apply(0);
};
const pin = () => {
const el = ref.current;
if (!el || !vv) return;
if (Date.now() > until || !isStandalone()) return clear();
const gap = keyboardGap(vv, document.documentElement.clientHeight);
el.style.transform = gap ? `translateY(${gap}px)` : "";
frame = 0;
if (!armed || !vv || !isStandalone()) return clear();
const shift = stuckShift(keyboardGap(vv, root.clientHeight), Date.now() < settleUntil);
apply(shift);
// iOS rechnet wieder richtig: entschärfen.
if (!shift && Date.now() >= settleUntil) armed = false;
};
// Bei jedem Ereignis neu messen, nie einen alten Wert stehen lassen: Rechnet iOS
// zwischendurch wieder richtig, fällt die Korrektur im selben Bild weg.
const schedule = () => {
if (armed && !frame) frame = requestAnimationFrame(pin);
};
const onFocusIn = (e: FocusEvent) => {
if (isEditable(e.target as Element)) {
@@ -68,38 +107,34 @@ export function useKeyboardSafeNav<T extends HTMLElement>() {
setTimeout(() => {
if (isEditable(document.activeElement)) return;
setTyping(false);
if (!isStandalone()) return;
window.scrollTo(window.scrollX, window.scrollY); // stößt das Neuvermessen an
until = Date.now() + SETTLE_MS;
requestAnimationFrame(pin);
setTimeout(pin, 300); // nach der Animation der Tastatur noch einmal
setTimeout(() => {
if (!until) return;
clear();
// Steht die Leiste ohne Korrektur noch falsch, iOS noch einmal neu messen lassen.
if (vv && isStandalone() && keyboardGap(vv, document.documentElement.clientHeight)) {
window.scrollTo(window.scrollX, window.scrollY + 1);
window.scrollTo(window.scrollX, window.scrollY - 1);
}
}, SETTLE_MS + 50);
armed = true;
settleUntil = Date.now() + SETTLE_MS;
schedule();
setTimeout(schedule, 300); // nach der Animation der Tastatur noch einmal
setTimeout(schedule, SETTLE_MS + 50); // Ende des ersten Augenblicks
}, 50);
};
// Sobald die Person wieder berührt (jeder Scroll am Handy beginnt so) oder am Rad
// dreht, gilt die Lage, die iOS selbst rechnet. Kein „scroll“: Den lösen auch das
// scrollTo oben und iOS beim Schließen der Tastatur aus.
const onUser = () => until && clear();
document.addEventListener("focusin", onFocusIn);
document.addEventListener("focusout", onFocusOut);
vv?.addEventListener("resize", pin);
window.addEventListener("touchstart", onUser, { passive: true });
window.addEventListener("wheel", onUser, { passive: true });
vv?.addEventListener("resize", schedule);
vv?.addEventListener("scroll", schedule);
window.addEventListener("scroll", schedule, { passive: true });
window.addEventListener("resize", schedule);
window.addEventListener("touchend", schedule, { passive: true });
window.addEventListener("orientationchange", clear);
return () => {
if (frame) cancelAnimationFrame(frame);
document.removeEventListener("focusin", onFocusIn);
document.removeEventListener("focusout", onFocusOut);
vv?.removeEventListener("resize", pin);
window.removeEventListener("touchstart", onUser);
window.removeEventListener("wheel", onUser);
vv?.removeEventListener("resize", schedule);
vv?.removeEventListener("scroll", schedule);
window.removeEventListener("scroll", schedule);
window.removeEventListener("resize", schedule);
window.removeEventListener("touchend", schedule);
window.removeEventListener("orientationchange", clear);
clear();
};
}, []);
+4 -1
View File
@@ -385,7 +385,10 @@
"stepTimerProduct": "{n} Min. laut Packung ({product})",
"photoAdd": "Foto dazu ({n} von {max})",
"photoFull": "5 Fotos sind das Maximum",
"present": "Präsentieren"
"present": "Präsentieren",
"inTrial": "Steht unter „Ausprobieren“, noch nicht im Pool. Dort zieht es der Joker „Etwas Neues“.",
"inTrialLink": "Zu „Ausprobieren“",
"toPool": "In den Pool"
},
"form": {
"newTitle": "Neues Gericht",
+4 -1
View File
@@ -385,7 +385,10 @@
"stepTimerProduct": "{n} min per pack ({product})",
"photoAdd": "Add photo ({n} of {max})",
"photoFull": "5 photos is the maximum",
"present": "Present"
"present": "Present",
"inTrial": "Listed under “To try”, not yet in the pool. The joker “Something new” picks from there.",
"inTrialLink": "Go to “To try”",
"toPool": "Move to pool"
},
"form": {
"newTitle": "New dish",
+4 -1
View File
@@ -385,7 +385,10 @@
"stepTimerProduct": "{n} min según el paquete ({product})",
"photoAdd": "Añadir foto ({n} de {max})",
"photoFull": "5 fotos es el máximo",
"present": "Present"
"present": "Present",
"inTrial": "Listed under “To try”, not yet in the pool. The joker “Something new” picks from there.",
"inTrialLink": "Go to “To try”",
"toPool": "Move to pool"
},
"form": {
"newTitle": "New dish",
+4 -1
View File
@@ -385,7 +385,10 @@
"stepTimerProduct": "{n} min selon le paquet ({product})",
"photoAdd": "Ajouter une photo ({n} sur {max})",
"photoFull": "5 photos au maximum",
"present": "Present"
"present": "Present",
"inTrial": "Listed under “To try”, not yet in the pool. The joker “Something new” picks from there.",
"inTrialLink": "Go to “To try”",
"toPool": "Move to pool"
},
"form": {
"newTitle": "New dish",
+2 -2
View File
@@ -2,5 +2,5 @@ apiVersion: v2
name: lunch
description: foodplanhero (Plan. Cook. Smile.) — die Familie entscheidet gemeinsam, was es gibt; aus dem Plan entsteht die Einkaufsliste
type: application
version: 26.11.40 # YY.M.<n> wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen
appVersion: "26.11.40" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran
version: 26.11.41 # YY.M.<n> wie im AImighty-Markt — bei jeder Chart-Änderung erhöhen
appVersion: "26.11.41" # MUSS gleich version sein: der Linter prüft es, und der Image-Tag hängt daran
+2 -2
View File
@@ -21,7 +21,7 @@ metadata:
title: foodplanhero
description: Plan. Cook. Smile. 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.40
version: 26.11.41
categories:
- Applications
@@ -61,7 +61,7 @@ permission:
appData: true
spec:
versionName: '26.11.40'
versionName: '26.11.41'
featuredImage: https://git.aimighty.olares.de/aimighty/bilder/raw/branch/main/lunch/icon.png
promoteImage:
+5
View File
@@ -0,0 +1,5 @@
# The bottom bar stays at the bottom, and dishes to try say so
v26.11.41: On the iPhone, the bottom bar and the buttons above it (Save, Cancel) could get stuck in the middle of the screen after typing, and stayed there even after scrolling. iOS sometimes keeps calculating the screen as if the keyboard were still open, long after it has closed. foodplanhero now holds the bar at the bottom for as long as that lasts, through touches and scrolling, and lets go as soon as iOS calculates correctly again. The buttons above the bar and the plus button on the dishes page follow the bar. Small movements such as bouncing at the end of a page are left alone. Dishes created from a photo, text or recipe link go to "To try" first, which is what the joker "Something new" picks from. Their page now says so, links to that tab and has a "Move to pool" button; the back arrow leads to "To try".
## Deutsch
v26.11.41: Am iPhone konnten nach dem Tippen die Leiste unten und die Knöpfe darüber (Speichern, Abbrechen) mitten im Bild stehen bleiben, auch nach dem Scrollen. iOS rechnet den Bildschirm manchmal noch lange so, als wäre die Tastatur offen, obwohl sie längst zu ist. foodplanhero hält die Leiste jetzt unten, solange das dauert, auch beim Berühren und Scrollen, und lässt sie los, sobald iOS wieder richtig rechnet. Die Knöpfe über der Leiste und der Plus-Knopf bei den Gerichten gehen mit. Kleine Bewegungen wie das Nachfedern am Seitenende bleiben unberührt. Gerichte aus Foto, Text oder Rezept-Link stehen zuerst unter „Ausprobieren“, daraus zieht der Joker „Etwas Neues“. Ihre Seite sagt das jetzt, führt zu diesem Reiter und hat einen Knopf „In den Pool“; der Pfeil zurück führt zu „Ausprobieren“.
+11 -1
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { keyboardGap } from "@/lib/use-keyboard-nav";
import { keyboardGap, STUCK_MIN, stuckShift } from "@/lib/use-keyboard-nav";
// Wann die untere Leiste nach dem Tippen nachgeschoben wird (26.11.32): nur bei einer
// Lücke, wie sie eine eben geschlossene Tastatur hinterlässt — nie für Adressleiste,
@@ -18,3 +18,13 @@ describe("keyboard gap", () => {
expect(keyboardGap(vv(5000), 520)).toBe(0);
});
});
describe("stuck keyboard (26.11.41)", () => {
it("in the first second every gap counts, afterwards only a keyboard-sized one", () => {
expect(stuckShift(80, true)).toBe(80);
expect(stuckShift(80, false)).toBe(0);
expect(stuckShift(STUCK_MIN, false)).toBe(STUCK_MIN);
expect(stuckShift(336, false)).toBe(336);
expect(stuckShift(0, false)).toBe(0);
});
});