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
853 stars 282 forks source link

Check that the app behaves correctly for Eco-Score in unsupported countries #1822

Open teolemon opened 2 years ago

teolemon commented 2 years ago

What

Part of

monsieurtanuki commented 2 years ago

Check that the app behaves correctly for Eco-Score in unsupported countries

@teolemon

  1. What is a correct behavior? Not displaying ecoscore in preferences and not taking it into account in the match algorithm?
  2. Which are the countries were ecoscore is supported / not supported? In case this list is not available from the server we can manage a hard-coded list in smoothie, that we update with new releases.
monsieurtanuki commented 2 years ago

@teolemon I can start that today if you answer my previous questions.

teolemon commented 2 years ago

@monsieurtanuki I might be misguided on this one, and it's not really blocking (I updated the status accordingly), let me do some exploration and documentation first.

monsieurtanuki commented 2 years ago

@teolemon Ok then. But please note that it's more than a nice-to-have, as even us developers had to struggle with systematic "unknown compatibility" due to ecoscore being set to important by default while not being computed on some countries. Has it changed since the latest algorithm? I don't know. Btw there's also an ecoscore icon on the second onboarding page.

teolemon commented 2 years ago
monsieurtanuki commented 2 years ago

@teolemon The default attributes depend on language, not country. Besides, it may not have the side effect I assume you expect.

My suggestion in a first approach: hard-code in Smoothie a list of countries that include ecoscore, and never show ecoscore in Smoothie for countries that are not in that list.