27 Commits

Author SHA1 Message Date
1b70203d0b fix: 6784 - readyForPriceTagValidation true only for priceTag and bulk (#6794)
* 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
2025-07-30 15:35:38 +02:00
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
cfea953005 feat: Redesign the product page to integrate tabs - M2 (#6356)
Co-authored-by: adriendev <privateadrienps@gmail.com>
Co-authored-by: Adrien MICHEL <developpeuradrien@gmail.com>
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2025-06-20 09:56:30 +02:00
097dc91b85 Revert "feat: Product page redesign" (#6332) 2025-02-04 11:17:34 +01:00
90fb5d4c43 Merge branch 'develop' into develop 2025-02-04 08:41:07 +01:00
d8e101666e Languages selector in a modal sheet (#6316) 2025-01-30 16:36:00 +01:00
59cbd305e6 Tab order saved locally 2025-01-29 14:40:40 +01:00
74fe8560be feat: Multi-lingual input for product name + help banner (#6286)
* 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)
2025-01-27 08:01:05 +01:00
40ce1fa387 Tagline: support "min_launches" attribute (#6236) 2025-01-19 12:15:14 +01:00
538e14b04b The access to Robotoff from the Product page is only via the banner (= the button is removed) (#5940) 2024-11-27 18:50:03 +01:00
5a0ba55e96 feat: 5855 - no visible product type filter by default (#5878)
* 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>
2024-11-19 08:34:13 +01:00
d6446baeb9 feat: Allow to reorder the action bar (#5826)
* 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>
2024-11-11 19:23:22 +01:00
446a8c09d1 feat: 5639 - storing the latest selected product type (#5752)
* 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
2024-10-27 16:16:19 +01:00
db080d2d09 fix: 5634 - refresh of price lazy counters when accessing lists (#5678)
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
2024-10-13 19:33:14 +02:00
74660f80d0 fix: 5554 - display of cached counts on user page (#5573)
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
2024-09-11 11:53:24 +02:00
ca749bca0d Save the date when the language is changed (#5443) 2024-07-04 15:30:37 +02:00
b110334c3d feat: A feedback form for the prices page (#5442)
* A feedback form for the prices page

* Fix
2024-06-25 08:22:11 +02:00
ba8313c0b2 Depending of the state of preferences, the onboarding exit may fail (#5433) 2024-06-22 09:40:37 +02:00
6026fbc91b fix: Fix issues with themes (#5410)
* Fix issues with themes

* Reformat code
2024-06-19 10:07:31 +02:00
41abf730fe feat: Tagline V3 (#5350)
* New JSON

* Tagline V3

* Refresh the tagline on language change

* Fix Lint errors

* Revert `SmoothScaffold` changes

* Filter news with startDate/endDate
2024-06-10 15:19:24 +02:00
e94d61fa11 feat: 5318 - added a "price privacy warning" dialog (#5343)
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
2024-06-08 15:20:43 +02:00
e3f01ce061 feat: 5200 - currency selector (#5236)
New files:
* `currency_selector.dart`: A selector for selecting user's currency.
* `user_preferences_currency_selector.dart`: Currency selector within user preferences.

Impacted files:
* `app_en.arb`: added 2 labels for the currency selector
* `country_selector.dart`: fixed discrepancies between selector display
* `user_preferences.dart`: new "user currency code" getter/setter
* `user_preferences_settings.dart`: added currency selector
* `welcome_page.dart`: fixed discrepancies between selector display
2024-05-10 10:34:24 +02:00
f1d09923cc feat: 5095 - matomo anonymous visitor id now starts with a persistent letter (#5107)
Impacted files:
* `analytics_helper.dart`: new getter `_anonymousVisitorId`; refactoring
* `main.dart`: minor refactoring
* `user_preferences.dart`: new method `getUniqueRandom()` that is used to compute and store the first letter of the anonymous visitor ID.
2024-03-08 17:06:54 +01:00
c485ebf793 chore: old TODOs (#4886)
Impacted files:
* `knowledge_panel_world_map_card.dart`: handled the "multi geo" case; fixed the geo marker alignment
* `permission_helper.dart`: removed comment
* `pubspec.lock`: wtf
* `pubspec.yaml`: added package `email_validator`
* `svg_safe_network.dart`: minor refactoring
* `user_management_helper.dart`: now using package `email_validator`
* `user_preferences.dart`: replaced hard-coded string with const
* `user_preferences_attribute_group.dart`: removed dead code
2023-12-12 13:11:06 +01:00
60971d1344 feat: 4628 - new "reorder KP" feature from dev mode (#4778)
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
2023-12-08 16:25:44 +01:00
05d0490080 feat: 4513 - user preferences pages simple refactoring (#4620)
New files:
* `user_preferences_advanced_settings.dart`: used to be `_AdvancedSettings` in `user_preferences_settings.dart`
* `user_preferences_camera_sound.dart`: used to be `_CameraPlayScanSoundSetting` in `user_preferences_settings.dart`
* `user_preferences_choose_accent_color.dart`: used to be `_ChooseAccentColor` in `user_preferences_settings.dart`
* `user_preferences_choose_app_theme.dart`: used to be more or less `_ChooseAppTheme` in `user_preferences_settings.dart`
* `user_preferences_choose_text_color_contrast.dart`: used to be `_ChooseTextColorContrast` in `user_preferences_settings.dart`
* `user_preferences_country_selector.dart`: used to be coded in `user_preferences_settings.dart`
* `user_preferences_crash_reporting.dart`: used to be `_CrashReportingSetting` in `user_preferences_settings.dart`
* `user_preferences_haptic_feedback.dart`: used to be `_HapticFeedbackSetting` in `user_preferences_settings.dart`
* `user_preferences_image_source.dart`: used to be coded in `user_preferences_settings.dart`
* `user_preferences_language_selector.dart`: used to be coded in `user_preferences_settings.dart`
* `user_preferences_rate_us.dart`: used to be `_RateUs` in `user_preferences_settings.dart`
* `user_preferences_send_anonymous.dart`: used to be `_SendAnonymousDataSetting` in `user_preferences_settings.dart`
* `user_preferences_share_with_friends.dart`: used to be `_ShareWithFriends` in `user_preferences_settings.dart`

Impacted files:
* `abstract_user_preferences.dart`: minor refactoring
* `preferences_page.dart`: minor refactoring
* `user_preferences.dart`: minor refactoring
* `user_preferences_account.dart`: removed `UserPreferencesSection` and `_UserPreferencesAccountSubTitleSignOut` for simplification
* `user_preferences_attribute_group.dart`: refactored as not `AbstractUserPreferences`
* `user_preferences_connect.dart`: minor refactoring
* `user_preferences_contribute.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: minor refactoring
* `user_preferences_faq.dart`: minor refactoring
* `user_preferences_food.dart`: minor refactoring
* `user_preferences_page.dart`: minor refactoring
* `user_preferences_settings.dart`: file was too big - moved code to new files+classes
2023-09-12 19:25:29 +02:00
78884a6ad2 feat: App review in the "scan card" (#4450)
* 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 🤨
2023-08-05 17:27:59 +02:00