-
-
Notifications
You must be signed in to change notification settings - Fork 763
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: Allow Cookbooks To Share Names #4186
Merged
boc-the-git
merged 10 commits into
mealie-recipes:mealie-next
from
michael-genson:feat/allow-duplicate-cookbook-names
Sep 15, 2024
Merged
feat: Allow Cookbooks To Share Names #4186
boc-the-git
merged 10 commits into
mealie-recipes:mealie-next
from
michael-genson:feat/allow-duplicate-cookbook-names
Sep 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boc-the-git
previously approved these changes
Sep 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
One question.
boc-the-git
approved these changes
Sep 15, 2024
boc-the-git
pushed a commit
to boc-the-git/mealie
that referenced
this pull request
Sep 28, 2024
boc-the-git
pushed a commit
to boc-the-git/mealie
that referenced
this pull request
Sep 28, 2024
Choromanski
pushed a commit
to Choromanski/mealie
that referenced
this pull request
Oct 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
(REQUIRED)
What this PR does / why we need it:
(REQUIRED)
This PR allows cookbooks to share the same name. We want this since cookbooks are per-household, and multiple households may want the same cookbook name (e.g. "Sides").
When multiple cookbooks share the same name, they are assigned different slugs (so slugs are still unique, which we enforce at the DB layer in a previous PR). The logic is similar to how duplicate recipes are handled (although recipes de-dupe name, too). This PR also makes it so when a cookbook's name is updated, so is its slug (so it matches the name).
Which issue(s) this PR fixes:
(REQUIRED)
Closes #4083
Special notes for your reviewer:
Technically we're not stopping users from creating the same cookbook name in one household, so it is possible to do this:
I don't really see this as a problem, just figured I'd point it out.
Testing
(fill-in or delete this section)
Pytest for the new cookbooks repo with custom dedupe logic. I also confirmed the frontend handles this fine with cookbook CRUD operations (both in the same household and on two different households).