-
-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
popup ingredient details in typeahead suggestions and recently used #613
Conversation
yes, ideally we would query the regular ingredient API, then we would have access to all fields and could decide what to show |
Just tested this, I like it! However, I am always getting a render flex overflow error here (it seems only the first time?). I would also remove the g-per-body-kg column, that's only useful for the whole plan |
blocked on wger-project/wger#1713 |
have updated the test and the production server |
4b85867
to
cd7d291
Compare
cd7d291
to
a6cd87c
Compare
a6cd87c
to
c11dede
Compare
c11dede
to
1ae3f33
Compare
9df2425
to
62e1bc0
Compare
ingredient details dialog: - give it close/continue buttons to load into selection - always use image property from loaded ingredient this is a bit slower, but: * more consistent (no need to support absolute vs relative URL's separately) * cleaner (no need to pass it thru explicitly) * more future proof: we will get rid of the dedicated /ingredient/search endpoint which gives us images before we load the full ingredient. in the future we will simply load the ingredients, completely, all at once. * allows for easier code reuse with barcode scan result dialog barcode scan result dialog: - show image and detailed nutrition table - support a loading spinner - simplify error handling - deduplicate code between found & not found - share code with ingredient details dialog
62e1bc0
to
dc1f220
Compare
@@ -353,7 +353,7 @@ class IngredientFormState extends State<IngredientForm> { | |||
child: Column( | |||
children: [ | |||
Text( | |||
'Macros preview', | |||
'Macros preview', // TODO fix l10n |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l10n :)
), | ||
), | ||
if (snapshot.hasData && ingredient!.licenseObjectURl == null) | ||
Text('Source: ${source!}'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l10n
), | ||
), | ||
if (ingredient != null && ingredient.licenseObjectURl == null) | ||
Text('Source: ${source!}'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l10n
unfortunately, we only get the image when getting suggestions. not when using the ingredients API or when browsing recently used ingredients. this would be a nice thing to add to the backend @rolandgeider :) i also think a link to the "upstream source" could be nice. (e.g. to OFF or USDA if applicable)