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

Ingredients and Stores cannot be presented in a list #5887

Open AdrienMDevMobile opened 2 days ago

AdrienMDevMobile commented 2 days ago

This issue is blocking https://github.com/openfoodfacts/smooth-app/issues/5814 Ideally, to present values in a list of elements, the values need to be given to the app in a list.

That is not the case for Ingredients and stores.The list values IngredientsTagsInLanguage and storeTagsInLanguage are null. The list of ingredients and stores are found in a single String This can be found in the nutella page, but also this butter and this juice : https://world.openfoodfacts.org/product/3451790988677/le-beurre-tendre-doux-elle-vire https://world.openfoodfacts.org/product/3254691586054/le-bio-pour-toute-la-famille-multifruit-pressade

Here are two solutions : correct the serverside answer to give the elements in a listvalue in the request. or : adapt the code of the rawdata list to have the Strings be broken down into a list.

Solution 2 is the easiest to do, but will create technical dept.

teolemon commented 1 day ago
teolemon commented 1 day ago

Returns empty: https://world.openfoodfacts.org/api/v2/taxonomy?type=labels&tags=en:organic,en:fair-trade&fields=name,description,children&include_children=1&lc=en,fr