110 Commits

Author SHA1 Message Date
061fa6ede4 fix: #2362 history not refreshing (#2393)
* fix: #2362 history not refreshing

* fix:#2362 refactoring codereview

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-06-30 21:15:48 +02:00
587e943eb6 feat: #2425 - added "all products to be completed" item (in user page) (#2441)
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.
2022-06-30 18:36:35 +02:00
c1664d67b7 feat: #2248 - user agent distinction between scan and barcode search (#2408)
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
2022-06-28 09:17:34 +02:00
2c0a31ff9c feat: #1070 - OCR for packaging (#2383)
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.
2022-06-25 23:07:54 +02:00
0f94837966 fix: #1700 - nutrients - refactored "save" action as in SimpleInputPage (#2338)
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"
2022-06-24 12:58:42 +02:00
399996770c feat: #2169 - added emb codes and countries (#2363)
* 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>
2022-06-23 15:33:27 +02:00
97d36bc71c feat: Logs service (+ email attachment) (#2303)
* Logs service (+ email attachment)

* Fix flutter format warning

* Reformat code

* Remove fimber_io dependency to have our own implementations instead

* Add close:true to email dialog

* Add SENDTO query to AndroidManifest

* Remove useless comment
2022-06-23 15:14:28 +02:00
5715cf7171 fix: #1427 scanning invalid code (#2336)
* fix: #1427 scan invalid code

* fix: #1427 fix presubmit test
2022-06-22 15:56:19 +02:00
e467ff964b feat: #2315 - added smoothie fields to user queries and localized (#2332)
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
2022-06-20 22:09:49 +02:00
f9d4dc81b9 feat: #2315 - added 4 user-related searches in the profile screen (#2321)
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`
2022-06-19 20:35:12 +02:00
38f206f4b8 fix: comment about a deprecated file, to be removed when old enough (#2293)
Impacted file:
* `dao_hive_product.dart`
2022-06-16 13:35:57 +02:00
1662685825 feat: #2280 - DaoProduct's just migrated to sqflite (#2289)
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`
2022-06-16 07:09:09 +02:00
ca0a0f7f1a feat: #2204 - new "please sign in" message when the product is about to be edited (#2224)
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`
2022-06-08 20:23:20 +02:00
efe7f8d938 feat: #2169 - new simple input page for "Stores" (#2195)
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
2022-06-07 10:39:55 +02:00
2c24f9bde0 fix: #2147 - now using new product field comparedToCategory (#2154)
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`
2022-06-04 19:08:08 +02:00
7242bedd43 fix: Matomo refactor (#2019)
* fix: Just a little reorder

* Matomo don't need context

* Update analytics_helper.dart

* Update product_query.dart
2022-05-27 11:15:10 +02:00
c3b44aced2 fix: Flutter 3.0 fixes (#1814)
* fix: Flutter 3.0 fixes

* Workflows

* Update gradle

* Automated fixes

* Manual async gap fixes

* Fix merge conflict reverts

* Format

* qr_code_scanner fixes
2022-05-12 16:07:22 +02:00
c43ad920ed feat: #1501 - refactored user preferences files into a dedicated folders (#1812) 2022-05-11 08:22:34 +02:00
342c5f18dc feat: #1501 - split of the preference page into detailed pages (#1797)
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
2022-05-10 20:53:34 +02:00
6cd8008f12 fix: #1786 - safe write access to barcode lists (#1792)
Impacted file:
* `dao_product_list.dart`: safe write access to barcode lists

Fixes SMOOTHIE-V2
2022-05-09 17:34:40 +02:00
bb89eb5ffa feat: knowledgePanels are now loaded with the other product fields (#1691)
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
2022-04-28 22:46:52 +02:00
a88ac6d4ab feat: #1377 - reextract ingredients (#1644)
* feat: #1377 - display and re-extract ingredients
2022-04-27 14:30:19 +02:00
ddb34d8a48 feat: #1073 - user-defined product lists (#1649)
* feat: #1073 - user-defined product lists

New file:
* `product_list_user_dialog_helper.dart`: Dialog helper class for user product list.

Impacted files:
* `constant_icons.dart`: added method `getForwardIcon`
* `dao_product_list.dart`: added methods related to user list management
* `new_product_page.dart`: action bar with "add to list" button instead of just "edit product" button; added "lists" widget
* `product_list.dart`: added `ProductListType.USER` as "End-user product list"
* `product_list_page.dart`: added "clear" and "rename" popup options
* `product_query_page_helper.dart`: impact of new `ProductListType.USER`

* feat: #1073 - lint check fix

Impacted file:
* `new_product_page.dart`

* feat: #1073 - localizations and refactoring

Impacted files:
* `app_en.arb`: localizations in English
* `app_fr.arb`: localizations in French
* `edit_product_page.dart`: unrelated refactoring
* `new_product_page.dart`: localizations
* `product_list_page.dart`: localizations
* `product_list_user_dialog_helper.dart`: localizations
* `product_title_card.dart`: unrelated refactoring
* `smooth_product_card_found.dart`: unrelated refactoring

* Update packages/smooth_app/lib/l10n/app_en.arb

* Update packages/smooth_app/lib/l10n/app_en.arb

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2022-04-26 17:45:24 +02:00
f67180785d fix: #1352 - robotoff insight card shows permanently (#1574)
* fix: #1395 - show newly added product in carousel

* fix: #1395 - refactoring unused import

* fix: #1395 - refactoring make variable private

* fix: #1352 - robotoff card shows permanently

* fix: #1352 - codereview refactoring

* fix: #1352 - check fix

* fix: #1352 - pretest check fix

* fix: #1352 - codereview fix

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2022-04-21 10:58:52 +02:00
c94ff24e51 fix: make card bottom prompt visible (#1488)
* make card bottom prompt visible

* Update summary_card.dart

* Update paged_product_query.dart

* pubspec

Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
2022-04-19 21:48:55 +02:00
6ae6d5c833 refactor: removing a tmp code file (#1512)
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
2022-04-07 18:03:12 +02:00
b0ccaeeaa0 fix: #1505 - removed an unnecessary final (#1507)
Impacted file:
* `dao_product_list.dart`: removed an unnecessary `final`
2022-04-07 08:05:36 +02:00
e9ec9b325c feat: #1333 - now the back-end results are paged. (#1437)
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.
2022-04-06 20:12:04 +02:00
b16d050859 feat: #1145 - added a preference for "test env host" (#1204)
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"
2022-03-13 12:38:15 +01:00
7783e412e2 feat: Added core usage logging (#1147)
* feat: Initial tracking structure

* Added testing page

* Created track constructor

* Deleted unneccassary _trackConstructor params

* Finished start track

* Fix id + country

* Finished: trackScannedProduct

* Finished: trackProductPageOpen

* Finished: trackKnowledgePanelOpen

* Finished: trackOpenLink

* Finished: trackPersonalizedRanking

* Finished: trackSearch

* Added documentation + fixed imports

* Code review

* trackKnowledgePanelOpen

* Code review

* Update main.dart
2022-02-18 17:01:14 +01:00
5c68cfc63a fix: Dart uuid generation (#1071)
* fix: Dart uuid generation

* Update product_query.dart

* Update product_query.dart

* fix

* Update product_query.dart
2022-02-05 15:31:13 +01:00
4dd0ab1360 fix: no longer using deprecated API method getKnowledgePanels (#1066)
Impacted files:
* `knwoledge_panels_query.dart`: no longer using deprecated API method getKnowledgePanels
* `pubspec.lock`: impacted by `pubpsec.yaml`
* `pubspec.yaml`: upgraded `openfoodfacts`
2022-02-03 16:05:11 +01:00
44b09e2746 feat: now computing device id, used as app uuid in API queries (#1064)
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
2022-02-03 07:49:11 +01:00
2101e6e7c3 feat: #879 - added a "same category" button on product page (#1057)
New file:
* `category_product_query.dart`: Back-end query about a category.

Impacted files:
* `app_en.arb`: added 1 label for "compare to category"
* `app_fr.arb`: added 1 label for "compare to category"
* `knowledge_panels_builder.dart`: refactored
* `product_cards_helper.dart`: refactored
* `product_query.dart`: added category tags field
* `product_query_page.dart`: now displaying directly the search parameter
* `summary_card.dart`: added a "same category" button
2022-02-01 10:45:19 +01:00
44cd470dff feat: #878 - added a multiselect mode to product list page (#1035)
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
2022-01-31 15:07:08 +01:00
954449e437 feat: #935 - now we display localized (downloaded) data during onboarding (#986)
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`
2022-01-20 20:28:07 +01:00
e862ba825e feat: #931 - added in dev mode a way to print product history (#945)
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
2022-01-13 19:49:51 +01:00
76caf31b85 Residual changes to PR #922 (#925) 2022-01-12 18:56:07 +01:00
dc66feca02 Show unanswered questions to the users on product page. (#922) 2022-01-12 18:30:56 +01:00
92ce8724bb feat: #511 - added a "nutrition edit page" (#904)
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`
2022-01-09 14:49:27 +01:00
03be267e56 feat: #848 - dev mode - item that switches the QueryType to PROD and DEV (#851)
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`
2022-01-04 16:31:04 +01:00
b839d8876f Code base cleanup (#808)
* Code base cleanup
2022-01-02 16:17:06 +01:00
636547f61e fix: #804 - faster init using hive "lazy" box for products (#809)
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`
2021-12-30 22:42:01 +01:00
d33c8062a2 fix: #771 - now using translated categories; fixed "category filter" label (#786)
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
2021-12-29 11:55:12 +01:00
2262b4e3be feature/#782 - now using the onboarding's country and global country and language for API searches (#783)
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
2021-12-29 11:06:50 +01:00
ba1e864135 fix: #775 - country code is lowercased for OpenFoodFactsCountry match (#781)
Impacted file:
* `product_query.dart`: country code is lowercased for OpenFoodFactsCountry match
2021-12-28 18:46:10 +01:00
9c950b2132 fix: #753 - keyword search OK with non-ASCII characters (#759)
Impacted file:
* `dao_product_list.dart`: now method `_getKey` encodes parameters in base64
2021-12-26 19:54:12 +01:00
bc02b75e41 feat: Implemented basic login (#742)
* feat: First login UI

* feat: Added DaoSecuredString

* fix: Android build

* feat: Login logic + minimal validation

* feat: Created dedicated SmoothTextFormField

* feat: visibility_off or visibility icon

* feat: Added UserManagementHelper

* fix: Eye icon rebuild

* fix: null error

* feat: Updated files

* feat: Darkmode support

* feat: Added temporary credentials check

* feat: Added temporary credentials check

* fix: Formatting

* fix: Const

* fix: test

* Code review

* Code review

* Code review
2021-12-22 16:16:30 +01:00
368758d0b1 refactor: removal of the old version of ProductPage; OFF language and country (#729)
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`
2021-12-15 15:53:41 +01:00
5c7d1485de feat: #470 - hive instead of sqflite, and no more pantries and colors (#717)
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
2021-12-10 15:58:25 +01:00