From 41c9314a334e2b88e0a9bcc3249ea285a29c7c1c Mon Sep 17 00:00:00 2001 From: M123-dev Date: Tue, 6 Aug 2024 19:00:44 +0000 Subject: [PATCH] Update assets --- .../onboarding/sample_product_data.json | 832 ++++-------------- 1 file changed, 161 insertions(+), 671 deletions(-) diff --git a/packages/smooth_app/assets/onboarding/sample_product_data.json b/packages/smooth_app/assets/onboarding/sample_product_data.json index 8da40ee73192..ee72cc3e09fd 100644 --- a/packages/smooth_app/assets/onboarding/sample_product_data.json +++ b/packages/smooth_app/assets/onboarding/sample_product_data.json @@ -276,15 +276,15 @@ "attributes" : [ { "description" : "", - "description_short" : "Very low environmental impact", - "grade" : "a", - "icon_url" : "https://static.openfoodfacts.org/images/attributes/dist/ecoscore-a.svg", + "description_short" : "Unknown environmental impact", + "grade" : "unknown", + "icon_url" : "https://static.openfoodfacts.org/images/attributes/dist/ecoscore-unknown.svg", "id" : "ecoscore", - "match" : 100, + "match" : 0, "name" : "Eco-Score", "panel_id" : "ecoscore", - "status" : "known", - "title" : "Eco-Score A" + "status" : "unknown", + "title" : "Eco-Score not computed" }, { "description" : "", @@ -330,14 +330,10 @@ "name" : "Labels" } ], - "brands" : "Open Food Facts", + "brands" : "zoahary Baobab", "categories_tags_fr" : [ - "Aliments et boissons à base de végétaux", - "Aliments d'origine végétale", - "Aliments à base de fruits et de légumes", "Plats préparés", - "Soupes", - "Soupes de légumes" + "Ragoûts" ], "code" : "093270067481501", "ecoscore_data" : { @@ -588,95 +584,12 @@ "threatened_species" : {} }, "agribalyse" : { - "agribalyse_proxy_food_code" : "25903", - "co2_agriculture" : 0.10371296, - "co2_consumption" : 0.011022624, - "co2_distribution" : 0.01567597, - "co2_packaging" : 0.09985047, - "co2_processing" : 0.14982524, - "co2_total" : 0.510081444, - "co2_transportation" : 0.12999418, - "code" : "25903", - "dqr" : "2.42", - "ef_agriculture" : 0.023583571, - "ef_consumption" : 0.0040337776, - "ef_distribution" : 0.0044793367, - "ef_packaging" : 0.0099157882, - "ef_processing" : 0.029435401, - "ef_total" : 0.0817923135, - "ef_transportation" : 0.010344439, - "is_beverage" : 0, - "name_en" : "Soup, mixed vegetables, prepacked, to be reheated", - "name_fr" : "Soupe aux légumes variés, préemballée à réchauffer", - "score" : 98, - "version" : "3.1.1" + "warning" : "missing_agribalyse_match" }, - "grade" : "a", - "grades" : { - "ad" : "a", - "al" : "a", - "at" : "a", - "ax" : "a", - "ba" : "a", - "be" : "a", - "bg" : "a", - "ch" : "a", - "cy" : "a", - "cz" : "a", - "de" : "a", - "dk" : "a", - "dz" : "a", - "ee" : "a", - "eg" : "a", - "es" : "a", - "fi" : "a", - "fo" : "a", - "fr" : "a", - "gg" : "a", - "gi" : "a", - "gr" : "a", - "hr" : "a", - "hu" : "a", - "ie" : "a", - "il" : "a", - "im" : "a", - "is" : "a", - "it" : "a", - "je" : "a", - "lb" : "a", - "li" : "a", - "lt" : "a", - "lu" : "a", - "lv" : "a", - "ly" : "a", - "ma" : "a", - "mc" : "a", - "md" : "a", - "me" : "a", - "mk" : "a", - "mt" : "a", - "nl" : "a", - "no" : "a", - "pl" : "a", - "ps" : "a", - "pt" : "a", - "ro" : "a", - "rs" : "a", - "se" : "a", - "si" : "a", - "sj" : "a", - "sk" : "a", - "sm" : "a", - "sy" : "a", - "tn" : "a", - "tr" : "a", - "ua" : "a", - "uk" : "a", - "us" : "a", - "va" : "a", - "world" : "a", - "xk" : "a" + "missing" : { + "agb_category" : 1 }, + "missing_agribalyse_match_warning" : 1, "previous_data" : { "agribalyse" : { "agribalyse_proxy_food_code" : "25903", @@ -704,76 +617,10 @@ "grade" : "a", "score" : 122 }, - "score" : 115, - "scores" : { - "ad" : 123, - "al" : 115, - "at" : 121, - "ax" : 123, - "ba" : 117, - "be" : 123, - "bg" : 118, - "ch" : 123, - "cy" : 121, - "cz" : 122, - "de" : 123, - "dk" : 121, - "dz" : 122, - "ee" : 123, - "eg" : 120, - "es" : 121, - "fi" : 123, - "fo" : 123, - "fr" : 123, - "gg" : 123, - "gi" : 116, - "gr" : 122, - "hr" : 120, - "hu" : 119, - "ie" : 122, - "il" : 120, - "im" : 123, - "is" : 123, - "it" : 122, - "je" : 123, - "lb" : 121, - "li" : 123, - "lt" : 123, - "lu" : 123, - "lv" : 123, - "ly" : 123, - "ma" : 123, - "mc" : 123, - "md" : 119, - "me" : 121, - "mk" : 119, - "mt" : 123, - "nl" : 123, - "no" : 118, - "pl" : 119, - "ps" : 121, - "pt" : 117, - "ro" : 120, - "rs" : 116, - "se" : 117, - "si" : 121, - "sj" : 123, - "sk" : 119, - "sm" : 121, - "sy" : 119, - "tn" : 116, - "tr" : 116, - "ua" : 121, - "uk" : 123, - "us" : 115, - "va" : 119, - "world" : 115, - "xk" : 119 - }, - "status" : "known" + "scores" : {}, + "status" : "unknown" }, - "ecoscore_grade" : "a", - "ecoscore_score" : 115, + "ecoscore_grade" : "unknown", "environment_impact_level_tags" : [], "ingredients_analysis_tags" : [ "en:palm-oil-free", @@ -781,504 +628,30 @@ "en:vegetarian" ], "knowledge_panels" : { - "carbon_footprint" : { - "elements" : [ - { - "element_type" : "text", - "text_element" : { - "html" : "\n

The carbon emission figure comes from ADEME's Agribalyse database, for the category: \n Soup, mixed vegetables, prepacked, to be reheated\n (Source: ADEME Agribalyse Database)\n

\n ", - "type" : "summary" - } - }, - { - "element_type" : "table", - "table_element" : { - "columns" : [ - { - "text" : "Stage", - "type" : "text" - }, - { - "text" : "Impact", - "type" : "percent" - } - ], - "id" : "ecoscore_carbon_impact_by_stages_table", - "rows" : [ - { - "id" : "agriculture", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/agriculture.svg", - "text" : "Agriculture" - }, - { - "percent" : 20.3326275087945, - "text" : "20.3 %" - } - ] - }, - { - "id" : "processing", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/processing.svg", - "text" : "Processing" - }, - { - "percent" : 29.3728073746592, - "text" : "29.4 %" - } - ] - }, - { - "id" : "packaging", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/packaging.svg", - "text" : "Packaging" - }, - { - "percent" : 19.5753974535878, - "text" : "19.6 %" - } - ] - }, - { - "id" : "transportation", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/transportation.svg", - "text" : "Transportation" - }, - { - "percent" : 25.484985099752, - "text" : "25.5 %" - } - ] - }, - { - "id" : "distribution", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/distribution.svg", - "text" : "Distribution" - }, - { - "percent" : 3.0732288312766, - "text" : "3.1 %" - } - ] - }, - { - "id" : "consumption", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/consumption.svg", - "text" : "Consumption" - }, - { - "percent" : 2.16095373192992, - "text" : "2.2 %" - } - ] - } - ], - "table_type" : "percents", - "title" : "Details of the impacts by stages of the life cycle" - } - } - ], - "evaluation" : "good", - "expanded" : false, - "level" : "info", - "title_element" : { - "icon_color_from_evaluation" : true, - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/car.svg", - "subtitle" : "51 g CO² per 100g of product", - "title" : "Equal to driving 0.3 km in a petrol car" - }, - "topics" : [ - "environment" - ] - }, "ecoscore" : { "elements" : [ { "element_type" : "text", "text_element" : { - "html" : "The Eco-Score is an experimental score that summarizes the environmental impacts of food products." - } - }, - { - "element_type" : "text", - "text_element" : { - "html" : "\n \n The Eco-Score was initially developped for France and it is being extended to other European countries. The Eco-Score formula is subject to change as it is regularly improved to make it more precise and better suited to each country.\n \n ", - "type" : "note" - } - }, - { - "element_type" : "panel_group", - "panel_group_element" : { - "panel_ids" : [ - "ecoscore_agribalyse" - ], - "title" : "Life cycle analysis" - } - }, - { - "element_type" : "panel_group", - "panel_group_element" : { - "panel_ids" : [ - "ecoscore_production_system", - "ecoscore_origins_of_ingredients", - "ecoscore_threatened_species", - "ecoscore_packaging" - ], - "title" : "Bonuses and maluses" - } - }, - { - "element_type" : "panel_group", - "panel_group_element" : { - "panel_ids" : [ - "ecoscore_total" - ], - "title" : "Eco-Score for this product" - } - }, - { - "element_type" : "text", - "text_element" : { - "html" : "\n

Learn more about the Eco-Score

\n" - } - } - ], - "level" : "info", - "title_element" : { - "grade" : "a", - "icon_url" : "https://static.openfoodfacts.org/images/attributes/dist/ecoscore-a.svg", - "title" : "Eco-Score A - Very low environmental impact", - "type" : "grade" - }, - "topics" : [ - "environment" - ] - }, - "ecoscore_agribalyse" : { - "elements" : [ - { - "element_type" : "text", - "text_element" : { - "html" : "\n

Category: \n Soup, mixed vegetables, prepacked, to be reheated\n

\n \n ", + "html" : "We could not compute the Eco-Score of this product as it is missing some data, could you help complete it?", "type" : "summary" } }, { - "element_type" : "table", - "table_element" : { - "columns" : [ - { - "text" : "Stage", - "type" : "text" - }, - { - "text" : "Impact", - "type" : "percent" - } - ], - "id" : "ecoscore_lca_impacts_by_stages_table", - "rows" : [ - { - "id" : "agriculture", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/agriculture.svg", - "text" : "Agriculture" - }, - { - "percent" : 28.8334807891208, - "text" : "28.8 %" - } - ] - }, - { - "id" : "processing", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/processing.svg", - "text" : "Processing" - }, - { - "percent" : 35.987979481715, - "text" : "36.0 %" - } - ] - }, - { - "id" : "packaging", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/packaging.svg", - "text" : "Packaging" - }, - { - "percent" : 12.1231296385815, - "text" : "12.1 %" - } - ] - }, - { - "id" : "transportation", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/transportation.svg", - "text" : "Transportation" - }, - { - "percent" : 12.6472018669578, - "text" : "12.6 %" - } - ] - }, - { - "id" : "distribution", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/distribution.svg", - "text" : "Distribution" - }, - { - "percent" : 5.47647634395376, - "text" : "5.5 %" - } - ] - }, - { - "id" : "consumption", - "values" : [ - { - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/consumption.svg", - "text" : "Consumption" - }, - { - "percent" : 4.93173187967106, - "text" : "4.9 %" - } - ] - } - ], - "table_type" : "percents", - "title" : "Details of the impacts by stages of the life cycle" - } - } - ], - "level" : "info", - "title_element" : { - "grade" : "a", - "icon_color_from_evaluation" : true, - "icon_size" : "small", - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/lca.svg", - "subtitle" : "Category: Soup, mixed vegetables, prepacked, to be reheated", - "title" : "Average impact of products of the same category: A (Score: 98/100)", - "type" : "grade" - }, - "topics" : [ - "environment" - ] - }, - "ecoscore_origins_of_ingredients" : { - "elements" : [ - { - "element_type" : "text", - "text_element" : { - "html" : "\n Environmental policy: +4
\n Transportation: 0
\n ", - "type" : "default" - } - }, - { - "element_type" : "table", - "table_element" : { - "columns" : [ - { - "text" : "Origin of the product and/or its ingredients", - "type" : "text" - }, - { - "text" : "% of ingredients", - "type" : "percent" - }, - { - "text" : "Impact", - "type" : "text" - } - ], - "id" : "ecoscore_origins_of_ingredients_table", - "rows" : [ - { - "values" : [ - { - "text" : "France" - }, - { - "evaluation" : "neutral", - "percent" : 100, - "text" : "100 %" - }, - { - "evaluation" : "neutral", - "text" : "Medium" - } - ] - } - ], - "title" : "Origins of ingredients" - } - } - ], - "evaluation" : "average", - "level" : "info", - "title_element" : { - "icon_color_from_evaluation" : true, - "icon_size" : "small", - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/public.svg", - "subtitle" : "Bonus: +4", - "title" : "Origins of ingredients with a medium impact" - }, - "topics" : [ - "environment" - ] - }, - "ecoscore_packaging" : { - "elements" : [ - { - "element_type" : "table", - "table_element" : { - "columns" : [ - { - "text" : "Shape", - "type" : "text" - }, - { - "text" : "Material", - "type" : "text" - }, - { - "text" : "Recycling", - "type" : "text" - }, - { - "text" : "Impact", - "type" : "text" - } - ], - "id" : "ecoscore_packaging_components", - "rows" : [ - { - "values" : [ - { - "text" : "Bottle" - }, - { - "text" : "Glass" - }, - { - "evaluation" : "good", - "text" : "Recycle" - }, - { - "evaluation" : "good", - "text" : "Low" - } - ] - }, - { - "values" : [ - { - "text" : "Bottle cap" - }, - { - "text" : "Steel" - }, - { - "evaluation" : "good", - "text" : "Recycle" - }, - { - "evaluation" : "good", - "text" : "Low" - } - ] - } + "action_element" : { + "actions" : [ + "add_categories" ], - "title" : "Packaging parts" - } - } - ], - "evaluation" : "good", - "level" : "info", - "title_element" : { - "icon_color_from_evaluation" : true, - "icon_size" : "small", - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/packaging.svg", - "subtitle" : "Malus: -2", - "title" : "Packaging with a low impact" - }, - "topics" : [ - "environment" - ] - }, - "ecoscore_production_system" : { - "elements" : [ - { - "element_type" : "panel", - "panel_element" : { - "panel_id" : "environment_label_en:eu-organic" - } - } - ], - "evaluation" : "good", - "level" : "info", - "title_element" : { - "icon_color_from_evaluation" : true, - "icon_size" : "small", - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/agriculture.svg", - "subtitle" : "Bonus: +15", - "title" : "Labels with high environmental benefits" - }, - "topics" : [ - "environment" - ] - }, - "ecoscore_threatened_species" : { - "evaluation" : "good", - "level" : "info", - "title_element" : { - "icon_color_from_evaluation" : true, - "icon_size" : "small", - "icon_url" : "https://static.openfoodfacts.org/images/icons/dist/monkey_happy.svg", - "title" : "No ingredients that threaten species" - }, - "topics" : [ - "environment" - ] - }, - "ecoscore_total" : { - "elements" : [ - { - "element_type" : "text", - "text_element" : { - "html" : "\n Life cycle analysis score: 98
\n Sum of bonuses and maluses:\n \n +17\n

\n Final score: 115/100\n \n ", - "type" : "summary" - } + "html" : "Could you add a precise product category so that we can compute the Eco-Score?" + }, + "element_type" : "action" } ], "level" : "info", "title_element" : { - "grade" : "a", - "icon_url" : "https://static.openfoodfacts.org/images/attributes/dist/ecoscore-a.svg", - "subtitle" : "Product: A good product for you - Open Food Facts - 200 g", - "title" : "Impact for this product: A (Score: 115/100)", + "grade" : "unknown", + "icon_url" : "https://static.openfoodfacts.org/images/attributes/dist/ecoscore-unknown.svg", + "title" : "Eco-Score not computed - Unknown environmental impact", "type" : "grade" }, "topics" : [ @@ -1293,15 +666,6 @@ "panel_id" : "ecoscore" } }, - { - "element_type" : "panel_group", - "panel_group_element" : { - "panel_ids" : [ - "carbon_footprint" - ], - "title" : "Carbon footprint" - } - }, { "element_type" : "panel_group", "panel_group_element" : { @@ -1380,7 +744,8 @@ "element_type" : "panel_group", "panel_group_element" : { "panel_ids" : [ - "nutrition_facts_table" + "nutrition_facts_table", + "serving_size" ], "title" : "" } @@ -2101,10 +1466,24 @@ "text" : "Nutrition facts", "type" : "text" }, + { + "column_group_id" : "product", + "shown_by_default" : true, + "text" : "As sold
for 100 g / 100 ml", + "text_for_small_screens" : "100g", + "type" : "text" + }, + { + "column_group_id" : "product", + "shown_by_default" : false, + "text" : "As sold
per serving (100g)", + "text_for_small_screens" : "per serving", + "type" : "text" + }, { "column_group_id" : "comparisons", "shown_by_default" : true, - "text" : "Compared to: Vegetable soups", + "text" : "Compared to: Stews", "type" : "text" } ], @@ -2117,9 +1496,15 @@ "style" : "max-width:15rem", "text" : "Energy" }, + { + "text" : "120 kj
(54 kcal)" + }, + { + "text" : "120 kj
(54 kcal)" + }, { "evaluation" : "good", - "text" : "-54%" + "text" : "-72%" } ] }, @@ -2130,9 +1515,15 @@ "style" : "max-width:15rem", "text" : "Fat" }, + { + "text" : "0.5 g" + }, + { + "text" : "0.5 g" + }, { "evaluation" : "good", - "text" : "-68%" + "text" : "-87%" } ] }, @@ -2143,9 +1534,15 @@ "style" : "max-width:15rem", "text" : "Saturated fat" }, + { + "text" : "0.2 g" + }, + { + "text" : "0.2 g" + }, { "evaluation" : "good", - "text" : "-42%" + "text" : "-85%" } ] }, @@ -2156,9 +1553,15 @@ "style" : "max-width:15rem", "text" : "Salt" }, + { + "text" : "0.4 g" + }, + { + "text" : "0.4 g" + }, { "evaluation" : "good", - "text" : "-40%" + "text" : "-57%" } ] }, @@ -2170,7 +1573,13 @@ "text" : "Carbohydrates" }, { - "text" : "-63%" + "text" : "4 g" + }, + { + "text" : "4 g" + }, + { + "text" : "-65%" } ] }, @@ -2181,9 +1590,15 @@ "style" : "max-width:15rem", "text" : "Fiber" }, + { + "text" : "3 g" + }, + { + "text" : "3 g" + }, { "evaluation" : "good", - "text" : "+96%" + "text" : "+44%" } ] }, @@ -2194,9 +1609,15 @@ "style" : "max-width:15rem", "text" : "Sugars" }, + { + "text" : "0.5 g" + }, + { + "text" : "0.5 g" + }, { "evaluation" : "good", - "text" : "-83%" + "text" : "-74%" } ] }, @@ -2207,9 +1628,33 @@ "style" : "max-width:15rem", "text" : "Proteins" }, + { + "text" : "1 g" + }, + { + "text" : "1 g" + }, { "evaluation" : "bad", - "text" : "-56%" + "text" : "-81%" + } + ] + }, + { + "values" : [ + { + "level" : 0, + "style" : "max-width:15rem", + "text" : "Calcium" + }, + { + "text" : "120 mg" + }, + { + "text" : "120 mg" + }, + { + "text" : "+485%" } ] }, @@ -2220,6 +1665,12 @@ "style" : "max-width:15rem", "text" : "Fruits‚ vegetables‚ nuts and rapeseed‚ walnut and olive oils (estimate from ingredients list analysis)" }, + { + "text" : "65 %" + }, + { + "text" : "65 %" + }, { "text" : "" } @@ -2478,6 +1929,22 @@ ], "expanded" : true, "type" : "root" + }, + "serving_size" : { + "elements" : [ + { + "element_type" : "text", + "text_element" : { + "html" : "\n Serving size:\n 100g\n " + } + } + ], + "expanded" : true, + "level" : "info", + "topics" : [ + "health" + ], + "type" : "inline" } }, "labels_tags" : [ @@ -2498,27 +1965,44 @@ "sugars" : "low" }, "nutriments" : { + "calcium" : 0.12, + "calcium_100g" : 0.12, + "calcium_serving" : 0.12, + "calcium_unit" : "g", + "calcium_value" : 0.12, "carbohydrates" : 4, "carbohydrates_100g" : 4, + "carbohydrates_serving" : 4, "carbohydrates_unit" : "g", "carbohydrates_value" : 4, "carbon-footprint-from-known-ingredients_100g" : 18, "carbon-footprint-from-known-ingredients_product" : 36, + "carbon-footprint-from-known-ingredients_serving" : 18, "energy" : 120, + "energy-kcal" : 54, + "energy-kcal_100g" : 54, + "energy-kcal_serving" : 54, + "energy-kcal_unit" : "kcal", + "energy-kcal_value" : 54, + "energy-kcal_value_computed" : 30.5, "energy-kj" : 120, "energy-kj_100g" : 120, + "energy-kj_serving" : 120, "energy-kj_unit" : "kJ", "energy-kj_value" : 120, "energy-kj_value_computed" : 127.5, "energy_100g" : 120, + "energy_serving" : 120, "energy_unit" : "kJ", "energy_value" : 120, "fat" : 0.5, "fat_100g" : 0.5, + "fat_serving" : 0.5, "fat_unit" : "g", "fat_value" : 0.5, "fiber" : 3, "fiber_100g" : 3, + "fiber_serving" : 3, "fiber_unit" : "g", "fiber_value" : 3, "fruits-vegetables-legumes-estimate-from-ingredients_100g" : 65, @@ -2532,22 +2016,27 @@ "nutrition-score-fr_100g" : -4, "proteins" : 1, "proteins_100g" : 1, + "proteins_serving" : 1, "proteins_unit" : "g", "proteins_value" : 1, "salt" : 0.4, "salt_100g" : 0.4, + "salt_serving" : 0.4, "salt_unit" : "g", "salt_value" : 0.4, "saturated-fat" : 0.2, "saturated-fat_100g" : 0.2, + "saturated-fat_serving" : 0.2, "saturated-fat_unit" : "g", "saturated-fat_value" : 0.2, "sodium" : 0.16, "sodium_100g" : 0.16, + "sodium_serving" : 0.16, "sodium_unit" : "g", "sodium_value" : 0.16, "sugars" : 0.5, "sugars_100g" : 0.5, + "sugars_serving" : 0.5, "sugars_unit" : "g", "sugars_value" : 0.5 }, @@ -2555,6 +2044,7 @@ "product_name" : "A good product for you", "product_quantity" : "200", "quantity" : "200 g", + "serving_size" : "100g", "states_tags" : [ "en:to-be-completed", "en:nutrition-facts-completed",