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

Solutions to reduce the perceived waiting time to save a contribution #2342

Closed monsieurtanuki closed 2 years ago

monsieurtanuki commented 2 years ago

Problem

Each time we want to change a value, we see a dialog and we wait. We wait longer for picture updates: the files are bigger. That may break the momentum of the end-user.

Proposed solutions

  1. We could run all the server changes as background tasks. It would be smooth and elegant, but perhaps frustrating because the computed fields like score would not be refreshed until all the changes are done, and that means (temporarily) incoherent data. But that mean we could fully operate offline and make changes regardless of the network.
  2. We could gather the changes in one obvious operation. For instance, a dialog only once we exit the "edit product page", instead of when we exit "edit category" then "edit label" then "edit stores" then "edit nutrients".
  3. Another solution mentioned in #2337 is to gather the UIs, e.g. on the same page "edit category", "edit label", "edit stores" and "edit nutrients"
  4. Maybe a mix - background tasks for pictures and gathering changes for the texts

Additional context

It's not going to be trivial, but it should be exhilarating. (intellectually I mean)

Part of

teolemon commented 2 years ago
monsieurtanuki commented 2 years ago

@teolemon Thank you for your comments.

Of course we'll need to batch the changes if there's no network. The alternate solution is to forbid the offline changes. Perhaps we could compute the score inside smoothie, as an "approximated score"?

Regarding UI, what about this? Capture d’écran 2022-06-21 à 13 13 43

teolemon commented 2 years ago

The issues mentioned above are mostly fixed and some were broken into individual issues. Closing