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

Add a lists/history Widget for homescreen #3108

Open teolemon opened 1 year ago

teolemon commented 1 year ago

What

ashishmohapatra240 commented 1 year ago

Hey! I want to work on this issue!

AshAman999 commented 1 year ago

Sure Ashish, give it a try, if you need any help, feel free to ask

ashishmohapatra240 commented 1 year ago

Thank you! @AshAman999

M123-dev commented 1 year ago

That's a great feature, but I guess this will raise some difficulties @ashishmohapatra240 as we store the lists in sqflite which AFAIK needs to be startet by the app, so some trouble with background tasks.

But @AshAman999 & g123k are likely more up-to-date on this topic.

ashishmohapatra240 commented 1 year ago

Hey, can you help me with the approach? I am facing some difficulties

M123-dev commented 1 year ago

Asking the question is always more efficient than asking to ask 😉

g123k commented 1 year ago

Honestly, forget the Flutter package and develop an implementation for each platform. But if that's the first time you're doing that, please give the issue to someone else. Creating a Widget (for both platforms) is not that simple to implement.

ashishmohapatra240 commented 1 year ago

Yes, this is the first time I'm doing this, Please assign this to someone else! I'll be following up though 😁

Let me find some good first issues ✨

anshpathania7 commented 1 year ago

Hey, If this issue is free. Can I look into this? Also, Can you or anyone else test the ios implementation when I'm done? @g123k

AshAman999 commented 1 year ago

Hey, If this issue is free. Can I look into this? Also, Can you or anyone else test the ios implementation when I'm done? @g123k

You can work on this one ,

About testing on iOS I believe Eduoard can help you test that, once the pr is up

anshpathania7 commented 1 year ago

@AshAman999 What exactly list widget is supposed to show and For history, recently searched items are to be shown?

AshAman999 commented 1 year ago

@anshpathania7

I believe it's only history screen for now, perhaps @teolemon would be the right person to ask for it

anshpathania7 commented 1 year ago

@teolemon

I tried implementing this from scratch (only in Android). So Far Added a listview with Image and Texts. Is there any design document for this widget? and What data needs to be shown?

Screenshots/Recordings

https://user-images.githubusercontent.com/55742309/201211220-7e7e5af6-e2fc-4f2e-9327-4b3e336c44ca.mp4

g123k commented 1 year ago

Could you elaborate a little more @anshpathania7 on what you achieve?

anshpathania7 commented 1 year ago
  • Did you use the XML way of generating the Widget or with Jetpack Compose?

I used XML for widgets

  • How did you export the data between the Dart code and the Flutter's one?

I haven't implemented this directly in openfoodfacts , instead I created another application for this. So, I added data manually to flutter side and then I pass the list by MethodChannel and then parse it on kotlin.

  • How do you open the correct product page? knowing that we don't support (yet) any named route?

I haven't implemented click handler for widget yet.

g123k commented 1 year ago
  • Did you use the XML way of generating the Widget or with Jetpack Compose?

I used XML for widgets

  • How did you export the data between the Dart code and the Flutter's one?

I haven't implemented this directly in openfoodfacts , instead I created another application for this. So, I added data manually to flutter side and then I pass the list by MethodChannel and then parse it on kotlin.

  • How do you open the correct product page? knowing that we don't support (yet) any named route?

I haven't implemented click handler for widget yet.

Ok, so I will make a comparizon: you're trying to build a car, without knowing its design, nor the way the engine works. If I were you, I would wait a bit

anshpathania7 commented 1 year ago

@g123k yup, that's why I built it in completely different application just to test out how the implementation is done from scratch. Definitely I'll wait :))