From 4bb93b78d13d710ceb87f703bab721fad5cc0ca1 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Wed, 8 Apr 2026 22:51:43 -0700 Subject: [PATCH] feat(ux/nd): collapse Find tab into level picker + two filter sections with active indicators --- frontend/src/components/RecipesView.vue | 318 +++++++++++++----------- 1 file changed, 177 insertions(+), 141 deletions(-) diff --git a/frontend/src/components/RecipesView.vue b/frontend/src/components/RecipesView.vue index b6bc2fb..79c0a7b 100644 --- a/frontend/src/components/RecipesView.vue +++ b/frontend/src/components/RecipesView.vue @@ -66,170 +66,168 @@ - -
- -
- - {{ tag }} - - -
- - Press Enter or comma to add each item. -
- - -
- -
- - {{ tag }} - - -
- - Press Enter or comma to add. Allergies are hard exclusions — no recipes containing these will appear. -
- - -
- -

- Only suggests quick, simple recipes based on your saved equipment. -

-
- - -
- -

- All recipes shown regardless of missing ingredients. Affiliate links appear for anything you'd need to buy. -

-
- - -
- - -
- - +
- - Nutrition Filters (per recipe, optional) + + Dietary preferences + -
+ +
+
- + +
+ + {{ tag }} + + +
+ Press Enter or comma to add each item.
+ +
- + +
+ + {{ tag }} + + +
+ Press Enter or comma to add. Allergies are hard exclusions — no recipes containing these will appear.
+ +
- + +

+ Only suggests quick, simple recipes based on your saved equipment. +

+
+ + +
+ +

+ All recipes shown regardless of missing ingredients. Affiliate links appear for anything you'd need to buy. +

+
+ + +
+ -
-
- -
-

- Recipes without nutrition data always appear. Filters apply to food.com and estimated values. -

- -
- -
- -
-
+ +
+ + Advanced filters + + - -
- - -
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+

+ Recipes without nutrition data always appear. +

+
+ + +
+ +
+ +
+
+ + +
+ + +
+
+
@@ -657,6 +655,20 @@ const levels = [ { value: 4, label: 'Surprise Me 🎲', description: 'Fully AI-generated — open-ended and occasionally unexpected. Requires paid tier.' }, ] +const dietaryActive = computed(() => + recipesStore.constraints.length > 0 || + recipesStore.allergies.length > 0 || + recipesStore.hardDayMode || + recipesStore.shoppingMode +) + +const advancedActive = computed(() => + Object.values(recipesStore.nutritionFilters).some((v) => v !== null) || + recipesStore.maxMissing !== null || + !!recipesStore.category || + !!recipesStore.styleId +) + const activeLevel = computed(() => levels.find(l => l.value === recipesStore.level)) const cuisineStyles = [ @@ -1052,6 +1064,30 @@ details[open] .collapsible-summary::before { content: '▼ '; } +.filter-summary { + display: flex; + align-items: center; + gap: var(--spacing-xs); + font-weight: 500; + color: var(--color-text-primary); + font-size: var(--font-size-sm); +} + +.filter-active-dot { + width: 7px; + height: 7px; + border-radius: 50%; + background: var(--color-primary); + flex-shrink: 0; +} + +.collapsible-body { + padding-top: var(--spacing-sm); + display: flex; + flex-direction: column; + gap: var(--spacing-xs); +} + .swap-row { padding: var(--spacing-xs) 0; border-bottom: 1px solid var(--color-border);