Skip to content

Add recipe ingredient filter and recipe list view#45

Merged
fkischewski99 merged 4 commits intomainfrom
feature/recipe-ingredient-filter-and-list
Mar 1, 2026
Merged

Add recipe ingredient filter and recipe list view#45
fkischewski99 merged 4 commits intomainfrom
feature/recipe-ingredient-filter-and-list

Conversation

@fkischewski99
Copy link
Copy Markdown
Owner

Summary

This PR adds two major features to improve recipe management and discovery:

  1. Ingredient-based recipe filter (Restefunktion)
  2. Recipe list view in main menu

Changes

1. Ingredient-based Recipe Filter (Restefunktion)

  • ✅ Multi-select ingredient filter with FilterChip UI matching existing filters
  • ✅ AND logic: recipes must contain ALL selected ingredients
  • ✅ Reuses existing IngredientPickerDialog component
  • ✅ Enhanced search bar with X button (clear text if present, close dialog if empty)
  • ✅ Filter stays open for multiple selections in multi-select mode

Files changed:

  • model/Recipe.kt - Added filterForIngredients parameter to matchesSearchQuery()
  • view/event/new_meal_screen/RecipeList.kt - Pass ingredient filter to recipe matching
  • view/event/new_meal_screen/IngredientFilterSection.kt - New filter component
  • view/admin/new_participant/IngredientPickerDialog.kt - Added multi-select mode and X button
  • view/event/new_meal_screen/NewMealPage.kt - Integrated ingredient filter into search UI

2. Recipe List View in Main Menu

  • ✅ New screen accessible from main menu drawer
  • ✅ Reuses existing RecipeList component for consistency
  • ✅ Search functionality with real-time filtering
  • ✅ Click on recipe navigates to recipe detail view
  • ✅ Proper initialization of RecipeOverviewViewModel when viewing from list

Files changed:

  • view/event/recipe_list/RecipeListScreen.kt - New recipe list screen
  • view/navigation/Routes.kt - Added RecipeList route
  • view/navigation/RootNavController.kt - Registered route
  • view/event/homescreen/DrawerContent.kt - Added menu item, reorganized structure
  • view/event/recepie_overview_screen/RecipeOverviewViewModel.kt - Added InitializeScreenWithRecipeId method
  • view/event/recepie_overview_screen/RecipeOverviewActions.kt - Added new action

3. Menu Structure Improvements

New drawer menu organization:

Administration
  - Teilnehmende verwalten

Rezepte
  - Rezeptliste ansehen
  - Rezepte verwalten

Benutzer
  - Logout
  - Account löschen

Testing

  • Ingredient filter works with multi-select
  • Recipe list displays and searches correctly
  • Navigation to recipe detail works
  • Recipe detail view loads properly from list
  • Desktop build successful

Screenshots

(Add screenshots if available)

🤖 Generated with Claude Code

fkischewski99 and others added 4 commits March 1, 2026 20:34
- Add ingredient filter to recipe search with multi-select support
- Filter shows recipes containing ALL selected ingredients (AND logic)
- New IngredientFilter component matching existing filter chip style
- Enhanced IngredientPickerDialog with X button in search bar
  - Clear search text if present, close dialog if empty
- Multi-select mode keeps dialog open for multiple selections
- Filter displays selected ingredients in chip label

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New RecipeListScreen with search functionality
- Reuses existing RecipeList component from new_meal_screen
- Added "Rezeptliste ansehen" menu item in drawer navigation
- Search field with clear button (X icon)
- Click on recipe navigates to recipe overview screen
- Added Routes.RecipeList navigation route

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move "Rezepte verwalten" under "Rezepte" section in drawer menu
- Fix recipe detail view loading issue when navigating from recipe list
- Add InitializeScreenWithRecipeId action to RecipeOverviewViewModel
- Create RecipeSelection object with default values (1 portion) when viewing from list
- Recipe overview now properly loads when clicked from recipe list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added all filter options from meal recipe selection:
  - Essgewohnheit (Eating habits)
  - Intoleranzen (Food intolerances)
  - Preis (Price)
  - Dauer (Time)
  - Typ (Recipe type)
  - Saison (Season)
  - Skill Level
  - Zutaten (Ingredients)
- Reuses existing filter components for consistency
- Filter chips display below search bar
- All filters work independently and can be combined

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fkischewski99 fkischewski99 merged commit 9dbba31 into main Mar 1, 2026
1 check passed
@fkischewski99 fkischewski99 deleted the feature/recipe-ingredient-filter-and-list branch March 1, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant