* Fix the elevated button color
* Scan tagline : when there is an error, hide the image
* Better management of errors for the `ProductPicture`
* Force a loader for the gallery
* Fix Japanese issue with tables
* Update packages/smooth_app/lib/cards/product_cards/smooth_product_image.dart
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
* Force a color for Price buttons
---------
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Impacted files:
* `knowledge_panel_card.dart`: overrides the "isClickable" parameter in case there are eventually no further elements to display
* `knowledge_panels_builder.dart`: new helper methods
Impacted files:
* `add_nutrition_button.dart`: new method to check if nutrition facts are relevant for this product type
* `knowledge_panel_action_card.dart`: checks if the product type matches before displaying the nutrition facts button
* `knowledge_panels_builder.dart`: checks if the product type matches before displaying the nutrition facts button
* `pubspec.lock`: upgrade to flutter `3.24`
Impacted files:
* `add_new_product_page.dart`: editors different when not FOOD; minor refactoring
* `edit_product_page.dart`: no ingredient editor for PRODUCTS
* `image_field_extension.dart`: now the main image fields depend on product type; minor refactoring (more compact `switch` syntax)
* `knowledge_panels_builder.dart`: minor fix
* `product_cards_helper.dart`: now the main image fields depend on product type
* `product_image_gallery_view.dart`: now the main image fields depend on product type
* `product_image_swipeable_view.dart`: now the main image fields depend on product type
Impacted files:
* `app_en.arb`: added 2 labels for the "price privacy warning" dialog
* `background_task_add_price.dart`: now using new off-dart methods
* `knowledge_panel_action_card.dart`: minor off-dart impact
* `price_model.dart`: refactored
* `product_price_add_page.dart`: added the "price privacy warning" dialog the very first time and in an app bar button
* `product_price_item.dart`: now using new off-dart method
* `product_prices_page.dart`: now using new off-dart method
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded of `openfoodfacts` to `3.11.0`
* `user_preferences.dart`: added flag for "price privacy warning"
* `user_preferences_account.dart`: now using new off-dart method
Impacted files:
* `knowledge_panel_image_card.dart`: now using the optional `linkUrl` field for click operation
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to off-dart 3.7.0
New files:
* `reorderable_knowledge_panel_page.dart`: Page where the user can reorder the Knowledge Panel Cards.
* `reordered_knowledge_panel_cards.dart`: Knowledge Panel Cards as reordered by the user.
* `standard_knowledge_panel_page.dart`: Knowledge Panel Cards as provided by the server.
Impacted files:
* `app_en.arb`: added a "reorder the attributes" label
* `knowledge_panel_card.dart`: added an `isClickable` parameter to be get rid of the click icon+effect when reordering attributes
* `knowledge_panel_expanded_card.dart`: added an `isClickable` parameter
* `knowledge_panel_group_card.dart`: added an `isClickable` parameter
* `knowledge_panel_page.dart`: explicitly setting `isClickable: true`
* `knowledge_panels_builder.dart`: added an `isClickable` parameter
* `new_product_page.dart`: now using a dev-mode flag to determine if we display the reorder feature; moved code to new class `StandardKnowledgePanelCards`
* `pubspec.lock`: wtf
* `score_card.dart`: unrelated minor refactoring
* `user_preferences.dart`: added the user ordered attribute list as preference
* `user_preferences_dev_mode.dart`: added a flag for user reordered attribute feature
* fix: 1815 - around context.mounted
The PR is about two related topics:
* Removing all the `ignore: use_build_context_synchronously`
* Replacing all the `State<StatefulWidget> widget` by `BuildContext context`, now that it's possible in flutter
* Update packages/smooth_app/lib/pages/onboarding/permissions_page.dart
* format fix
* feat: 4628 - refactoring
Deleted files:
* `knowledge_panel_element_card.dart`
* `knowledge_panel_summary_card.dart`
New files:
* `knowledge_panel_image_card.dart`: Card that displays a Knowledge Panel _Image_ element.
* `knowledge_panel_text_card.dart`: Card that displays a Knowledge Panel _Text_ element.
* `website_card.dart`: Card that displays a website link. Code used to be inside `new_product_page.dart`
Impacted files:
* `knowledge_panel_card.dart`: minor refactoring
* `knowledge_panel_expanded_card.dart`: minor refactoring
* `knowledge_panel_page.dart`: minor refactoring
* `knowledge_panel_page_template.dart`: minor refactoring
* `knowledge_panels_builder.dart`: moved code here from `knowledge_panel_element_card.dart` and `knowledge_panel_summary_card.dart`; minor refactoring
* `new_product_page.dart`: moved the `WebsiteCard` code to a dedicated file; minor refactoring
* `product_cards_helper.dart`: minor refactoring
* `summary_card.dart`: minor refactoring
* feat: 4628 - additional TODO's
* App review in the "scan card"
* Add a keep alive to prevent many requests
* Add a missing call to super (for the KeepAlive mixin)
* Don't really understand what happened with this file 🤨
* Improve a11n by forcing a label on Nutri-Score and Eco-score buttons
* Fix a typo
* Add more cases + NOVA
* Remove a print statement
* Improve a bit the score card
* Improve accessibility for KP title cards
* Update packages/smooth_app/lib/l10n/app_en.arb
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* Update packages/smooth_app/lib/l10n/app_en.arb
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
---------
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Impacted files:
* `knowledge_panel_action_card.dart`: now using the new `KnowledgePanelAction` enum
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to `openfoodfacts: 2.5.2`
* feat: 4058 - expand/collapse for additional ecoscore fields
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`
* feat: 4058 - format
* feat: 4058 - refactoring
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`
New file:
* `add_packaging_button.dart`: "Add (new) packaging" button for user contribution.
Impacted file:
* `knowledge_panel_action_card.dart`: now opens the new packaging page; refactoring
Impacted files:
* `attributes_card_helper.dart`: refactor as advanced `enum` from `score_card_helper.dart`
* `knowledge_panel_summary_card.dart`: now using the new `ScoreCard.titleElement` constructor
* `score_card.dart`: refactored `CardEvaluation` as advanced `enum` from `score_card_helper.dart`; refactored `ScoreCard` with 2 explicit constructors instead of a single nameless one
* `score_card_helper.dart`: refactored `enum`s and moved code to more relevant files
* `summary_card.dart`: now using the new `ScoreCard.attribute` constructor
Impacted files:
* `knowledge_panel_page_template.dart`: now using the KP children in order to be able to display nothing
* `knowledge_panels_builder.dart`: now we build a list of children, which gives us the opportunity to display nothing if empty
* `new_onboarding_page.dart`: now using the KP children in order to be able to display nothing
Impacted files:
* `account_deletion_webview.dart`: minor refactoring; could not test, unfortunately
* `background_task_badge.dart`: minor refactoring
* `camera_scan_page.dart`: minor refactoring
* `country_selector.dart`: minor refactoring
* `generated_plugin_registrant.cc`: wtf
* `generated_plugins.cmake`: wtf
* `GeneratedPluginRegistrant.swift`: wtf
* `Info.plist`: wtf
* `knowledge_panel_world_map_card.dart`: minor refactoring
* `network_config.dart`: minor refactoring
* `Podfile.lock`: wtf
* `product_query_page.dart`: minor refactoring
* `project.pbxproj`: wtf
* `pubspec.lock`: wtf
* `apple_app_store/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `google_play/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `app_store/shared/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `uri_store/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `data_importer/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `data_importer_shared/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `mlkit/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `scanner/shared/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `zxing/pubspec.yaml`: to dart 2.19 without restriction for flutter
* `smooth_app/pubspec.yaml`: to dart 2.19 without restriction for flutter; upgraded the versions
* `user_preferences_page_test.dart`: minor cheat - we need either to refactor with `launchUrl` or to fix `WebView`
Deleted files:
* `add_category_button.dart`
* `add_ingredients_button.dart`
New files:
* `add_ocr_button.dart`: "Add OCR image" button for user contribution.
* `add_simple_input_button.dart`: "Add simple input" button for user contribution.
Impacted files:
* `app_en.arb`: added 6 labels for 6 new buttons
* `knowledge_panel_action_card.dart`: added 7 new action cases for "Add" buttons; refactored in OOP
* `knowledge_panels_builder.dart`: now use generic `AddOcrButton`; refactored around `ProductState`
* `ocr_helper.dart`: added an abstract method for the "Add" button label
* `ocr_ingredients_helper.dart`: implemented the new "Add" button label method
* `ocr_packaging_helper.dart`: implemented the new "Add" button label method
* `simple_input_page_helpers.dart`: added an abstract method for the "Add" button label; implemented it in all offspring classes
* `summary_card.dart`: now use generic `AddSimpleInputButton`; refactored around `ProductState`
Impacted files:
* `paged_to_be_completed_product_query.dart`: renamed `State` as `ProductState`
* `paged_user_product_query.dart`: created local `UserSearchType` instead of deprecated off-dart `UserProductSearchType`; used `ProductSearchQueryConfiguration` instead of deprecated `UserProductSearchQueryConfiguration`
* `product_query.dart`: now that we use fully v3, we don't need the temporary field list for user-related queries with v2
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 2.0.0
* `user_preferences_account.dart`: now using new local class `UserSearchType`
* and reduced all off-dart imports to a single `import 'package:openfoodfacts/openfoodfacts.dart';`