-
-
Notifications
You must be signed in to change notification settings - Fork 285
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: 5430 - "producer provided" icon for nutrients and 4 product fields #5777
feat: 5430 - "producer provided" icon for nutrients and 4 product fields #5777
Conversation
Impacted files: * `add_basic_details_page.dart`: display "producer provided" icon for name, brands and quantity * `nutrition_page_loaded.dart`: display "producer provided" icon for serving size and each individual nutrient * `product_query.dart`: set the icon to display when a product field value is "producer provided" * `smooth_autocomplete_text_field.dart`: added parameter `suffixIcon` * `smooth_text_form_field.dart`: added parameter `suffixIcon`
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5777 +/- ##
==========================================
- Coverage 9.54% 7.02% -2.53%
==========================================
Files 325 415 +90
Lines 16411 22752 +6341
==========================================
+ Hits 1567 1599 +32
- Misses 14844 21153 +6309 ☔ 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.
We should probably make the icon clickable with a possibility to understand what it's about and possibly to complain or email/file a ticket on Nutri-Patrol if they believe there's a data mistake.
@teolemon Makes almost sense. What could be done instead from the current PR is adding an expandable line (e.g. a |
sounds reasonable |
New file: * `owner_field_info.dart`: Standard info tile about "owner fields". Impacted files: * `add_basic_details_page.dart`: now displaying `OwnerFieldInfo` if relevant; minor refactoring * `nutrition_page_loaded.dart`: now displaying `OwnerFieldInfo` if relevant; minor refactoring * `product_query.dart`: moved field to new file `owner_field_info.dart`
@teolemon Just added a standard info tile about "owner fields" when relevant. Should that be clickable? Is the text explicit enough?
|
|
Doesn't look like we have that kind of information in owner fields: https://fr.openfoodfacts.org/api/v3/product/7300400481588?fields=owner_fields
With the current solution we don't have too much space. A click on the info tile could open a dialog or even a page with more explanations. And a button to that email and another to that report link. |
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.
Generally speaking, seems OK for me.
Could you add some Semantics for screen readers?
Sure, I'll do that the next time I code for this PR. |
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.
@monsieurtanuki thanks for this addition
Thank you @teolemon for your review! I just have to add a |
Impacted files: * add_basic_details_page.dart: added semantics * app_en.arb: 2 new labels for "owner field info" * nutrition_page_loaded.dart: added semantics * owner_field_info.dart: translated labels
What
Screenshots
Fixes bug(s)
Impacted files
add_basic_details_page.dart
: display "producer provided" icon for name, brands and quantitynutrition_page_loaded.dart
: display "producer provided" icon for serving size and each individual nutrientproduct_query.dart
: set the icon to display when a product field value is "producer provided"smooth_autocomplete_text_field.dart
: added parametersuffixIcon
smooth_text_form_field.dart
: added parametersuffixIcon