-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
fix: 5570 - no nutriscore/ecoscore for non-food products #5629
fix: 5570 - no nutriscore/ecoscore for non-food products #5629
Conversation
Impacted files: * `product_incomplete_card.dart`: minor padding fix * `smooth_product_card_found.dart`: no display of "incomplete product button" for non-food products
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5629 +/- ##
==========================================
- Coverage 9.54% 6.89% -2.66%
==========================================
Files 325 402 +77
Lines 16411 21263 +4852
==========================================
- Hits 1567 1466 -101
- Misses 14844 19797 +4953 ☔ View full report in Codecov by Sentry. |
@@ -21,6 +21,10 @@ class ProductIncompleteCard extends StatelessWidget { | |||
final bool isLoggedInMandatory; | |||
|
|||
static bool isProductIncomplete(final Product product) { | |||
if (product.productType != null && |
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.
the name doesn't completely reflect what's actually going on
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.
the name doesn't completely reflect what's actually going on
You're right. The thing is that we display the "hey your product is incomplete" message only when the product is incomplete, for food products, therefore isProductIncomplete
made sense.
I've just added an "if not food, consider as complete" test.
I can rename the method to isIncompleteFoodProduct
: would that be OK with you?
Thank you @teolemon for your review! |
What
Screenshots
Sorry about the screenshot sizes, I happened to be working on a tablet emulator.
Fake product names for real OxF examples: only the food product has ecoscore and nutriscore
Fixes bug(s)
Impacted files
product_incomplete_card.dart
: minor padding fixsmooth_product_card_found.dart
: no display of "incomplete product button" for non-food products