Categorized Ingredients #761
Replies: 6 comments 11 replies
-
First off, great idea! I would love to see this implemented. A few items of feedback/questions. Default types Ordering Other properties to consider Food Type properties vs Metadata properties Long term considerations I think this would require a GroceryStores table, and perhaps a GroceryStoreSection table. Many grocery stores may not respect our food types. E.g. GroceryStoreA keeps cheap cheeses on one side of the store, and fancy cheeses on the other side of the store. Each GroceryStoreSection could be assigned a default Food type. Then if people wanted they could provide specific grocerysection overrides. Shopping list would search the override list, and if it didn't exist then use the default. Of course this could be way overkill. ;) |
Beta Was this translation helpful? Give feedback.
-
Initial Thoughts on your Post.
I don't think this is a good approach. While it's easier for humans to read, it makes the overall process in the code more complex and requires additional code. I don't know what the actual benefit of that would be? Since we're not typically going to be sharing ingredient URLs, I think this just adds complexity without much benefit.
Why a key/value store vs a defined category-like table in the database? If we added an ingredient category table that could link to multiple recipes, I think that would offer much more flexibility. It would make filtering ingredients much faster on the backend instead of doing some custom query. I understand this would let you set any number of properties, but I'm struggling to see the utility of that longer-term.
I really like the idea of pre-populating common categories (or whatever) keep in mind that I've added similar functionality for Ingredients so we can build off of that structure. On a future note, those will also need to be made available for translations.
There's an admin page for Food and Units on the admin panel. https://beta.mealie.io/admin/toolbox/foods We can build off of that Here's What's Been Floating Around in my Head on this Topic
Note that these would be a one-to-one relationship. I don't think there's an effective way to allow for multiple categories of ingredients. Also, I think we should call them Ingredient Labels /Labels to avoid confusion...
Excited to see where this one goes, thanks! |
Beta Was this translation helpful? Give feedback.
-
I did something similar in another recipe program https://github.com/nazgul26/PHPRecipebook. In the shopping list, ingredients were grouped by category as described above (Cheese, Dairy, Baking, Canned Veggies etc). My solution was to add 2 tables, one to store user-entered store names (Store X in City Y), and a second table to store Aisle numbers and Sort Order by Grocery Store by Category.
Now, when you print the shopping list, the list is now sorted so you can move through the store quickly from left to right, skip aisles that you don't need, and know exactly which aisles you do need to go down. |
Beta Was this translation helpful? Give feedback.
-
I've made some partial progress on implementing the shopping-list feature in the |
Beta Was this translation helpful? Give feedback.
-
Hi there, is it implemented? |
Beta Was this translation helpful? Give feedback.
-
Hm, has this been implemented on the Recipes page? For example, is there a way to obtain a similar "categorization" on this page with this feature request? Or is this out of scope for this feature request? I was previously going to make one, but, then started searching and this seems like it is the closest related item (or otherwise this: #3371 |
Beta Was this translation helpful? Give feedback.
-
Putting together a discussion to collaboratively design what I plan to be a series of PRs.
Before submitting this feature request I have
COMPLETE AND FILL THESE OUT
Please Describe The Problem To Be Solved

With the new concept of a defined "Ingredient" that exists now in
mealie-next
, we should take advantage of these as objects that can have associated, useful data. Specifically here, we should have the ability to Type ingredients, in order to allow grocery-list-level grouping for easier shopping, akin to how other sites like CopyMeThat do:(Optional): Suggest A Solution
To implement this, we'll need a few things:
Update Foods:
Add FoodProperties
Very simple datatype:
We'll include one FoodProperties built-in to start in order to address the "grouped shopping list" approach, named "Type". I'm thinking the following values by default, although of course they could be edited via API:
To begin with, there will only be support for this FoodProperty to keep the main use case in mind, and which will be implemented on the frontend as so:
Note: This is overkill for the intended purpose, but I think there's a lot of future value in this framework
A few things that came to mind for that eventuality:
Additional Information
FILL THESE OUT
Beta Was this translation helpful? Give feedback.
All reactions