openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
855 stars 283 forks source link

Refine FastTrack behavior on edge cases #4595

Open teolemon opened 1 year ago

teolemon commented 1 year ago

What

Which products

Alcohol

1. Unprocessed products that comprise a single ingredient or category of ingredients (such as fresh
fruits or vegetables, cut raw meat, honey, etc.)
2. Processed products where the only processing they have been subjected to is maturing and that
comprise a single ingredient or category of ingredients Note: here the products in question are mainly
meat products
3. Waters intended for human consumption, including those where the only added ingredients are
carbon dioxide and/or flavourings
4. Herbs, spices or mixtures thereof
5. Salt and salt substitutes
6. Table top sweeteners
7. Products covered by Directive 1999/4/EC of the European Parliament and of the Council of 22
February 1999 relating to coffee extracts and chicory extracts, whole or milled coffee beans, and
whole or milled decaffeinated coffee beans
8. Herbal and fruit infusions, tea, decaffeinated tea, instant or soluble tea or tea extract, decaffeinated
instant or soluble tea or tea extract, which do not contain other added ingredients than flavourings
which do not modify the nutritional value of the tea
9. Fermented vinegars and substitutes for vinegar, including those where the only added ingredients
are flavourings
10. Flavourings
11. Food additives
12. Processing aids
13. Food enzymes
14. Gelatine
15. Jam setting compounds
16. Yeasts
17. Chewing gums
18. Food in packaging or containers the largest surface of which has an area of less than 25 cm²
19. Food, including handcrafted food, directly supplied by the manufacturer of small quantities of
products to the final consumer or to local retail establishments directly supplying the final consumer

Part of

Screenshot/Mockup/Before-After

image

monsieurtanuki commented 1 year ago

@teolemon Perhaps we could just let the server tell us something like "nutriscore: not applicable for that category" (we already know that), detect that and not display the fast-track in those cases.

monsieurtanuki commented 1 year ago

@teolemon That goes even beyond the fast track button: looks what happens if you click on a "not applicable nutriscore" button... There's a discrepancy between the nutriscore as an attribute (nutriscore-not-applicable) and the knowledge panel ("actions":["add_nutrition_facts"]) => server fix needed

A possible solution at the Smoothie level would be to make the nutriscore button not clickable (and have no forward arrow) if the nutriscore is "not applicable", but that would prevent users from getting info about why the nutriscore is not applicable (the explanation is not available from the server anyway for the moment).

product page nutriscore page
Screenshot_2023-08-25-12-45-47 Screenshot_2023-08-25-12-45-53
monsieurtanuki commented 1 year ago

What is implemented in #4599: we don't display the fast-track button if the nutriscore or the ecoscore are computed as "not applicable" by the server.

Are there be other typical cases to take care of beyond those "not applicable" scores?

teolemon commented 1 year ago