-
Notifications
You must be signed in to change notification settings - Fork 129
Marina/new UI and screens #159
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
base: main
Are you sure you want to change the base?
Conversation
…s, create ViewModel for recipe screen
…ory and AuthDataSource, and importing Firebase Auth, Identity and Credential Manager libraries
…ep auth simple and focus on Pipelines samples
…lay recipe rating stars
…ipe with structured output
…n Storage, fix Filter and Recipe UI
…hey share the same view model. Adjustments to the DatabaseRemoteDataSource functions
Summary of ChangesHello @marinacoelho, 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 represents a substantial upgrade to the Friendly Meals Android application, transforming its user interface and backend capabilities. The changes are driven by a product requirement document (PRD) aiming for a more modern and feature-rich experience. Key improvements include dedicated screens for browsing and filtering recipes, a detailed recipe view with saving and rating functionalities, and an innovative meal scanning feature that leverages AI to provide nutritional insights. The underlying architecture has been significantly enhanced with robust Firebase integrations for authentication, data storage, and image management, ensuring scalability and a seamless user experience. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This Pull Request introduces a significant overhaul of the Friendly Meals app, bringing in a modern UI, new screens, and robust backend integrations with Firebase Authentication, Cloud Firestore, and Cloud Storage. The adoption of structured AI output for recipe generation and meal scanning is a powerful enhancement. The new navigation structure with a bottom bar greatly improves user experience. Overall, the changes are well-structured and demonstrate a clear architectural approach using data sources, repositories, and Hilt for dependency injection. I've identified a few areas for potential improvement regarding error handling, efficiency, and string resource usage.
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Show resolved
Hide resolved
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/firebase/example/friendlymeals/data/datasource/AIRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/firebase/example/friendlymeals/data/datasource/AIRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...in/java/com/google/firebase/example/friendlymeals/data/datasource/StorageRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...oid/app/src/main/java/com/google/firebase/example/friendlymeals/ui/shared/CameraComponent.kt
Outdated
Show resolved
Hide resolved
morganchen12
left a comment
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.
Sorry for the slow review, I had a few comments in the Firestore part of the code. The rest LGTM.
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Show resolved
Hide resolved
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
| val document = firestore.collection(RECIPE_COLLECTION) | ||
| .document(recipeId) | ||
| .collection(REVIEW_SUBCOLLECTION) | ||
| .document("${recipeId}_${userId}") |
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.
This documentID convention should be documented (and this query needs to be a pipeline query as well).
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.
It's documented in the PRD. Query fixed.
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.
I think it should be documented here for external users browsing the code, but will leave this feedback as optional.
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Outdated
Show resolved
Hide resolved
...n/java/com/google/firebase/example/friendlymeals/data/datasource/DatabaseRemoteDataSource.kt
Show resolved
Hide resolved
morganchen12
left a comment
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 with one bit of optional feedback.
| Create a detailed recipe based on these ingredients: $ingredients. | ||
| Format requirements: | ||
| - 'instructions': Provide the cooking steps as a clear. Use bold formatting on the step numbers. Use Markdown. |
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.
nit: This sentence Provide the cooking steps as a clear is incomplete. Maybe Provide the cooking steps as a clear list of instructions separated by newlines.?
This Pull Request adds new screens to the Friendly Meals app, and changes the UI to use a more modern approach, as proposed in the PRD. The new screens are:
In order to implement the above, we added a tab to the bottom of the screen so users can quickly switch screens. We also had to add Firebase Authentication and Cloud Firestore to store all the recipes. We're now using Cloud Storage to store recipe images. We modified the calls to Firebase AI Logic to return a structured output so we could display the recipe in the new UI.
Below you can see screenshots of the landing screen (where users can generate a new recipe), the recipe screen, the recipe list screen, and the filter screen: