Skip to content
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

feat: #954 - actually saves nutrients on the BE and refreshes the local DB #1138

Merged
merged 1 commit into from
Feb 13, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Please run some tests on DEV env to limit the potential impact on PROD!

New file:

  • rainforest-alliance.90x90.svg: unrelated asset cache refresh

Impacted files:

  • knowledge_panels_builder.dart: added an optional callback for page refresh after data saving; calls that callback after saving nutrients
  • new_product_page.dart: added a callback parameter for page refresh
  • nutrition_page_loaded.dart: actually saves the nutrients on the BE and refreshes the local database

…eshes the local DB

Please run some tests on DEV env to limit the potential impact on PROD!

New file:
* `rainforest-alliance.90x90.svg`: unrelated asset cache refresh

Impacted files:
* `knowledge_panels_builder.dart`: added an optional callback for page refresh after data saving; calls that callback after saving nutrients
* `new_product_page.dart`: added a callback parameter for page refresh
* `nutrition_page_loaded.dart`: actually saves the nutrients on the BE and refreshes the local database
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner February 12, 2022 18:02
Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether there's a method to save the absence of nutrition facts in the dart package

@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your code review!
Now that we agree on the UI, I still have to run some tests - for instance as you mentioned the "no nutrients at all", but also I'm not sure both "100g" and "portion" can be saved at the same time (problem on my code, not on the server side).
To be continued...

@monsieurtanuki monsieurtanuki merged commit 4e62659 into openfoodfacts:develop Feb 13, 2022
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.

2 participants