Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add recipe as ingredient #4800

Open
wants to merge 23 commits into
base: mealie-next
Choose a base branch
from

Conversation

parumpum
Copy link
Contributor

@parumpum parumpum commented Dec 30, 2024

What type of PR is this?

  • feature

What this PR does / why we need it:

Adds the ability to reference another recipe in a recipe's ingredients. A reference to the recipe is added to a new column for table recipes_ingredients. This can be utilized to determine if the ingredient is a food, a recipe, or just a note.

Adding recipe to shopping list will loop through the ingredients list, cascading down into recipes if it finds any to add individual ingredients to the shopping list.

image

image

image

Clicking the referenced recipe will open a new tab to the recipe

Added select all / none buttons to each section of the Add To Shopping List dialog
image

Linked recipes will show up as a section in this dialog, the select all / none buttons on each section make it easy to include or exclude several ingredients at once.

Which issue(s) this PR fixes:

#1761

Testing

Tested by linking recipes together, adding ingredients to shopping lists
Unit test that adds a recipe to another recipe as an ingredient
Modified referenced recipe name and ingredients, verified changes were picked up on main recipe page

mealie/core/settings/settings.py Dismissed Show dismissed Hide dismissed
@parumpum parumpum marked this pull request as draft December 31, 2024 17:21
@parumpum parumpum marked this pull request as ready for review December 31, 2024 19:03
@parumpum
Copy link
Contributor Author

Addressed feedback in Discord:

  • Added select all / none to Shopping List sections
  • Added selectable list of child recipes on "I Made This" dialog
  • Images shown when searching for child recipes to help pick the correct item

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant