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

Multiple categories for each recipe #277

Closed
GutHib opened this issue Jun 24, 2020 · 9 comments
Closed

Multiple categories for each recipe #277

GutHib opened this issue Jun 24, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@GutHib
Copy link

GutHib commented Jun 24, 2020

Really starting to use this app now, and appreciate the effort put in it so far.

As someone pointed out in another ticket, more search functions would be the icing on the cake. Personally I think it would be great if each recipe could be added to more than one category. For example, a "Vegetarian" category seems logical and useful, and so does a category for "Salad". But what about chicken salad, then? :) So if you could add your carrot salad to "Vegetarian" and "Salad" and the chicken salad to "Poultry" and "Salad" that should work quite well to keep things organized. Thanks!

@GutHib GutHib added the enhancement New feature or request label Jun 24, 2020
@mrzapp
Copy link
Contributor

mrzapp commented Jun 25, 2020

@GutHib the "keywords" field already exists for that purpose. We plan to improve the UI so you can explore recipes using them too. For now, the keywords are only used in searches.

We're following the schema.org/Recipe standard, which only allows one string for the category field.

@mrzapp mrzapp closed this as completed Jun 25, 2020
@GutHib
Copy link
Author

GutHib commented Jun 26, 2020

"For now, the keywords are only used in searches."

I'm a bit confused. If there was any kind of visible search function in the current 0.7.4 I probably wouldn't have posted the suggestion, but as it stands, the only way to avoid browsing through the entire collection seems to be to click on categories.

I still think it would be great to have a set of quick links where results are allowed to overlap (for reasons stated above). Maybe this could be achieved by adding custom links - i.e. not just categories, but also keyword searches, so you could have "Salad" (category) and "Vegetarian" (keyword serach) side by side without violating any recipe standards. An alternative (although less flexible) would be to beef up categories with other tags (if there's a suitableForDiet property for "Vegetarian" there's not need to make it a category).

@mrzapp
Copy link
Contributor

mrzapp commented Jun 29, 2020

@GutHib what I mean is that we agree with your vision, we just haven't gotten around to implementing it yet :)

@Eothred
Copy link

Eothred commented Jan 17, 2023

Not sure if I should discuss here on a closed ticket, but I basically wanted to bring up the same as mentioned in the ticket.

What I wanted to add is that it seems several recipes I've downloaded lists multiple categories with comma separation, so it seems that is perhaps a common way to do multiple categories within one string in the recipe format.

It would break a category that contains a comma in 2, but I'm not sure I see any very obvious categories where that would apply. Alternative separators could be used.

@seyfeb
Copy link
Collaborator

seyfeb commented Jan 17, 2023

I'm not sure I see any very obvious categories where that would apply.

I actually have at least two categories with commas in the category name listing synonyms or very similar terms for a meal type that are collected in a single category.

For reference, I leave some links here which may contain insights on the categories topic:

Docs

#685

#1217

@christianlupus
Copy link
Collaborator

I am reading the schema documentation now for nth time and i do not confirm the main restriction about the one category per recipe restriction.

I think it was a misinterpreting in the first moment to only have a single category. E.g. the keywords, instructions, and ingredients are listed also in singular form. The value can always be duplicated into an array as far as i understand the syntax principles.

Do you confirm my understanding or can you explain the difference to me, @seyfeb? I am just curious as i was repeating the same stuff over and over and after looking in the standard i am no longer sure if we i was right and said the right things.

@seyfeb
Copy link
Collaborator

seyfeb commented Jan 17, 2023

I think your understanding is correct. According to the standard multiple categories should be allowed. Although I find it slightly confusing to name the corresponding key recipeCategory, recipeIngredient, etc. in their singular form.

I just meant to say, that there might be commas in the category names, but that's not a technical issue, since category strings would have quotation marks anyway.

A completely different question is, if the current behavior should be changed to support multiple categories per recipe. This would at least not break any existing behavior, but require some changes in multiple places.

@christianlupus
Copy link
Collaborator

I think the issue with the singular form comes from the fact that for semantics the standard description language was rdf. JSON is just a secondary representation, although the common version for schema.org as it is very condensed.

Yeah, i am not talking about the parsing of existing categories as there is not safe way to distinguish of a comma should separate two categories or two words in a single category name. We could oder a migration tool but that is another story.

Yeah, that would lead to some changes in the code. However, i consider that good. That will drop some off the food we have in the API design that is not very clever like the special chat for empty category and so. If the category is an array, it can be null, empty, an empty string, an underscore, a star, or any other string. Seems cleaner to me, to be honest.

@seyfeb
Copy link
Collaborator

seyfeb commented Jan 18, 2023

I have no issues with changing the current behavior. Users are free to assign only a single category just like it's currently possible.

Regarding the Recipe schema: The keywords are plural ;)

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

No branches or pull requests

5 participants