Skip to content

Feat/69 key phrases#79

Open
m-lyon wants to merge 13 commits intomainfrom
feat/69-key-phrases
Open

Feat/69 key phrases#79
m-lyon wants to merge 13 commits intomainfrom
feat/69-key-phrases

Conversation

@m-lyon
Copy link
Copy Markdown
Owner

@m-lyon m-lyon commented Mar 30, 2026

No description provided.

m-lyon added 13 commits March 29, 2026 21:27
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant