From 257908da7f618258eb5243a2c31fbe3ba562d228 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 13 Jul 2026 08:37:40 +0200 Subject: [PATCH] fix: recipes page wasted too much vertical space above content on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Search bar forced its own full-width row (w-full), pushing Sort/Filter to a second row below it — on mobile that's title + action buttons + search row + sort/filter row + toolbar row before any recipe appears. Sort/Filter now go icon-only below sm: (text labels hidden, matching the convention already used for compact-view badges), letting Search share one row with both instead of forcing its own. Also tightened the title size and inter-section spacing on mobile (unchanged at sm: and up). Verified at a real 390px mobile viewport: first recipe card now clears with room to spare, versus barely visible at the same viewport height before. Desktop screenshot confirms zero visual change there. --- apps/web/app/(app)/recipes/page.tsx | 2 +- apps/web/components/recipe/recipes-header.tsx | 21 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/web/app/(app)/recipes/page.tsx b/apps/web/app/(app)/recipes/page.tsx index 25075aa..3a2db23 100644 --- a/apps/web/app/(app)/recipes/page.tsx +++ b/apps/web/app/(app)/recipes/page.tsx @@ -104,7 +104,7 @@ export default async function RecipesPage({ searchParams }: { searchParams: Sear }; return ( -
+
{m.recipes.tabMine} diff --git a/apps/web/components/recipe/recipes-header.tsx b/apps/web/components/recipe/recipes-header.tsx index 7cda847..09cd625 100644 --- a/apps/web/components/recipe/recipes-header.tsx +++ b/apps/web/components/recipe/recipes-header.tsx @@ -127,11 +127,11 @@ export function RecipesHeader({ return ( <> -
-
+
+
-

{t("title")}

-

+

{t("title")}

+

{count === 0 ? t("subtitle") : t(count !== 1 ? "resultPlural" : "resultSingular", { count })} @@ -154,8 +154,9 @@ export function RecipesHeader({

- {/* Search */} -
+ {/* Search — shares the row with Sort/Filter even on mobile now that + those are icon-only there, instead of forcing a whole row to itself. */} +
- {SORT_KEYS[initialSort] ? t(SORT_KEYS[initialSort]) : t("sort")} + {SORT_KEYS[initialSort] ? t(SORT_KEYS[initialSort]) : t("sort")} @@ -206,11 +207,11 @@ export function RecipesHeader({ 0 ? "secondary" : "outline", size: "sm" }), - "gap-1.5" + "gap-1.5 shrink-0" )} > - {t("filter")} + {t("filter")} {activeFilterCount > 0 && ( {activeFilterCount}