Phase 7: Implement Ingredient-Based Filtering (Reverse Search) #2

Open
opened 2026-04-10 14:40:44 +02:00 by ben · 0 comments
Owner

Feature Overview

Users can toggle to an "Ingredients filter" mode (via three-dot menu) to replace the hashtag filter. Instead of filtering by tags, users select from existing ingredients to find dishes they can create with what they have at home.

Context

Phase: Phase 7: Reverse Search (Ingredient-Based Filtering)
Status: 🏗️ IN PROGRESS
Related to: Home Page dish filtering

Requirements

Core Functionality

  • Multi-row ingredient pill UI (wrapped, scrollable)
  • Dishes sorted by number of matching ingredients (descending)
  • Dishes with 0 ingredient hits are hidden
  • Session-only filter (no persistence across app restarts)
  • Users select from existing ingredient database (no manual entry)

UI/UX Behavior

  • Toggle ingredient filter mode via three-dot menu on HomePage
  • Display available ingredients as interactive pills
  • Show matching dish count for transparency
  • Reset filter when toggling back to hashtag mode
  • Maintain smooth transitions between filter modes

Implementation Details

  • Extend FilterBar widget or create new ingredient filter component
  • Add provider in lib/logic/providers.dart for ingredient filter state
  • Query Isar database to get unique ingredients from all dishes
  • Apply filtering logic to dishListStreamProvider
  • Ensure performance on large recipe collections

User Benefit

Users can quickly discover dishes they can make with ingredients already available in their kitchen, reducing decision fatigue and food waste.

  • lib/ui/screens/home_page.dart — Main dish grid/list view
  • lib/ui/widgets/filter_bar.dart — Filter UI component
  • lib/logic/providers.dart — State management
  • lib/data/models/ingredient.dart — Ingredient model

Notes

  • This feature complements the existing hashtag-based filtering
  • Should work seamlessly with existing sorting and search features
  • Consider UX implications for devices with many dishes/ingredients
## Feature Overview Users can toggle to an **"Ingredients filter" mode** (via three-dot menu) to replace the hashtag filter. Instead of filtering by tags, users select from existing ingredients to find dishes they can create with what they have at home. ## Context **Phase:** Phase 7: Reverse Search (Ingredient-Based Filtering) **Status:** 🏗️ IN PROGRESS **Related to:** Home Page dish filtering ## Requirements ### Core Functionality - [ ] Multi-row ingredient pill UI (wrapped, scrollable) - [ ] Dishes sorted by number of matching ingredients (descending) - [ ] Dishes with 0 ingredient hits are hidden - [ ] Session-only filter (no persistence across app restarts) - [ ] Users select from existing ingredient database (no manual entry) ### UI/UX Behavior - Toggle ingredient filter mode via three-dot menu on HomePage - Display available ingredients as interactive pills - Show matching dish count for transparency - Reset filter when toggling back to hashtag mode - Maintain smooth transitions between filter modes ### Implementation Details - Extend `FilterBar` widget or create new ingredient filter component - Add provider in `lib/logic/providers.dart` for ingredient filter state - Query Isar database to get unique ingredients from all dishes - Apply filtering logic to `dishListStreamProvider` - Ensure performance on large recipe collections ## User Benefit Users can quickly discover dishes they can make with ingredients already available in their kitchen, reducing decision fatigue and food waste. ## Related Code Locations - `lib/ui/screens/home_page.dart` — Main dish grid/list view - `lib/ui/widgets/filter_bar.dart` — Filter UI component - `lib/logic/providers.dart` — State management - `lib/data/models/ingredient.dart` — Ingredient model ## Notes - This feature complements the existing hashtag-based filtering - Should work seamlessly with existing sorting and search features - Consider UX implications for devices with many dishes/ingredients
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ben/LovePlate#2
No description provided.