-
-
Notifications
You must be signed in to change notification settings - Fork 67
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: 995 - support of the new "product type" filter for "get product" #1004
Conversation
New file: * `product_type_filter.dart`: Filter on product type for API get product queries. Impacted files * `api_not_food_get_product_test.dart`: now testing only in v3 with all product type filters * `old_product_result.dart`: deprecated class `OldProductResult` * `open_food_api_client.dart`: deprecated method `getOldProduct` * `openfoodfacts.dart`: export new file `product_type_filter.dart` * `product_query_configurations.dart`: "product_type_filter" as new optional "get product" parameter; minor refactoring
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1004 +/- ##
==========================================
- Coverage 76.34% 75.75% -0.60%
==========================================
Files 239 252 +13
Lines 8494 9436 +942
==========================================
+ Hits 6485 7148 +663
- Misses 2009 2288 +279 ☔ View full report in Codecov by Sentry. |
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.
Just one minor comment
ProductTypeFilter(final ProductType productType) | ||
: offTag = productType.offTag; | ||
|
||
static const all = ProductTypeFilter._('all'); |
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.
I think you've missed the type here
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.
Indeed. Strange the lint check didn't send a warning.
I'll fix that.
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.
LGTM 👌
Thank you!
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.
LGTM 👌
Thank you!
Thank you @g123k for your review! |
What
Fixes bug(s)
Files
New file:
product_type_filter.dart
: Filter on product type for API get product queries.Impacted files
api_not_food_get_product_test.dart
: now testing only in v3 with all product type filtersold_product_result.dart
: deprecated classOldProductResult
open_food_api_client.dart
: deprecated methodgetOldProduct
openfoodfacts.dart
: export new fileproduct_type_filter.dart
product_query_configurations.dart
: "product_type_filter" as new optional "get product" parameter; minor refactoring