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
787 stars 271 forks source link

Add ability to sort 'manually' #3372

Open thibaultmol opened 1 year ago

thibaultmol commented 1 year ago

Problem

Currently in the app you can only sort by your recommendations you've set. But I would like to sometimes just select the one with the lowest kcal and go from there.

Proposed solution

Add an ability to override de 'recommendation' algorithm and just manually sort by specific values. like kcal.

Part of

monsieurtanuki commented 1 year ago

@thibaultmol I understand the general idea. I see for nutrients, but are you also thinking about other data?

thibaultmol commented 1 year ago

I guess it's mainly for nutrients data yeah

monsieurtanuki commented 1 year ago

Setting nutrients to sort on (ascending or descending) shouldn't be a problem. The display should be discussed, because I presume you want to see the values, and that may mean a totally different page (like a table), especially if you want several nutrients at the same time.

In addition to that, that's a bit in contradiction with "our" scores, like Nutriscore.

Could you please give a real-life example of what you'd like to achieve? E.g., "my scanned yoghurts sorted by descending proteins"

thibaultmol commented 1 year ago

Basically one of the things I wanted to do was scan all the things you'd consider 'snacks' in my local supermarket and then sort by kcal. See what's the lowest. And then look at the top 10 of those what their other nutriant values are. for example

monsieurtanuki commented 1 year ago

That would mean ordering by only one nutrient, and then you click on each "top 10" product for more details, right? In that case do you need the value in nutrient in the list, or just ordered products you can click on is enough?

thibaultmol commented 1 year ago

I guess both? Being able to see what the actual value is that it's sort on, on the item itself while in the list view would be nice. Cause it might jump from 50 to 150 all of a sudden but they're right next to each other. So I might just cut off the list before it jumps to a much bigger value.