From 64f45ed74d72d827a5db7064be91b7ef1db064e0 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 9 Jul 2026 09:47:39 +0200 Subject: [PATCH] feat: add list and compact view modes to recipes page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Grid was the only layout. Add a view-mode toggle (grid/list/compact) persisted to localStorage: - List: thumbnail + description + inline metadata, one per row - Compact: dense single-line rows (thumb, title, servings/time/ difficulty/date/visibility) for scanning large libraries Selection mode and bulk actions work identically across all three. Also fixes a real bug hit while wiring this up: "recipe.visibility" was defined twice in the messages files — once as a flat string ("Visibility", used as the bulk-actions dropdown label) and once as the {private,unlisted,public} label object. The object silently won in JSON, so t("visibility") resolved to an object and next-intl threw INSUFFICIENT_PATH the moment you opened that dropdown. Renamed the flat one to visibilityMenuLabel. Co-Authored-By: Claude Sonnet 5 --- apps/web/components/recipe/recipe-form.tsx | 2 +- apps/web/components/recipe/recipes-grid.tsx | 341 ++++++++++++-------- apps/web/messages/en.json | 6 +- apps/web/messages/fr.json | 6 +- 4 files changed, 222 insertions(+), 133 deletions(-) diff --git a/apps/web/components/recipe/recipe-form.tsx b/apps/web/components/recipe/recipe-form.tsx index bf3e380..9ada97b 100644 --- a/apps/web/components/recipe/recipe-form.tsx +++ b/apps/web/components/recipe/recipe-form.tsx @@ -265,7 +265,7 @@ export function RecipeForm({ recipeId, defaultValues }: RecipeFormProps) {
- +