From 1baf5ce20e4a63ed653eb358a439913e7125b44b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Sun, 12 Jul 2026 10:29:13 +0200 Subject: [PATCH] fix: recipe card badge placement, missing tooltips, untranslated label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Batch-cook indicator moved from next to the title into the icon row alongside favorite/visibility (all three now get a tooltip, matching the existing favorite-button pattern). - Favorite button's tooltip text was hardcoded English ("Save"/ "Saved") instead of using the translation keys already used for its aria-label. - Shortened the batch-cook generate dialog's "Generating…" label (fr.json edited by user) — the long text was the real cause of the modal overlap, not the dialog structure. Co-Authored-By: Claude Sonnet 5 --- apps/web/components/recipe/recipes-grid.tsx | 62 ++++++++++++++----- .../web/components/social/favorite-button.tsx | 2 +- apps/web/messages/fr.json | 2 +- 3 files changed, 50 insertions(+), 16 deletions(-) diff --git a/apps/web/components/recipe/recipes-grid.tsx b/apps/web/components/recipe/recipes-grid.tsx index 2c231f1..eb89c73 100644 --- a/apps/web/components/recipe/recipes-grid.tsx +++ b/apps/web/components/recipe/recipes-grid.tsx @@ -117,12 +117,9 @@ function GridCard({ recipe, selected, selectMode }: { recipe: Recipe; selected: >
-
-

- {recipe.title} -

- {recipe.isBatchCook && } -
+

+ {recipe.title} +

{recipe.description && (

{recipe.isBatchCook ? stripMarkdown(recipe.description) : recipe.description} @@ -154,12 +151,25 @@ function GridCard({ recipe, selected, selectMode }: { recipe: Recipe; selected: )}

+ {recipe.isBatchCook && ( + + + } /> + {t("batchCookBadge")} + + + )} {!selectMode && ( )} - + + + } /> + {t(`visibility.${recipe.visibility}`)} + +
@@ -184,17 +194,29 @@ function ListRow({ recipe, selected, selectMode }: { recipe: Recipe; selected: b
-

+

{recipe.title} - {recipe.isBatchCook && }

+ {recipe.isBatchCook && ( + + + } /> + {t("batchCookBadge")} + + + )} {!selectMode && ( )} - + + + } /> + {t(`visibility.${recipe.visibility}`)} + +
{recipe.description &&

{recipe.isBatchCook ? stripMarkdown(recipe.description) : recipe.description}

} @@ -231,9 +253,8 @@ function CompactRow({ recipe, selected, selectMode }: { recipe: Recipe; selected )} > -

- {recipe.title} - {recipe.isBatchCook && } +

+ {recipe.title}

{recipe.baseServings} {totalMins > 0 && ( @@ -245,12 +266,25 @@ function CompactRow({ recipe, selected, selectMode }: { recipe: Recipe; selected {recipe.updatedAt.toLocaleDateString(locale, { month: "short", day: "numeric" })} + {recipe.isBatchCook && ( + + + } /> + {t("batchCookBadge")} + + + )} {!selectMode && ( )} - + + + } /> + {t(`visibility.${recipe.visibility}`)} + +

); } diff --git a/apps/web/components/social/favorite-button.tsx b/apps/web/components/social/favorite-button.tsx index b898e8f..66bb792 100644 --- a/apps/web/components/social/favorite-button.tsx +++ b/apps/web/components/social/favorite-button.tsx @@ -58,7 +58,7 @@ export function FavoriteButton({ } /> - {favorited ? "Saved" : "Save"} + {favorited ? tSocial("favoriteRemove") : tSocial("favoriteAdd")} ); diff --git a/apps/web/messages/fr.json b/apps/web/messages/fr.json index 4d44760..4b75d2c 100644 --- a/apps/web/messages/fr.json +++ b/apps/web/messages/fr.json @@ -553,7 +553,7 @@ "dietaryPrefsPlaceholder": "ex : végétarien, sans crustacés", "anyDifficulty": "Peu importe", "generate": "Générer", - "generating": "Génération… ça peut prendre une minute", + "generating": "Génération…", "generateSuccess": "Session de batch cooking créée", "generateFailed": "Échec de la génération" },