-
-
Notifications
You must be signed in to change notification settings - Fork 259
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: 4058 - expand/collapse for additional ecoscore fields #4071
Merged
monsieurtanuki
merged 3 commits into
openfoodfacts:develop
from
monsieurtanuki:feat_2/4058
Jun 4, 2023
Merged
feat: 4058 - expand/collapse for additional ecoscore fields #4071
monsieurtanuki
merged 3 commits into
openfoodfacts:develop
from
monsieurtanuki:feat_2/4058
Jun 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New file: * `product_field_editor.dart`: Helper class about product fields. Impacted files: * `add_new_product_page.dart`: added origins, ingredients, labels and packaging in option with expand/collapse; refactored using new classes around `ProductFieldEditor` * `add_ocr_button.dart`: refactored using new class `ProductFieldOcrEditor` * `add_packaging_button.dart`: refactored using new class `ProductFieldPackagingEditor * `app_en.arb`: added one label for "additional ecoscore fields" * `app_fr.arb`: added one label for "additional ecoscore fields" * `edit_ocr_page.dart`: renamed from `edit_ingredients_page.dart` * `edit_product_page.dart`: refactored using new classes `ProductFieldDetailsEditor`, `ProductFieldOcrIngredientEditor`, `ProductFieldPackagingEditor` and `ProductFieldOcrPackagingEditor` * `knowledge_panel_action_card.dart`: minor refactoring * `knowledge_panels_builder.dart`: minor refactoring * `simple_input_page_helpers.dart`: added method `isPopulated`; minor refactoring * `summary_card.dart`: refactored using new class `ProductFieldDetailsEditor`
github-actions
bot
added
🌐 l10n
Product addition
The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users.
🥫 Product page
summary card
labels
Jun 3, 2023
Codecov Report
@@ Coverage Diff @@
## develop #4071 +/- ##
===========================================
- Coverage 10.94% 10.93% -0.02%
===========================================
Files 270 271 +1
Lines 13434 13453 +19
===========================================
Hits 1471 1471
- Misses 11963 11982 +19
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
teolemon
approved these changes
Jun 4, 2023
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.
This looks good functionality wise 👍
Impacted files: * `add_simple_input_button.dart`: removed useless parameters; now uses `ProductFieldSimpleEditor` * `edit_product_page.dart`: now uses `ProductFieldSimpleEditor` * `product_field_editor.dart`: moved `edit` code from `simple_input_page_helpers.dart` * `simple_input_page_helpers.dart`: moved code to `product_field_editor.dart`
Thank you @teolemon for your review! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🌐 l10n
Product addition
The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users.
🥫 Product page
summary card
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Screenshot
Fixes bug(s)
Files
New file:
product_field_editor.dart
: Helper class about product fields.Impacted files:
add_new_product_page.dart
: added origins, ingredients, labels and packaging in option with expand/collapse; refactored using new classes aroundProductFieldEditor
add_ocr_button.dart
: refactored using new classProductFieldOcrEditor
add_packaging_button.dart
: refactored using new class `ProductFieldPackagingEditorapp_en.arb
: added one label for "additional ecoscore fields"app_fr.arb
: added one label for "additional ecoscore fields"edit_ocr_page.dart
: renamed fromedit_ingredients_page.dart
edit_product_page.dart
: refactored using new classesProductFieldDetailsEditor
,ProductFieldOcrIngredientEditor
,ProductFieldPackagingEditor
andProductFieldOcrPackagingEditor
knowledge_panel_action_card.dart
: minor refactoringknowledge_panels_builder.dart
: minor refactoringsimple_input_page_helpers.dart
: added methodisPopulated
; minor refactoringsummary_card.dart
: refactored using new classProductFieldDetailsEditor