Open teolemon opened 3 years ago
@monsieurtanuki would you take on Nutrition ?
I'm afraid not, I cannot use the camera. The camera is the main item here, isn't it? If it's not, I can work on the input of a nutrient list, and someone else would do the camera side later. Tell me if that makes sense.
No, the photo here is an existing nutrition photo. The layout is immersive and scrollable to make it easy to improve nutrition. The photo retaking is for a later iteration.
So it's really the input of the nutrients list, with a fancy layout. We can start simpler.
But to be clear it's a big chew:
OK, I'll do it step by step.
@teolemon How are we supposed to open that page? From product page I guess, but where should one click?
Now I have a similar problem as with the Android app: I don't know the meaning of the fields, as the meaning is only displayed as a hint:
We need to find the equivalent of the library we used
@monsieurtanuki wouldn't the second one do the trick ? https://docs.flutter.dev/cookbook/forms/text-input
Also: https://stackoverflow.com/questions/49577781/how-to-create-number-input-field-in-flutter
@teolemon Indeed:
@teolemon Still some questions/remarks:
Weird spinner on opening the view
Already mentioned by @M123-dev in the code review.
My answer was:
perfect, sorry for my inattention 😅
"Modifiers <>=" - you pass the modifier directly in the value (concatenate)
Maybe that's possible on the server side, but that's not possible for the moment in off-dart:
double? vitaminB12Serving
double? vitaminB12;
Unit? vitaminB12Unit;
Default units should be exposed by the dart package normally
I'm afraid not.
https://world.openfoodfacts.org/cgi/nutrients.pl does not have it, but https://static.openfoodfacts.org/data/taxonomies/nutrients.json does
@teolemon In the mockup, at the bottom, there are two buttons in a fixed bar: cancel and save. Sounds reasonable.
I'll raise the issue with Tim and Gao today.
Ask them too about question 1, because I don't think there's a single page in the app without the bottom navigation bar (and I don't know technically how to get rid of it for some pages - @jasmeet0817 any idea about that?)
Actually we're talking about 3 bottom bars: cancel/save, add nutrient, and navigation.
@teolemon That portion/100g switch is not intuitive at all. What about this?
That would look similar to
I'll raise the issue with Tim and Gao today.
Ask them too about question 1, because I don't think there's a single page in the app without the bottom navigation bar (and I don't know technically how to get rid of it for some pages - @jasmeet0817 any idea about that?)
That's gonna be difficult. I can try and find a solution, if needed. For now, I think it's best to always have the navigation bar though.
Actually we're talking about 3 bottom bars: cancel/save, add nutrient, and navigation.
I'll raise the issue with Tim and Gao today.
Ask them too about question 1, because I don't think there's a single page in the app without the bottom navigation bar (and I don't know technically how to get rid of it for some pages - @jasmeet0817 any idea about that?)
Actually we're talking about 3 bottom bars: cancel/save, add nutrient, and navigation.
I'll raise the issue with Tim and Gao today.
Ask them too about question 1, because I don't think there's a single page in the app without the bottom navigation bar (and I don't know technically how to get rid of it for some pages - @jasmeet0817 any idea about that?)
That's gonna be very difficult. I can try and find a solution, if needed. For now, I think it's best to always have the navigation bar though.
Actually we're talking about 3 bottom bars: cancel/save, add nutrient, and navigation.
I'll raise the issue with Tim and Gao today.
Ask them too about question 1, because I don't think there's a single page in the app without the bottom navigation bar (and I don't know technically how to get rid of it for some pages - @jasmeet0817 any idea about that?) Actually we're talking about 3 bottom bars: cancel/save, add nutrient, and navigation.
Closed by mistake
@monsieurtanuki so:
Thank you @teolemon for your answers. My remarks:
ListView
ListView
and will be scrolled like the rest, right? Looks similar to SliverAppBarPageManager
know not to display the BottomNavigationBar
. This could be done with a context variable that PageManager
watches.
@teolemon This is what you suggested, and I still think the UX is confusing - "when I hit the 'save' button, what is going to be saved, the 100g or the serving?":
The 2 columns thing was really seen as confusing. We already have the same thing in production, albeit radio buttons in lieu toggles, and users and getting it fine. Let's merge as is and gather feedback. Theoretically, there are some products with 2 different nutrition tables, some with a 3rd and 4th columns for dilutions, but we're trying to have something simple for now.
The 2 columns thing was really seen as confusing. We already have the same thing in production, albeit radio buttons in lieu toggles, and users and getting it fine.
Of course it's better to see just one column. The problem is in the switch. Today's suggestion:
Let's merge as is and gather feedback.
I guess it should be reviewed first. And #910 has the 2 columns.
But there's something not working 100% with the call to saveProduct
, a bit risky to run that in PROD. I should patch it the code if the purpose for the moment is just the UX/UI.
Anyway I was hoping that there was another way to update just the nutrition facts, not the whole product. Is there?
Today's suggestion (screenshots):
Mhhh I understand the thoughts behind the button to the next page where it can be added per portion but I think it's rather confusing and maybe looks like you have to add both for 100g and per portion, what about two radio buttons in a row
Mhhh I understand the thoughts behind the button to the next page where it can be added per portion but I think it's rather confusing and maybe looks like you have to add both for 100g and per portion
Maybe if we put it at the bottom of the page, like "Advanced: nutrition facts per portion"?
what about two radio buttons in a row
That would be similar to the Switch
.
I don't know how it is labeled on products, does every product has both
Also can we generate the product data
5g sugar per 100g; portion=50g so 2,5g sugar per portion. If so it doesn't make sense to put it at the bottom
@M123-dev Indeed, that could be a solution:
I mean, it's not because we have the possibility to enter that many data that it makes sense the ask the end-user to do so, especially:
Who for
What
Mockup
Code pointers
Why
Design doc
Part of