Mobile App Edit Food Screens#836
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the mobile application's food tracking capabilities by introducing the ability to edit existing food entries. Users can now adjust various aspects of their logged food, from basic quantity and meal type to detailed nutritional information. This feature required substantial updates across the mobile UI, new API endpoints, and a refactoring of how food entry data is handled on the server, all while maintaining compatibility with existing web and server functionalities. Additionally, it includes important updates to health data synchronization mappings for improved accuracy. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to edit food entries in the mobile app, a significant feature enhancement. This includes a new FoodFormScreen for adjusting nutrition details, which is used both for creating new manual entries and for editing existing ones. The FoodEntryViewScreen has been extensively refactored to support a new edit mode with animated UI transitions. On the server side, the food entry update logic has been enhanced to handle custom nutrition snapshots. Additionally, the PR includes a valuable refactoring of react-query test setup, improving test code clarity and maintainability across numerous files.
My review identifies a couple of minor UI state management issues in the new editing flow on the FoodEntryViewScreen where unsaved changes are not consistently reflected in the UI or when re-opening the edit form. The rest of the implementation, including the backend changes and new tests, appears solid.
|
@apedley Is it been reviewed with web as well as it involves server side code change? |
Yes I only added new options to the current server routes (and one new route.) Also verified that editing food works just like before on web. |
Tip
Help us review and merge your PR faster!
Please ensure you have completed the Checklist below.
For Frontend changes, please run
pnpm run validateto check for any errors.PRs that include tests and clear screenshots are highly preferred!
Description
Related Issue
PR type [X] Issue [X] New Feature [ ] Documentation
Linked Issue: #
Checklist
Please check all that apply:
pnpm run validate(especially for Frontend).en) translation file (if applicable).rls_policies.sqlfor any new user-specific tables.Screenshots (if applicable)
Before
[Insert screenshot/GIF here]
After
[Insert screenshot/GIF here]