14 Commits

Author SHA1 Message Date
e3bc40fdf3 chore: Migration to Dart 3.8 (#6668)
* Migration to Dart 3.8

* New GA

* Fix dartdoc
2025-06-23 18:14:17 +02:00
9db5c5ef9e feat: 5553 - add prices for category products (#6552)
* feat: 5553 - add prices for category products

New files:
* `price_category_input_page.dart`: Page that lets the user type in and select a single category for prices.
* `price_per_extension.dart`: Extension for PricePer.

Impacted files:
* `app_en.arb`: added 4 labels related to category and prices
* `app_fr.arb`: added 4 labels related to category and prices
* `background_task_add_other_price.dart`: added parameters related to category prices
* `background_task_add_price.dart`: added parameters related to category prices
* `background_task_price.dart`: added parameters related to category prices
* `price_add_product_card.dart`: added an "add category product" button
* `price_amount_card.dart`: added a DropDownButton for "price per" for category product
* `price_amount_model.dart`: taken category prices into consideration
* `price_existing_amount_card.dart`: unrelated localization
* `price_meta_product.dart`: added a new meta product, related to category
* `price_model.dart`: added parameters related to category prices
* `smooth_autocomplete_text_field.dart`: added an "onSelected" optional parameter, in order to be able to select immediately a suggestion
* `smooth_dropdown.dart`: added an "isExpanded" optional parameter, in order to match the screen width

* minor refactoring and localizations

Impacted files:
* `app_en.arb`: additional translations for "price per"
* `app_fr.arb`: additional translations for "price per"
* `price_existing_amount_field.dart`: localization
* `price_meta_product.dart`: minor refactoring
* `price_per_extension.dart`: additional translations for "price per"

* reformatting

* added origins and prepared code for labels

Impacted files:
* `app_en.arb`: improved a label and added 3 labels
* `app_fr.arb`: improved a label and added 3 labels
* `background_task_add_other_price.dart`: now setting origins and labels
* `background_task_add_price.dart`: now setting origins and labels
* `background_task_price.dart`: now setting origins and labels
* `price_add_product_card.dart`: refactored as we now set origins too (in addition to just category)
* `price_category_input_page.dart`: refactored as we now set origins too (in addition to just category)
* `price_existing_amount_card.dart`: display origins too
* `price_meta_product.dart`: now setting and displaying origins too
* `price_model.dart`: we now set origins too, and prepared code for labels when ready on the "prices" side
* `price_product_list_tile.dart`: now displaying origins too

* someone moved a file and that's not nice ;)

* explicit 1 line for autocomplete
2025-06-12 18:13:26 +02:00
4cef8f04e7 fix: 6281 LateError: LateInitializationError (#6287)
* Multi-lingual input for product name

* Fix LateError: LateInitializationError
2025-01-26 12:35:24 +01:00
af4e8c3aa3 fix: Harmonize owner field icon + bugfixes (#6175)
* Harmonize owner field icon

* Margin fix

* Remove warnings

* Fix Login/Signup pages

* Emojis disabled + text capitalization
2025-01-11 12:07:08 +01:00
5ddb5127ec New UI for ingredients (#6156) 2025-01-08 13:38:50 +01:00
1f8ad04833 feat: UI improvements for the edit mode (bis) (#6147)
* Improvements for Edit mode (once again)

* Basic details improvements

* Basic details hints

* Force the new layout on subpages
2025-01-07 14:14:46 +01:00
d1ebb689d9 feat: UI improvements for the edit mode (#6132)
* UI improvements for the edit mode

* Better website input

* Some comments + minor fixes

* Add missing bottom space

* Fix page padding

* Help is better embedded

* Change ingredients instructions
2025-01-06 20:20:01 +01:00
57e13ea164 feat: Product page: notify when there are pending operations (#5947)
* Product page: notify when there are pending operations

* Fix warning
2024-11-27 22:51:51 +01:00
45b7e7b39e feat: 5430 - "producer provided" icon for nutrients and 4 product fields (#5777)
* feat: 5430 - "producer provided" icon for nutrients and 4 product fields

Impacted files:
* `add_basic_details_page.dart`: display "producer provided" icon for name, brands and quantity
* `nutrition_page_loaded.dart`: display "producer provided" icon for serving size and each individual nutrient
* `product_query.dart`: set the icon to display when a product field value is "producer provided"
* `smooth_autocomplete_text_field.dart`: added parameter `suffixIcon`
* `smooth_text_form_field.dart`: added parameter `suffixIcon`

* Minor code cleaning

* Minor code cleaning

* Standard info tile about "owner fields"

New file:
* `owner_field_info.dart`: Standard info tile about "owner fields".

Impacted files:
* `add_basic_details_page.dart`: now displaying `OwnerFieldInfo` if relevant; minor refactoring
* `nutrition_page_loaded.dart`: now displaying `OwnerFieldInfo` if relevant; minor refactoring
* `product_query.dart`: moved field to new file `owner_field_info.dart`

* translations and semantics

Impacted files:
* add_basic_details_page.dart: added semantics
* app_en.arb: 2 new labels for "owner field info"
* nutrition_page_loaded.dart: added semantics
* owner_field_info.dart: translated labels

* typo fix
2024-11-11 11:48:27 +01:00
9cbcf75d5d feat: Disallow emojis on brand name (#5461)
* Disallow emojis on brand name

* Fix Lint warning
2024-07-23 09:54:25 +02:00
432e9bbf0d feat: 5005 - "obsolete product" matomo event (#5042)
* feat: 5005 - "obsolete product" matomo event

Impacted files:
* `analytics_helper.dart`: added an "obsolete product" matomo event
* `barcode_product_query.dart`: sent an "obsolete product" matomo event when relevant
* `product_query.dart`: added the new OBSOLETE product field to the fields we retrieve
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to openfoodfacts 3.4.0

* refactor: now using AutocompleteManager
2024-02-12 18:51:51 +01:00
e15488efd1 In the search field, when a suggestion is selected, the loader should not be visible (#5022) 2024-01-29 20:18:14 +01:00
56a98535aa refactor: UnfocusWhenTapOutside becomes UnfocusFieldWhenTapOutside (#4916)
* `UnfocusWhenTapOutside` becomes `UnfocusFieldWhenTapOutside`

* Fix unused import

* Renamed original class and fix import

---------

Co-authored-by: Aman Raj <57723319+AshAman999@users.noreply.github.com>
2024-01-15 13:18:09 +01:00
255484897e feat: 4068 - autocomplete for brands (#4871)
* feat: 4068 - autocomplete for brands

New files:
* `agnostic_suggestion_manager.dart`: Suggestion manager for "old" and elastic search taxonomies.
* `brand_suggestion_manager.dart`: Manager that returns the elastic suggestions for the latest brand input.
* `smooth_autocomplete_text_field.dart`: Autocomplete text field. Code largely moved from `simple_input_text_field.dart`.
* `unfocus_when_tap_outside.dart`: Allows to unfocus TextField (and dismiss the keyboard). Code moved from `simple_input_text_field.dart`.

Impacted files:
* `add_basic_details_page.dart`: added elastic autocomplete for brands
* `edit_new_packagings.dart`: minor refactoring
* `paged_to_be_completed_product_query.dart`: minor refactoring
* `paged_user_product_query.dart`: minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: ugraded to openfoodfacts 3.2.1
* `simple_input_page.dart`: minor refactoring
* `simple_input_text_field.dart`: moved most of the code to new class `SmoothAutocompleteTextField` in order to deal also with elastic search autocompletion.

* feat: 4068 - minor fixes after review

* Update packages/smooth_app/lib/pages/input/brand_suggestion_manager.dart

---------

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2023-12-21 15:45:00 +01:00