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

Add seamless loading of additional questions in Hunger Games #3317

Open teolemon opened 1 year ago

teolemon commented 1 year ago

Problem

Part of

Adiii1436 commented 1 year ago

I want to work on this issue. Please assign this to me. Can you tell me where is hunger games section in the app?

AshAman999 commented 1 year ago

Hello @Adiii1436

If you mean where in app then:

Activate dev mode first by going into Profile then Contribute then Software Development and toggle on the dev mode

Then go into the dev mode menu that now appeared in the profile menu and tggle on the Activate hunger game.

After that u can see the hunger game menu in Contribute Section

The related files are at packages/smooth_app/lib/pages/hunger_games

Akashsri3bi commented 1 year ago

@teolemon @AshAman999 Please Assign , But before that I have a proposed solution if you like it .

M123-dev commented 1 year ago

What We can do is that its not necessary to show dialog for saving answer each time specially if someone is skipping the question

That is a good idea why would be. But just to make sure @raphael0202 there is no added value of saving "skipped" is there?

Load next question meanwhile in background answers can be saved .

I would go a even harder approach, something similar as we have in the search page. We shouldn't have any loading time.

The question 4,5 and 6 should be already loaded while I am answering 1,2 and 3. There should be as little loading time as possible

Third if in case user wants to change response to the question I think a back button or maybe slider to go back to previous question could be fine( Not very imp though) .

Good core idea, but I don't think there is a way to revert a response if it was already sent to the server

Akashsri3bi commented 1 year ago

What We can do is that its not necessary to show dialog for saving answer each time specially if someone is skipping the question

That is a good idea why would be. But just to make sure @raphael0202 there is no added value of saving "skipped" is there?

Load next question meanwhile in background answers can be saved .

I would go a even harder approach, something similar as we have in the search page. We shouldn't have any loading time.

The question 4,5 and 6 should be already loaded while I am answering 1,2 and 3. There should be as little loading time as possible

Third if in case user wants to change response to the question I think a back button or maybe slider to go back to previous question could be fine( Not very imp though) .

Good core idea, but I don't think there is a way to revert a response if it was already sent to the server

That's Great , So what would you propose in short what changes can be done that would be effective

M123-dev commented 1 year ago

My recommendation would be to download the next questions while the first 3 are answered. There should be as little loading time as possible.


If you open the hunger games page, the first 3 (questions number: 1,2,3) questions are loaded.

While the users answers them we load the next 3 (4,5,6).

When the questions number 1,2,3 are finished we can display 4,5,6 without needing to load new ones.


It like YT shorts, Instagram Reels, TikTok. The next few videos are loading before you see them

Akashsri3bi commented 1 year ago

My recommendation would be to download the next questions while the first 3 are answered. There should be as little loading time as possible.

If you open the hunger games page, the first 3 (questions number: 1,2,3) questions are loaded.

While the users answers them we load the next 3 (4,5,6).

When the questions number 1,2,3 are finished we can display 4,5,6 without needing to load new ones.

It like YT shorts, Instagram Reels, TikTok. The next few videos are loading before you see them

Hmm , Looks a Little complex will try to do it

raphael0202 commented 1 year ago

That is a good idea why would be. But just to make sure @raphael0202 there is no added value of saving "skipped" is there?

What do you mean by "saving"? Send the annotation to Robotoff? If yes, you should send it indeed as this way we're not going to return this skipped question next time the user goes on the product page.