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

After saving, the Nutrition edit should close, and back to the Product Page #954

Closed
1 task
teolemon opened this issue Jan 14, 2022 · 2 comments
Closed
1 task
Assignees
Labels
✏️ Editing - Nutrition input 🛣️ Road to scores The easier it is to get Nutri-Score, Eco-Score, the happier the users.

Comments

@teolemon
Copy link
Member

teolemon commented Jan 14, 2022

What

  • After saving, the Nutrition edit should close, and the app should bring the user back to the Product Page

Part of

@teolemon teolemon added 🛣️ Road to scores The easier it is to get Nutri-Score, Eco-Score, the happier the users. ✏️ Editing - Nutrition input labels Jan 14, 2022
@monsieurtanuki monsieurtanuki self-assigned this Jan 17, 2022
@monsieurtanuki
Copy link
Contributor

@teolemon I'm stuck with the following problems:

  1. so far I know how to save a whole product, but I would make sense to save just the nutrition values: is there an API we could call for that? Or could we just save an empty product with just the nutrition values, so that only the nutrition values are saved?
  2. still find confusing the 100g and portion "tabs" - you would like both tab values to be saved, regardless of a tab being displayed or not by the user, right?

@teolemon teolemon moved this to Todo in Road to Scores Feb 11, 2022
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Feb 12, 2022
Impacted file:
* `nutrition_page_loaded.dart`: back after saving nutrition facts
monsieurtanuki added a commit that referenced this issue Feb 12, 2022
Impacted file:
* `nutrition_page_loaded.dart`: back after saving nutrition facts
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Feb 12, 2022
…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 added a commit that referenced this issue Feb 13, 2022
…al DB (#1138)

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 added a commit to monsieurtanuki/smooth-app that referenced this issue Feb 14, 2022
…r focus

New file:
* `nutrition_container.dart`: Nutrition data, for nutrient order and conversions.
* `tmp_to_off_nutriments.dart`: Nutrient ids supported by `Nutriments`, to be moved to off-dart

Impacted file:
* `nutrition_page_loaded.dart`: moved the nutrient and conversion code to new class `NutritionContainer`
monsieurtanuki added a commit that referenced this issue Feb 18, 2022
New file:
* `nutrition_container.dart`: Nutrition data, for nutrient order and conversions.
* `tmp_to_off_nutriments.dart`: Nutrient ids supported by `Nutriments`, to be moved to off-dart

Impacted file:
* `nutrition_page_loaded.dart`: moved the nutrient and conversion code to new class `NutritionContainer`
@monsieurtanuki
Copy link
Contributor

Done in #1134.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editing - Nutrition input 🛣️ Road to scores The easier it is to get Nutri-Score, Eco-Score, the happier the users.
Projects
Status: Done
Development

No branches or pull requests

2 participants