New files:
* `paged_to_be_completed_product_query.dart`: Back-end paged query for all "to-be-completed" products.
* `tmp_to_be_completed_query_configuration.dart`: Query Configuration for all to-be-completed products.
Deleted files:
* `contributor_product_query.dart`
* `informer_product_query.dart`
* `photographer_product_query.dart`
* `to_be_completed_product_query.dart`
Impacted files
* `app_en.arb`: 1 label slightly modified, 1 added label.
* `app_fr.arb`: 1 label slightly modified, 1 added label.
* `paged_user_product_query.dart`: refactored around `UserProductSearchQueryConfiguration`.
* `product_list.dart`: added a new list - all products to be completed (not just the user's).
* `product_list_page.dart`: refactored.
* `product_query_page_helper.dart`: refactored.
* `user_preferences_account.dart`: added an item for "all to-be-completed"; refactored.
Impacted files:
* `barcode_product_query.dart`: new parameter `isScanned` to distinguish scan and barcode search via the user agent comment field
* `continuous_scan_model.dart`: "this IS a scan"
* `product_dialog_helper.dart`: "this is NOT a scan"
* `product_query.dart`: new method to set the user agent comment field
New files:
* `ocr_helper.dart`: OCR Helper, to be implemented for ingredients and packaging for instance.
* `ocr_ingredients_helper.dart`: OCR Helper for ingredients.
* `ocr_packaging_helper.dart`: OCR Helper for packaging.
* `tmp_ocr_packaging_result.dart`: to be moved to off-dart.
Impacted files:
* `app_en.arb`: added 6 labels for packaging OCR.
* `edit_ingredients_page.dart`: refactored around new class `OcrHelper`.
* `edit_product_page.dart`: added access to edit OCR packaging; refactored.
* `knowledge_panels_builder.dart`: refactored.
* `product_query.dart`: added packaging fields to the product fields we get from the server.
Impacted files:
* `app_en.arb`: removed 2 labels not used anymore
* `nutrition_container.dart`: added "no nutrition data"
* `nutrition_page_loaded.dart`: refactored the "save" action as in `SimpleInputPage`; added "no nutrition data"; just trying - remove the status bar recoloring; added a save/cancel bottom bar; fixed a bug in `_isEdited`
* `product_query.dart`: added field "no nutrition data"
* feat: #2169 - added emb codes and countries
Impacted files:
* `app_en.arb`: added emb codes and countries translations
* `app_fr.arb`: added emb codes and countries translations
* `edit_product_page.dart`: added emb codes and countries editors
* `Podfile.lock`: wtf
* `product_query.dart`: added emb codes and countries product fields
* `product_refresher.dart`: now using language and country parameters for `saveProduct`
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded versions of off-dart and sentry
* `simple_input_page.dart`: added an optional explanation field
* `simple_input_page_helpers.dart`: added emb codes and countries helpers; added an optional explanation field; refactored
* 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>
* 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:
* `app_en.arb`: added a title for each of the 4 user queries
* `app_fr.arb`: added a title for each of the 4 user queries
* `paged_user_product_query.dart`: added smoothie fields to user queries
* `product_list_page.dart`: refactored
* `product_query_page_helper.dart`: refactored by removing useless code
* `user_preferences_account.dart`: refactored and translated
New files:
* `contributor_product_query.dart`: User Product Search, in "contributor" mode.
* `informer_product_query.dart`: User Product Search, in "informer" mode.
* `paged_search_product_query.dart`: Back-end paged queries around search.
* `paged_user_product_query.dart`: Back-end paged queries around User.
* `photographer_product_query.dart`: User Product Search, in "photographer" mode.
* `to_be_completed_product_query.dart`: User Product Search, in "to be completed" mode.
Impacted files:
* `category_product_query.dart`: refactored with new class `PagedSearchProductQuery`
* `keywords_product_query.dart`: refactored with new class `PagedSearchProductQuery`
* `paged_product_query.dart`: now limited to page management
* `product_list.dart`: added `enum`s and constructors around user queries
* `product_list_page.dart`: added cases for the new 4 product list types
* `product_query_page_helper.dart`: added cases for the new 4 product list types
* `user_preferences_account.dart`
New files:
* `abstract_sql_dao.dart`: DAO abstraction for SQL.
* `bulk_deletable.dart`: Interface for bulk database deletes.
* `bulk_insertable.dart`: Interface for bulk database inserts.
* `bulk_manager.dart`: Manager for bulk database inserts and deletes.
* `dao_hive_product.dart`: moved code from the previous `hive` version of `DaoProduct`, renamed here `DaoHiveProduct`
Impacted files:
* `dao_product.dart`: `sqflite` version of `DaoProduct`, that is from now on the only one to be used
* `local_database.dart`: added `sqflite` and its one table so far, also named `DaoProduct` in order to minimize the changes everywhere else (the old `DaoProduct` being renamed `DaoHiveProduct`); migrated the product data from `hive` to `sqflite`
* `Podfile.lock`: wtf
* `pubspec.lock`: wtf
* `data_importer/pubspec.yaml`: updated the `sqflite` dependency to the same as in `smooth_app`
* `smooth_app/pubspec.yaml`: added a dependency to `sqflite`
Impacted files:
* `app_en.arb`: new translation for the "please sign in" message
* `app_fr.arb`: new translation for the "please sign in" message
* `edit_product_page.dart`: added calls to new `checkIfLoggedIn` method
* `product_query.dart`: added method `isLoggedIn`
* `product_refresher.dart`: added method `checkIfLoggedIn` and called it in `saveAndRefresh`
New files:
* `simple_input_page.dart`: Simple input page: we have a list of labels, we add, we remove, we save.
* `simple_input_page_helpers.dart`: Helpers for Simple Input Page.
Impacted files:
* `category_picker_page.dart`: refactored
* `edit_ingredients_page.dart`: refactored
* `edit_product_page.dart`: added an "edit store" button; refactored
* `nutrition_page_loaded.dart`: refactored
* `product_query.dart`: added fields for stores
* `product_refresher.dart`: now we return the saved and refreshed product instead of a mere bool
Impacted files:
* `product_query.dart`: now retrieving new product field `COMPARED_TO_CATEGORY`
* `pubspec.lock`: wtf
* `pubspec.dart`: now using version `1.18.0` of `openfoodfacts`, that includes new product field `comparedToCategory`
* `summary_card.dart`: now uses the new product field `comparedToCategory`
Deleted files:
* `faq_handle_view.dart`
* `list_helper.dart`
* `smooth_list_tile.dart`
* `social_handle_view.dart`
* `user_contribution_view.dart`
New files:
* `abstract_collapsible_user_preferences.dart`: Abstraction of a collapsed/expanded display for the preference pages.
* `all_user_product_list_page.dart`: Page that lists all user product lists.
* `user_preferences_connect.dart`: Display of "Connect" for the preferences page.
* `user_preferences_contribute.dart`: Display of "Contribute" for the preferences page.
* `user_preferences_faq.dart`: Display of "FAQ" for the preferences page.
* `user_preferences_list_tile.dart`: Custom `ListTile` for preferences.
Impacted files:
* `abstract_user_preferences.dart`: refactoring around the fact that now we display pages instead of collapsible List<Widget>
* `continuous_scan_model.dart`: refactored around `DaoProductList` being seldom `async`
* `dao_product_list.dart`: new method `getLength`; refactored with less `async` methods
* `new_product_page.dart`: refactored around `DaoProductList` being seldom `async`
* `preferences_page.dart`: minor refactoring
* `product_list_import_export.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_page.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_supplier.dart`: refactored around `DaoProductList` being seldom `async`
* `product_list_user_dialog_helper.dart`: new "delete list?" dialog; refactored around `DaoProductList` being seldom `async`
* `query_product_list_supplier.dart`: refactored around `DaoProductList` being seldom `async`
* `user_preferences_attribute_group.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
* `user_preferences_food.dart`: minor refactoring
* `user_preferences_page.dart`: now we use the same `StatefulWidget` for a root page with only headers and detailed pages with bodies; added item "Lists"; created 3 new "top paragraphs" extracted from "settings".
* `user_preferences_page-blue-dark.dart`: impacted by new page design
* `user_preferences_page-blue-light.dart`: impacted by new page design
* `user_preferences_page-brown-dark.dart`: impacted by new page design
* `user_preferences_page-brown-light.dart`: impacted by new page design
* `user_preferences_page-green-dark.dart`: impacted by new page design
* `user_preferences_page-green-light.dart`: impacted by new page design
* `user_preferences_profile.dart`: minor refactoring
* `user_preferences_settings.dart`: minor refactoring
Deleted file:
* `knowledge_panels_query.dart`
Impacted files:
* `new_product_page.dart`: simplified as knowledge panels are now already in product
* `product_query.dart`: added `ProductField.KNOWLEDGE_PANELS` to default fields
Now that knowledge panels are an explicit field of product, we can simplify the code.
Deleted files:
* `onboarding_data_knowledge_panels.dart`
* `tmp.dart`
Impacted files:
* `knowledge_panels_template.dart`: now using the new `OnboardingDataProduct.forKnowledgePanels` constructor
* `onboarding_data_product.dart`: refactored in order to include knowledge panels as part of product
* `onboarding_loader.dart`: now using the new `OnboardingDataProduct` constructors
* `preferences_page.dart`: now using the new `OnboardingDataProduct.forProduct` constructor
New files:
* `paged_product_query.dart`: Paged product query (with pageSize and pageNumber).
* `partial_product_list.dart`: List of Products out of partial results (e.g. paged results).
Impacted files:
* `category_product_query.dart`: now extending new class `PagedProductQuery`.
* `dao_product_list.dart`: now storing "total size" of paged results; now including page size and page number in the primary key; now returning a bool for method `delete`.
* `database_product_list_supplier.dart`: now loads paged results page after page.
* `keywords_product_query.dart`: now extending new class `PagedProductQuery`.
* `new_product_page.dart`: unrelated fix about back icon on Android/iOS.
* `onboarding_flow_navigator.dart`: unrelated fix about back icon on Android/iOS.
* `personalized_ranking_page.dart`: refactoring.
* `Podfile.lock`: wtf
* `product_list.dart`: removed now unused product list type (pnns); added fields page size, page number and total size for paged results; refactored.
* `product_list_page.dart`: refactored.
* `product_list_supplier.dart`: now using `PagedProductQuery` and `PartialProductList`.
* `product_query_model.dart`: added a `clear` method to go back to top page; added method `loadNextPage` and `loadFromTop`.
* `product_query_page.dart`: now displaying pages results with a "load next" button; unrelated fix about back icon on Android/iOS.
* `product_query_page_helper.dart`: refactored.
* `query_product_list_supplier.dart`: now using `PagedProductQuery`.
* `scan_page_helper.dart`: refactored.
* `search_page.dart`: refactored.
* `summary_card.dart`: refactored.
Impacted files:
* `product_query.dart`: improved method `setQueryType` in order to include the new "test env host" preference
* `user_preferences.dart`: added getter/setter for `String` in dev mode
* `user_preferences_dev_mode.dart`: added a dialog for "test env host"
Impacted files:
* `knwoledge_panels_query.dart`: no longer using deprecated API method getKnowledgePanels
* `pubspec.lock`: impacted by `pubpsec.yaml`
* `pubspec.yaml`: upgraded `openfoodfacts`
Impacted files:
* `main.dart`: sets global device id at init time.
* `product_query.dart`: now stores the device id, for API calls.
* `pubspec.lock`: impacted by `pubpsec.yaml`
* `pubspec.yaml`: replaced `device_info_plus` with `platform_device_id`; upgraded `openfoodfacts`
* `question_card.dart`: now using `ProductQuery`'s device id
Impacted files:
* `app_en.arb`: added a "compare mode" label
* `app_fr.arb`: added a "compare mode" label
* `personalized_ranking_page.dart`: added a `fromItems` constructor for more flexibility
* `product_list_item_simple.dart`: added optional `onTap` parameter in order to override the default behavior when checking/unchecking, and an optional `onLongPress` parameter in order to trigger selection mode
* `product_list_page.dart`: added a "multiselect" mode and a header with buttons; removed FABs; added longPress-to-selection-mode feature
* `product_query.dart`: unrelated removal of a harmless duplicate
* `product_query_page.dart`: refactored
* `ranking_floating_action_button.dart`: added a comment about getting rid of this class because of possible confusion
* `scan_page_helper.dart`: refactored
* `smooth_it_model.dart`: for flexibility, now using `List<Product>` instead of `ProductList`
* `smooth_product_card_found.dart`: added optional `onTap` parameter in order to override the default behavior when checking/unchecking
Deleted files:
* `sample_eco_knowledge_panels.json`: replaced by new file `sample_knowledge_panels.json`
* `sample_health_knowledge_panels.json`: replaced by new file `sample_knowledge_panels.json`
New files:
* `abstract_onboarding_data.dart`: Abstraction of data we download, store and reuse at onboarding.
* `dao_string.dart`: Where we store strings.
* `loading_dialog.dart`: Dialog with a stop button, while a future is running.
* `onboarding_data_knowledge_panels.dart`: Helper around knowledge panels we download, store and reuse at onboarding.
* `onboarding_data_product.dart`: Helper around a product we download, store and reuse at onboarding.
* `onboarding_loader.dart`: Helper around data we download, store and reuse at onboarding.
* `sample_knowledge_panels.json`: json data downloaded today for en_US, cf. onboarding_data_knowledge_panels.dart
* `tmp.dart`: Fixes to off-dart.
Impacted files:
* `knowledge_panel_page_template.dart`: added parameters to 1. use the database (and downloaded data) and 2. limit the display to a given panel
* `knowlegde_panel_builder.dart`: added a method to display only one panel
* `local_database.dart`: added new dao `DaoString`
* `new_product_page.dart`: refactored
* `next_button.dart`: added an optional call to async methods at "next" time - e.g. data download
* `nutrition_page_loaded.dart`: now uses the new `LoadingDialog`
* `onboarding_flow_navigator.dart`: now using the database to get more relevant (previoulsy downloaded) data
* `preferences_page.dart`: now using previously downloaded data instead of assets
* `product_dialog_helper.dart`: now uses the new `LoadingDialog`
* `question_card.dart`: unrelated minor refactoring
* `sample_eco_card_page.dart`: now using previously downloaded data instead of assets, and displaying only the environment card
* `sample_health_card_page.dart`: now using previously downloaded data instead of assets, and displaying only the health card
* `sample_product_json.dart`: json data downloaded today for en_US, cf. onboarding_data_product.dart
* `sign_up_page.dart`: now uses the new `LoadingDialog`
Impacted files:
* `dao_product_list.dart`: new method `export`; safer `get` that signals issues through `debugPrint`
* `user_preferences_dev_mode.dart`: new "export history" button
* `user_preferences_page.dart`: minor refactoring
New files:
* `nutrition_page.dart`: Preparatory nutrition page where data is loaded.
* `nutrition_page_loaded.dart`: Actual nutrition page, with data already loaded.
Impacted files:
* `app_en.arb`: added 6 related labels
* `app_fr.arb`: added 6 related labels
* `knowledge_panels_builder.dart`: now the nutrition page button is systematic (but with a potentially different label/icon)
* `new_product_page.dart`: minor refactoring
* `product_cards_helper.dart`: minor refactoring
* `product_query.dart`: new method `getLocaleString`
* `smooth_app/pubspec.lock`
* `smooth_ui_library/pubspec.lock`
* `smooth_ui_library/example/pubspec.lock`
Impacted files:
* `knowledge_panels_query.dart`: not using systematically `QueryType.PROD` anymore
* `main.dart`: at init time, sets the correct query type from preferences
* `product_query.dart`: new method `setQueryType` that uses the preferences to set the query type
* `user_preferences_dev_mode.dart`: added an item that switches the `QueryType` to `PROD` and `DEV`
Impacted files:
* `dao_product.dart`: switched to "lazy" box; removed an unrelated useless method
* `pubspec.yaml`: removed a library used by the removed method
* `pubspec.lock`: impacted by `pubspec.yaml`
Impacted files:
* `app_en.arb`: fixed `category` label; added `category_all`
* `app_fr.arb`: fixed `category` label; added `category_all`
* `product_query.dart`: removed now useless `CATEGORIES_TAGS` (now we use only `CATEGORIES_TAGS_IN_LANGUAGES`)
* `product_query_model.dart`: now using `categoriesTagsInLanguages` for good translations; refactored
* `product_query_page.dart`: minor refactoring
Impacted files:
* `barcode_product_query.dart`: now using global country and language
* `continuous_scan_model.dart`: now using implicitly global country and language
* `country_selector.dart`: fixed the initial country search (lowercase); now setting global country
* `image_upload_card.dart`: now using global language
* `keywords_product_query.dart`: now using global country and language
* `knowledge_panels_query.dart`: now using global country and language
* `main.dart`: now setting global country and language at init time
* `new_product_page.dart`: now using implicitly global country and language
* `product_dialog_helper.dart`: now using implicitly global country and language
* `product_query.dart`: added getter and setter for global country and language
* `smooth_app/pubspec.yaml`: upgraded to 1.8.1 off-dart, therefore we can remove the `dependency_overrides` fix
* `smooth_app/pubspec.lock`: impacted by `pubspec.yaml`
* `smooth_ui_library/pubspec.yaml`: upgraded to 1.8.1 off-dart
* `smooth_ui_library/pubspec.lock`: impacted by `pubspec.yaml`
* `example/pubspec.yaml`: unrelated minor upgrades
* `example/pubspec.lock`: impacted by `pubspec.yaml`
* `scan_page.dart`: now using implicitly global country and language
* `search_page.dart`: now using implicitly global country and language
* `user_preferences.dart`: minor refactoring
Deleted files:
* `attribute_card.dart`
* `attribute_list_expandable.dart`
* `category_card.dart`
* `category_chip.dart`
* `category_product_query.dart`
* `choose_page.dart`
* `group_product_query.dart`
* `product_page.dart`
* `smooth_expandable_card.dart`
* `subcategory_card.dart`
* `text_search_widget.dart`
Impacted files:
* `barcode_product_query.dart`: now using OFF classes for language and country instead of `String`s
* `continuous_scan_model.dart`: now using OFF classes for language and country instead of `String`s
* `keywords_product_query.dart`: now using OFF classes for language and country instead of `String`s
* `knowlegde_panel_query.dart`: now using OFF classes for country instead of `String`
* `product_cards_helper.dart`: moved here method from now defunct `AttributeListExpandable`
* `product_dialog_helper.dart`: now using OFF classes for language and country instead of `String`s
* `product_query.dart`: now computing values for OFF classes for language and country instead of `String`s
* `pubspec.yaml`: removed now useless libraries `flutter_staggered_animations`, `flutter_staggered_grid_view`, `flutter_typeahead` and `share_plus`, and upgraded some version numbers
* `scan_page.dart`: now using OFF classes for language and country instead of `String`s
* `search_page.dart`: moved methods from now defunct `ChoosePage`
* `smooth_product_card_found.dart`: removed an never used "old style" version; use a method moved to `product_dialog_helper.dart`
* `smooth_ui_library.dart`: removed the entry about now defunct `smooth_expandable_card.dart`
* `summary_card.dart`: use a method moved to `product_dialog_helper.dart`
Deleted files:
* `bulk_deletable.dart`
* `bulk_insertable.dart`
* `bulk_manager.dart`
* `dao_product_extra.dart`
* `label_sneek_peak_view.dart`
* `list_page.dart`
* `multi_product_select_page.dart`
* `product_copy_helper.dart`
* `product_copy_view.dart`
* `product_extra.dart`
* `product_list_add_button.dart`
* `product_list_button.dart`
* `product_list_item.dart`
* `product_list_item_pantry.dart`
* `product_list_item_shopping.dart`
* `product_list_preview.dart`
* `product_list_preview_helper.dart`
Impacted files:
* `abstract_dao.dart`: added hive related init methods
* `barcode_product_query.dart`: minor refactoring
* `category_product_query.dart`: minor refactoring
* `continuous_scan_model.dart`: minor refactoring
* `dao_product.dart`: rewritten from scratch with hive instead of sqflite - much easier to understand!
* `dao_product_list.dart`: rewritten from scratch with hive instead of sqflite - much easier to understand!
* `dao_string_list.dart` (renamed from `search_history.dart`): rewritten from scratch with hive instead of sqflite
* `database_product_list_supplier.dart`: minor refactoring
* `group_product_query.dart`: minor refactoring
* `history_page.dart`: minor refactoring
* `keywords_product_query.dart`: minor refactoring
* `local_database.dart`: rewritten from scratch with hive instead of sqflite; simplified
* `main.dart`: minor refactoring
* `new_product_page.dart`: minor refactoring
* `personalized_ranking_page.dart`: removed old feature
* `product_list.dart`: preferred `enum` to `String` for types; removed tons of old features
* `product_list_dialog_helper.dart`: removed old feature
* `product_list_item_simple.dart`: removed old features
* `product_list_page.dart`: removed old features
* `product_page.dart`: removed old feature
* `product_query_page_helper.dart`: cleaner code with `enum`s
* `pubspec.yaml`: added hive, removed sqflite
* `query_product_list_supplier.dart`: minor refactoring
* `search_history_view.dart`: minor refactoring
* `search_page.dart`: minor refactoring