Skip to content

Conversation

@Dieterbe
Copy link
Contributor

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)

@Dieterbe Dieterbe marked this pull request as draft June 20, 2024 16:21
@Dieterbe Dieterbe marked this pull request as ready for review June 20, 2024 16:38
@Dieterbe Dieterbe requested a review from rolandgeider June 20, 2024 16:40
@rolandgeider
Copy link
Member

yes, ideally we would query the regular ingredient API, then we would have access to all fields and could decide what to show

@rolandgeider
Copy link
Member

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

@Dieterbe
Copy link
Contributor Author

Dieterbe commented Jul 4, 2024

@rolandgeider
Copy link
Member

blocked on wger-project/wger#1713

have updated the test and the production server

@Dieterbe Dieterbe force-pushed the ingredient-details branch from 4b85867 to cd7d291 Compare July 11, 2024 18:20
@Dieterbe Dieterbe force-pushed the ingredient-details branch from cd7d291 to a6cd87c Compare July 12, 2024 08:10
@Dieterbe Dieterbe force-pushed the ingredient-details branch from a6cd87c to c11dede Compare July 12, 2024 11:11
@Dieterbe Dieterbe force-pushed the ingredient-details branch from c11dede to 1ae3f33 Compare July 12, 2024 11:26
@Dieterbe Dieterbe force-pushed the ingredient-details branch from 9df2425 to 62e1bc0 Compare July 12, 2024 16:38
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
@Dieterbe Dieterbe force-pushed the ingredient-details branch from 62e1bc0 to dc1f220 Compare July 16, 2024 08:34
children: [
Text(
'Macros preview',
'Macros preview', // TODO fix l10n
Copy link
Member

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!}'),
Copy link
Member

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!}'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l10n

@Dieterbe Dieterbe merged commit 11a7c30 into master Jul 18, 2024
@Dieterbe Dieterbe deleted the ingredient-details branch July 18, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants