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
863 stars 286 forks source link

Defragment the history/list experience #4041

Open teolemon opened 1 year ago

teolemon commented 1 year ago

What

### Tasks
- [ ] Add "Shopping list", "Product I bought" default lists
- [ ] https://github.com/openfoodfacts/smooth-app/pull/4447
- [ ] https://github.com/openfoodfacts/smooth-app/issues/4424
- [ ] https://github.com/openfoodfacts/smooth-app/pull/4435
- [ ] https://github.com/openfoodfacts/smooth-app/issues/3959
- [ ] https://github.com/openfoodfacts/smooth-app/issues/3830
- [ ] https://github.com/openfoodfacts/smooth-app/issues/3373
- [ ] https://github.com/openfoodfacts/smooth-app/issues/2627
- [ ] https://github.com/openfoodfacts/smooth-app/issues/4062
- [ ] ![image](https://github.com/openfoodfacts/smooth-app/assets/1689815/f942c3ae-5328-45fd-a39b-fd4c6cf6ad32)
- [ ] ![image](https://github.com/openfoodfacts/smooth-app/assets/1689815/f942c3ae-5328-45fd-a39b-fd4c6cf6ad32)
- [ ] Allow to create a new list from the add to list menu (per PlayStore feedback)

References

What do you think ?

monsieurtanuki commented 1 year ago

@teolemon If we change "History" into "Lists", we could have a "more ..." button on the app bar where you would list the lists (haha), and eventually provide admin actions (e.g. create list).

Something like:

(app bar) Product history (...)

monsieurtanuki commented 1 year ago
@teolemon It would look like this: "more" button expanded menu
Screenshot_2023-07-06-08-23-06 Screenshot_2023-07-06-08-23-15
monsieurtanuki commented 1 year ago

@g123k I have a good news and a bad news.

The good news is that we can retrieve the list of user lists without async, so adding the user lists to the current page is not a problem.

The bad news is that the solution you recommended (SmoothModalSheet) is not adapted for long lists (by "long" I mean more than 3, at least on my smartphone), as you can see: Screenshot_2023-07-12-19-37-24 I use Column. Perhaps a ListView would do the trick, but there's always that tap dancing about computing the size. Anyway, we would have half a screen (as in a modal bottom sheet) and would have to scroll in that half screen. Not very nice, UX-wise. A solution could be to swap the app bar buttons:

g123k commented 1 year ago

For your UI question, I have checked what Google Maps/Apple Plan do and they have a bottom sheet, with an inner scroll. If necessary I can implement it, but basically, you take half of the screen, when you scroll up, the modal take the full width and then you scroll within the content.

Here is what it could look like:

Collapsed: iPhone 13 Pro Max 2 2

Expanded: iPhone 13 Pro Max 2

This is what I would like to implement for KP

(An improvement could be to "star" a list, and then it will be on top of it)

monsieurtanuki commented 1 year ago

I would like to see a "Shopping list", "Product I bought" default lists

@teolemon Are you talking about "system" lists (unremovable and unrenamable like "history") or just 2 user lists that we build by default? The "system" lists would be much easier to implement, especially for localization reasons.

teolemon commented 1 year ago
monsieurtanuki commented 1 year ago

@teolemon Ok to create two "system" lists (unremovable and unrenamable like "history") for "Shopping list" and "Products I bought".

For "Shopping list" in the real world there are numbers of items too, like what we coded about 2 years ago (including "pantry" lists). I'm afraid that could cause confusion to display a shopping list without the number of items.

teolemon commented 1 year ago

image

monsieurtanuki commented 1 year ago

@teolemon What about the number of products? That would be expected of a shopping list or a picnic. We could start with "my favorite foods" (with a fast-track "heart" icon to add any product), and with "products I bought". In both cases no number of products is required/expected.

teolemon commented 1 year ago
g123k commented 1 year ago

If we want a simple solution, we should embed a gallery of icons and let users choose one per list. Way easier than trying to guess what's behind a name

EDIT: I'm sorry, I'm off topic

teolemon commented 1 year ago

@monsieurtanuki is talking quantities

teolemon commented 1 year ago

For the scanning part, I used Simply Stock today, and I found their system with + - and a dropdown quite convenient. It could be a dedicated "Stock mode" for the scanner. Eg. NOT activated by default @monsieurtanuki @g123k

monsieurtanuki commented 1 year ago

For the scanning part, I used Simply Stock today, and I found their system with + - and a dropdown quite convenient. It could be a dedicated "Stock mode" for the scanner.

@teolemon Regardless of the "stock +1/-1" feature, it could be very cool to be able to