Open
Conversation
Add Mongoose model with value (unique, lowercase) and description fields, GraphQL CRUD resolvers (admin-gated mutations), and a keyPhraseUsedInRecipes query that checks recipe instructions for phrase matches.
Pure function that splits instruction text into segments, tagging matches against key phrases with case-insensitive word-boundary matching and longest-match-first strategy for overlapping phrases.
- Add KEY_PHRASE_FIELDS fragment, GET_KEY_PHRASES, KEY_PHRASE_USED_IN_RECIPES queries - Add CREATE_KEY_PHRASE, UPDATE_KEY_PHRASE, REMOVE_KEY_PHRASE mutations - Add query mocks (mockSearKeyPhrase, mockBlanch, mockGetKeyPhrases) - Add mutation mocks (create, update, delete, usedInRecipes variants) - Add mockKeyPhraseId and mockKeyPhraseTwoId to mock IDs
- Add BaseKeyPhraseForm with value (lowercased) and description fields using Mantine - Add CreateKeyPhraseForm wrapping base form with create mutation and cache update - Add ModifyKeyPhraseForm with update/delete mutations and delete confirmation modal - Add ModifyableKeyPhrase type declaration to recipe.d.ts - Delete flow checks if key phrase is used in recipes before confirming
…registration - CreateKeyPhrase page with success toast and redirect using Mantine layout - EditKeyPhrase page with SearchableSelect dropdown and ModifyKeyPhraseForm - Register /create/key-phrase and /edit/key-phrase routes behind RequireAuth
… InstructionsTab - Add HighlightedInstruction component using Mantine Popover for key phrase tooltips - Update InstructionList with optional keyPhrases prop for conditional highlighting - Update InstructionsTab to fetch key phrases and pass to InstructionList - RecipeModal is unaffected (no keyPhrases prop passed = plain text rendering) - Export HighlightedInstruction from viewing feature barrel
…and EditKeyPhrase pages
…o KeyPhrase model
This file contains hidden or 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
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.
No description provided.