feat(1050): hightlight usage for food deletion#1196
Open
Sim-sat wants to merge 1 commit intoCodeWithCJ:mainfrom
Open
feat(1050): hightlight usage for food deletion#1196Sim-sat wants to merge 1 commit intoCodeWithCJ:mainfrom
Sim-sat wants to merge 1 commit intoCodeWithCJ:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request enhances the food deletion workflow by providing a detailed, collapsible list of diary entries where a food item is used, including deep links to view specific entries. It also introduces URL-based date selection and item highlighting in the diary view. Feedback focuses on improving type safety with type guards in MealCard.tsx, using the Link component for better SPA navigation, restoring internationalization and pluralization for usage counts, and cleaning up server-side data mapping where unselected fields were being processed.
0707388 to
c821103
Compare
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.
Description
What problem does this PR solve?
When deleting a food it's hard to know where it was used.
How did you implement the solution?
Return the foods that are used and make it possible to jump to the date in diary with the query parameter date. This feature could also be used for exercises or other stuff in the future.
Linked Issue: Closes #1050
How to Test
PR Type
Checklist
All PRs:
New features only:
Frontend changes (
SparkyFitnessFrontend/orsrc/):pnpm run validateand it passes.en) translation file.Backend changes (
SparkyFitnessServer/):rls_policies.sqlfor any new user-specific tables.UI changes (components, screens, pages):