openfoodfacts-ios icon indicating copy to clipboard operation
openfoodfacts-ios copied to clipboard

Add a prompt to add the category and or nutrition facts to compute the Nutri-Score if they are missing

Open teolemon opened this issue 6 years ago • 5 comments

image

Add a prompt to add the category and or nutrition facts to compute the Nutri-Score if they are missing

if ( 
status= category-to-be-completed && 
status = nutrition-to-be-completed 
)
then "Add nutrition facts and a category to get the Nutri-Score"

if ( 
status= category-to-be-completed
)
then "Add a category to get the Nutri-Score"

if ( 
status = nutrition-to-be-completed 
)
then "Add nutrition facts to get the Nutri-Score"

teolemon avatar Feb 23 '19 10:02 teolemon

Is this prompt a label only, and no action to be handled when user taps on it? Also, is the additional gap between the prompt and the next cell intentional?

mockup

twink1e avatar Oct 02 '20 13:10 twink1e

We could show an alert which explain things, with two buttons: one to cancel, and one to start editing.

aleene avatar Oct 02 '20 13:10 aleene

  • the gap is not intentional
  • A simple solution is to jump straight into editing, and add a visible message/tooltip above the relevant sections
  • The best solution would have a custom edit view where only the relevant parts for the Nutri-Score would be displayed @philippeauriach any thoughts on that ?

teolemon avatar Oct 02 '20 13:10 teolemon

@twink1e having the logic to display the right customized messages on the product page, without anything fancy in the edit mode is already a good first step. The relevant fields are here: https://world.openfoodfacts.org/api/v0/product/5425600101745.json?fields=states_tags Nutri-Score: nutrition to be completed, categories to be completed NOVA: ingredients to be completed, categories to be completed

teolemon avatar Oct 02 '20 13:10 teolemon

In editMode there is already a text below the category ("needed to calculate Nutri-Score"), and above the Nutritional Values as well. So just going into editMode is sufficient.

aleene avatar Oct 02 '20 13:10 aleene