Skip to content
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

feat: #1377 - reextract ingredients #1644

Merged

Conversation

cli1005
Copy link
Contributor

@cli1005 cli1005 commented Apr 25, 2022

What

It should be possible to extract ingredients without taking a new photo
More details : #1377 (comment)

Screenshot

simulator-screen-recording-iphone-13-2022-04-25-at-163838_xiv1Anxx.mp4

Fixes bug(s)

Part of

@cli1005 cli1005 requested a review from a team as a code owner April 25, 2022 14:56
@codecov-commenter
Copy link

Codecov Report

Merging #1644 (b9b1efa) into develop (2ea0da3) will decrease coverage by 0.19%.
The diff coverage is 1.04%.

@@            Coverage Diff             @@
##           develop   #1644      +/-   ##
==========================================
- Coverage     8.86%   8.66%   -0.20%     
==========================================
  Files          161     164       +3     
  Lines         6623    6829     +206     
==========================================
+ Hits           587     592       +5     
- Misses        6036    6237     +201     
Impacted Files Coverage Δ
...h_app/lib/cards/category_cards/abstract_cache.dart 0.00% <0.00%> (ø)
...p/lib/cards/category_cards/asset_cache_helper.dart 0.00% <0.00%> (ø)
...p/lib/cards/category_cards/raster_async_asset.dart 0.00% <0.00%> (ø)
...oth_app/lib/cards/category_cards/raster_cache.dart 0.00% <0.00%> (ø)
..._app/lib/cards/category_cards/svg_async_asset.dart 0.00% <0.00%> (ø)
...smooth_app/lib/cards/category_cards/svg_cache.dart 0.00% <0.00%> (ø)
...t_cards/knowledge_panels/knowledge_panel_card.dart 0.00% <0.00%> (ø)
...s/product_cards/smooth_product_card_not_found.dart 0.00% <0.00%> (ø)
.../smooth_app/lib/data_models/onboarding_loader.dart 0.00% <ø> (ø)
...mooth_app/lib/data_models/product_query_model.dart 1.38% <ø> (ø)
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3a02d1...b9b1efa. Read the comment docs.

@teolemon
Copy link
Member

It looks great 👍 @cli1005
I would add a little space between the field and the text, and possible curve the top of the card (if possible, not a big deal)
image

@teolemon
Copy link
Member

@g123k @M123-dev @monsieurtanuki does that look good to you ?

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

@teolemon I've already commented this PR (or I have and have forgotten to click on the "submit review" button):

  • some minor formatting comments
  • not fan of "we call the server but there's no progress display or cancel button"
  • not fan of "we don't care if the server call failed"

Beyond that, this is not an area of the app where I've spent a lot of time, therefore I don't fully understand the functional purpose - but that looks rather good.

Comment on lines 315 to 316
await onSubmitField();
Navigator.pop(context, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same behavior if onSubmitField crashes or not? pop(true)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

onSubmitField shows an error message to the user in a SnackBar in case of failure. I will remove the return value to prevent confusion

@cli1005
Copy link
Contributor Author

cli1005 commented Apr 27, 2022

It looks great 👍 @cli1005 I would add a little space between the field and the text, and possible curve the top of the card (if possible, not a big deal) image


Simulator Screen Shot - iPhone 13 - 2022-04-27 at 11 45 57

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Thank you @cli1005, LGTM!

@cli1005 cli1005 merged commit a88ac6d into openfoodfacts:develop Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

It should be possible to extract ingredients without taking a new photo
4 participants