* fix: 6784 - readyForPriceTagValidation true only for priceTag and bulk
Impacted files:
* `background_task_add_price.dart`: added field and parameter `bool bulkProofUpload`; set `readyForPriceTagValidation` as "priceTag and bulk"
* `price_bulk_proof_card.dart`: added warning about AI and image validation
* `price_model.dart`: added field `bool bulkProofUpload`
* `proof_bulk_add_page.dart`: added parameter `bulkProofUpload: true`
* Replaced parameter bulkProofUpload with readyForPriceTagValidation
Impacted files:
* `background_task_add_price.dart`: replaced parameter bulkProofUpload with readyForPriceTagValidation
* `price_bulk_proof_card.dart`: added a switch to change the value of readyForPriceTagValidation
* `price_model.dart`: readyForPriceTagValidation with getter and setter
* `proof_bulk_add_page.dart`: start with the default user value for readyForPriceTagValidation
* `user_preferences.dart`: storing the default user value for readyForPriceTagValidation
* minor fix
* Localization
* feat: 4679 - added a way to edit traces
New file:
* `simple_input_page_trace_helper.dart`: Implementation for "Traces" of an AbstractSimpleInputPageHelper.
Impacted files:
* `analytics_helper.dart`: added an entry for "traces"
* `app_en.arb`: added labels for "traces"
* `background_task_details.dart`: added an entry for "traces"
* `edit_product_page.dart`: added a button for "traces"
* `product_query.dart`: added entries for "traces"
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to off-dart 3.21.0, where we can edit traces
* `simple_input_page_helpers.dart`: added a warning "TODO" about the file being too big
* `up_to_date_changes.dart`: added an entry for "traces"
* stupid formatter error
* my bad, this time
* feat: 5411 - now uses nominatim location search if it looks like OSM type/id
New files:
* `location_list_nominatim_supplier.dart`: Asynchronously loads locations from Nominatim and OSM ids.
* `location_list_photon_supplier.dart`: Asynchronously loads locations from Photon and query searches.
* `location_osm_type_extension.dart`: Extension on LocationOSMType.
Impacted files:
* `location_list_supplier.dart`: turned class into abstract extended by both photon and nominatim.
* `location_map_page.dart`: now displays the OSM type + id.
* `location_query_model.dart`: now we may use Nominatim search instead of photon search.
* `location_query_page.dart`: minor refactoring
* minor refactoring
* Explanation banner for the product name
* Bad examples with the wrong title
* Reorder header icons
* Oops… dark mode
* Dark mode x2
* Fix "Nesquik" typo
* With banner
* Remove the warning icon from the Help modal sheet (too ugly)
* feat: 5855 - no visible product type filter by default
Impacted files:
* `background_task_price.dart`: minor unrelated fix due to off-dart 3.17.0
* `dao_product.dart`: we overwrite the products product_type with the server product type only if null
* `product_query.dart`: now retrieving product_type field in products found on a server
* `product_refresher.dart`: unrelated minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded off-dart to 3.17.0
* `search_product_helper.dart`: visible/invisible product type filter, by default invisible and working on food
* `user_preferences_dev_mode.dart`: on/off switch for visible product type filter, off by default
* Move the setting to "App settings"
---------
Co-authored-by: Edouard Marquez <moi@edouard-marquez.me>
Co-authored-by: Edouard Marquez <g123k@users.noreply.github.com>
* Allow to reorder the action bar
* + vibrations
* +1 more
* Improve the haptic error pattern
* And some vibrations to modal actions
* Remove a visual glitch
* Update packages/smooth_app/lib/l10n/app_en.arb
* fix: Update app_en.arb
* Fix build issue
---------
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
* feat: 5741 - respecting the "search products" access limitations
New file:
* `search_products_manager.dart`: Management of "search products" access limitations.
Impacted files:
* `background_task_download_products.dart`: refactored using `SearchProductsManager`
* `background_task_language_refresh.dart`: refactored using `SearchProductsManager`
* `background_task_top_barcodes.dart`: refactored using `SearchProductsManager`
* `lazy_counter.dart`: refactored using `SearchProductsManager`
* `paged_product_query.dart`: refactored using `SearchProductsManager`
* `product_list_page.dart`: refactored using `SearchProductsManager`
* `product_refresher.dart`: refactored using `SearchProductsManager`
* `pubspec.lock`: wtf
* fix: 5618 - category comparison for OxF
Impacted files:
* `background_task_language_refresh.dart`: explicitly setting the product_type
* `dao_product.dart`: made `productType` mandatory and not null for `put` and `putAll`
* `new_product_footer.dart`: fixed case with unexploitable `comparedToCategory` field
* `product_list_page.dart`: explicitly setting the product_type
* `product_refresher.dart`: explicitly setting the product_type
* `pubspec.lock`: wtf
* `query_product_list_supplier.dart`: explicitly setting the product_type
* fix: 5617 - share link to correct Oxf server
* fix: 5617 - share link to correct Oxf server
Impacted files:
* `app_en.arb`: added labels for sharing an Oxf product
* `new_product_footer.dart`: now displaying a correct label for product sharing - in addition to correct url
* `product_query.dart`: added labels for sharing an Oxf product
* `pubspec.lock`: wtf
* `pubspec.yaml`: downgraded sentry_flutter from problematic version
---------
Co-authored-by: Edouard Marquez <g123k@users.noreply.github.com>
* feat: 5639 - storing the latest selected product type
Impacted files:
* `search_product_helper.dart`: initialized and set the latest selected product type
* `user_preferences.dart`: new preference field where we store the latest selected product type
* minor fix
New file:
* `background_task_queue.dart`: Queues for Background Tasks.
Impacted files:
* `background_task.dart`: now we add tasks to a specific queue
* `background_task_add_other_price.dart`: assigned to `BackgroundTaskQueue.fast`
* `background_task_add_price.dart`: assigned to `BackgroundTaskQueue.slow`
* `background_task_badge.dart`: minor refactoring
* `background_task_crop.dart`: assigned to `BackgroundTaskQueue.fast`
* `background_task_details.dart`: assigned to `BackgroundTaskQueue.fast`
* `background_task_download_products.dart`: assigned to `BackgroundTaskQueue.longHaul`
* `background_task_full_refresh.dart`: assigned to `BackgroundTaskQueue.longHaul`
* `background_task_hunger_games.dart`: assigned to `BackgroundTaskQueue.fast`
* `background_task_image.dart`: assigned to `BackgroundTaskQueue.slow`
* `background_task_language_refresh.dart`: assigned to `BackgroundTaskQueue.longHaul`
* `background_task_manager.dart`: now using new class `BackgroundTaskQueue` in order to use multiple queues
* `background_task_offline.dart`: assigned to `BackgroundTaskQueue.longHaul`
* `background_task_refresh_later.dart`: assigned to `BackgroundTaskQueue.fast`
* `background_task_top_barcodes.dart`: assigned to `BackgroundTaskQueue.longHaul`
* `background_task_unselect.dart`: assigned to `BackgroundTaskQueue.fast`
* `dao_string_list.dart`: added 2 queues
* `local_database.dart`: now running all queues
* `local_database_mock.dart`: minor refactoring
* `offline_tasks_page.dart`: now taking queues into account
* `up_to_date_mixin.dart`: now running all queues
* `user_preferences_page.dart`: now running all queues
New file:
* `work_type.dart`: Type of long download work for some background tasks.
Impacted files:
* `background_task.dart`: removed the default `uriProductHelper` getter
* `background_task_barcode.dart`: added a `uriProductHelper` getter that depends on the `productType`
* `background_task_download_products.dart`: refactored the access to product type
* `background_task_full_refresh.dart`: split by product type
* `background_task_language_refresh.dart`: split by product type
* `background_task_offline.dart`: refactored the access to product type
* `background_task_progressing.dart`: added the `productType` parameter; moved code to new `WorkType` class
* `background_task_top_barcodes.dart`: refactored the access to product type
* `dao_product.dart`: new methods `getProductTypes` and `splitAllProducts`; refactored with product type
* `lazy_counter.dart`: explicitly counting the "food" products
* `newsfeed_provider.dart`: explicitly getting the news from "food"
* `offline_data_page.dart`: now displaying "download top N products" buttons for each product type; stats for each product type
* `offline_tasks_page.dart`: enhanced "work text" algo, now depending on product type
* `operation_type.dart`: enhanced "key" algo, now depending on product type
* `ordered_nutrients_cache.dart`: explicitly using the "food" nutrients
* `product_list_page.dart`: now reloading products from their server
* `product_list_popup_items.dart`: now linking to the first server with products
* `product_query.dart`: made product type a mandatory parameter
* `product_refresher.dart`: added mandatory parameter product type
* `random_questions_query.dart`: explicitly ask for "food" robotoff products
* `temp_product_list_share_helper.dart`: added mandatory parameter product type
* `user_preferences_dev_debug_info.dart`: added explicit use of "food" data
Impacted files:
* `get_prices_model.dart`: added a `LazyCounterPrices?` parameter
* `lazy_counter.dart`: added a `bool notify` parameter
* `lazy_counter_widget.dart`: now refreshed by "external" new count
* `price_user_button.dart`: added a `LazyCounterPrices` parameter to have the counter refreshed
* `product_prices_list.dart`: now setting the lazy counter when displaying the list
* `user_preferences.dart`: added a `bool notify` parameter for the lazy counter setter
* `user_preferences_account.dart`: added a `LazyCounterPrices` parameter to have the counter refreshed
Impacted files:
* `add_basic_details_page.dart`: added product type
* `add_new_product_page.dart`: added a "set product type page" for new products; added product type; minor refactoring
* `add_other_details_page.dart`: added product type
* `app_en.arb`: added 1 label per product type, and 4 labels for product type input
* `background_task_barcode.dart`: added product type
* `background_task_crop.dart`: added product type
* `background_task_details.dart`: added product type
* `background_task_hunger_games.dart`: added product type
* `background_task_image.dart`: added product type
* `background_task_refresh_later.dart`: added product type
* `background_task_unselect.dart`: added product type
* `background_task_upload.dart`: added product type
* `edit_new_packagings.dart`: added product type
* `edit_ocr_page.dart`: added product type
* `image_crop_page.dart`: added product type
* `nutrition_page_loaded.dart`: added product type
* `product_crop_helper.dart`: added product type
* `product_dialog_helper.dart`: removed irrelevant nutriscore and ecoscore logos for new found products, as we cannot say already if it's food
* `product_image_button.dart`: added product type
* `product_image_carousel_item.dart`: added product type
* `product_image_crop_button.dart`: added product type
* `product_image_gallery_view.dart`: added product type
* `product_image_local_button.dart`: added product type
* `product_image_unselect_button.dart`: added product type
* `product_image_viewer.dart`: added product type
* `product_query.dart`: localized labels for product type
* `simple_input_page.dart`: added product type
* `simple_input_page_helpers.dart`: added product type
* `up_to_date_changes.dart`: added product type
* `uploaded_image_gallery.dart`: added product type
Impacted files:
* `category_product_query.dart`: refactored with new `productType` parameter
* `keywords_product_query.dart`: refactored with new `productType` parameter
* `paged_product_query.dart`: refactored with new `productType` parameter
* `paged_search_product_query.dart`: refactored with new `productType` parameter
* `paged_to_be_completed_product_query.dart`: refactored with new `productType` parameter
* `paged_user_product_query.dart`: refactored with new `productType` parameter
* `product_list.dart`: refactored with new `productType` parameter
* `product_query.dart`: added a "get label" method for `ProductType`
* `search_field.dart`: displayed the new optional "additional filter" (e.g. OxF)
* `search_helper.dart`: added a new optional "additional filter"
* `search_product_helper.dart`: new "product type filter" widget
* `summary_card.dart`: minor "productType" fix
* `user_preferences_account.dart`: added "productType.food" to user page counts
* `user_preferences_contribute.dart`: added "productType.food" to "to be completed" products
Impacted files:
* `app_en.arb`: added a label for "location broader search"
* `app_fr.arb`: added a label for "location broader search"
* `dao_osm_location.dart`: added columns osmKey and osmValue
* `local_database.dart`: upgraded the version in order to add columns to location table
* `location_list_supplier.dart`: added optional parameters for optimized search; added fields osmKey and osmValue
* `location_query_model.dart`: now we use 2 suppliers - optimized and broader
* `location_query_page.dart`: now display optimized results first, then broader results after a button click
* `osm_location.dart`: added fields osmKey and osmValue
Impacted files:
* `add_basic_details_page.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `background_task.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `background_task_download_products.dart`: saved new field `Product.productType`
* `dao_product.dart`: now we're storing the `Product.productType` field
* `edit_new_packagings.dart`: now using new field `Product.productType`
* `edit_new_packagings_component.dart`: now using new field `Product.productType`
* `edit_product_page.dart`: specific icon for "food" categories; no nutrition for "beauty" and "product"
* `forgot_password_page.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `lazy_counter.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `login_result.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `newsfeed_provider.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `ocr_ingredients_helper.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `ocr_packaging_helper.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `onboarding_data_product.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `ordered_nutrients_cache.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `paged_product_query.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `product_cards_helper.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `product_image_crop_button.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `product_image_gallery_other_view.dart`: now using new field `Product.productType`
* `product_image_other_page.dart`: now using new field `Product.productType`
* `product_image_server_button.dart`: now using new field `Product.productType`
* `product_image_widget.dart`: now using new field `Product.productType`
* `product_list_page.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `product_query.dart`: now when we look for a barcode (or refresh a product), we use all productTypes if needed
* `product_refresher.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded `openfoodfacts` to `3.15.0` for new `Product.productType` field
* `sign_up_page.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `simple_input_page_helpers.dart`: new class dedicated to non-food categories
* `simple_input_text_field.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `simple_input_widget.dart`: now using new field `Product.productType`
* `temp_product_list_share_helper.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
* `uploaded_image_gallery.dart`: now using new field `Product.productType`
* `user_preferences_dev_debug_info.dart`: replaced getter `ProductQuery.uriProductHelper` with method `ProductQuery.getUriProductHelper`
New files:
* `lazy_counter.dart`: Lazy Counter, with a cached value stored locally, and a call to the server.
* `lazy_counter_widget.dart`: Widget displaying a Lazy Counter: cached value, refresh button, and loading.
Impacted files:
* `user_preferences.dart`: added methods about storing a lazy count value
* `user_preferences_account.dart`: refactored the display of counts with the new `LazyCounter` and `LazyCounterWidget` classes