From b627dda5bfc95bde8cc53348184a0e9c8333bd37 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Sun, 12 Jul 2026 15:37:36 +0200 Subject: [PATCH] fix: batch-cook recipes shift left in compact view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dish-count/servings and time spans had no fixed width (unlike the difficulty badge slot, which reserves w-16 even when empty) — a batch-cook recipe's longer "N dishes"/"Nm total" text, or a missing time value, changed that column's width row-to-row, shifting the date and icon cluster after it. Gave both spans fixed widths so every compact row has identical column layout regardless of content. --- apps/web/components/recipe/recipes-grid.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/web/components/recipe/recipes-grid.tsx b/apps/web/components/recipe/recipes-grid.tsx index 992a948..99178c6 100644 --- a/apps/web/components/recipe/recipes-grid.tsx +++ b/apps/web/components/recipe/recipes-grid.tsx @@ -258,14 +258,16 @@ function CompactRow({ recipe, selected, selectMode }: { recipe: Recipe; selected

{recipe.title}

- {recipe.isBatchCook && recipe.dishCount ? ( - {tBatch("dishCount", { count: recipe.dishCount })} - ) : ( - {recipe.baseServings} - )} - {totalMins > 0 && ( - {t("total", { mins: totalMins })} - )} + + {recipe.isBatchCook && recipe.dishCount ? ( + <>{tBatch("dishCount", { count: recipe.dishCount })} + ) : ( + <>{recipe.baseServings} + )} + + + {totalMins > 0 && (<>{t("total", { mins: totalMins })})} + {recipe.difficulty && ( {t(`difficulty.${recipe.difficulty}`)}