40 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
b9d83a45ce fix: 6413 - hiding "install OxF" links (#6435) 2025-03-10 15:16:32 +01:00
0c6cf073d4 feat: Use a WebView for OFF links (#6211)
* Use a WebView for KP links

* FAQ links
2025-01-19 12:17:13 +01:00
e45c39ae1b Fix OPF link (#6237) 2025-01-19 12:16:31 +01:00
eb0a8bf2b1 fix: FAQ: Open the correct variant of the website (#6134)
* Open the correct variant of the website

* Update packages/smooth_app/lib/pages/preferences/user_preferences_faq.dart

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>

* Fix style

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2025-01-06 20:20:29 +01:00
61f9af21f2 Give access to the NutriScore v2 guide in France (#6117) 2025-01-04 10:35:39 +01:00
baea968433 Eco-Score -> Green Score (#6072) 2024-12-27 22:24:37 +01:00
a6569866d4 feat: Upgrade the Flutter version to 3.24 (#5613)
* Let's migrate the app to Flutter 3.24

* `openfoodfacts_flutter_lints` from the `main` branch

* A fix for `/// For the world view`
2024-09-26 16:48:01 +02:00
4b4f387c01 Hide the NutriScore V2 guide in France (#5399) 2024-06-18 15:54:52 +02:00
621184c28c chore: A better name for NutriScore v2 guide in the FAQ (#5380)
* A better name for NutriScore v2 guide in the FAQ

* Hide the icon

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

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2024-06-15 18:07:18 +02:00
1728eff579 Replace all MediaQuery.of(context).size with MediaQuery.sizeOf(context) (#5328) 2024-06-03 17:09:37 +02:00
6274c736e7 Share link + Analytics event (#5303) 2024-05-28 18:44:58 +02:00
2429276d04 Shortcut to Nutriscore V2 guide in the FAQ + generic way to access the NutriScore logo (#5284) 2024-05-24 09:00:22 +02:00
11b1212d4f refactor: 5075 - explicit localization of OFF world links (#5076)
* refactor: 5075 - explicit localization of OFF world links

Impacted files:
* `external_page.dart`: removed useless parameter
* `knowledge_panel_text_card.dart`: removed useless parameter
* `knowledge_panel_world_map_card.dart`: removed useless parameter
* `launch_url_helper.dart`: removed useless parameter; removed redundant method
* `loading_dialog.dart`: removed useless parameter
* `login_page.dart`: removed useless parameter
* `new_product_page.dart`: removed useless parameter
* `smooth_html_widget.dart`: removed useless parameter
* `smooth_product_carousel.dart`: removed useless parameter
* `user_preferences_account.dart`: explicitly localized the OFF world subdomain
* `user_preferences_connect.dart`: removed useless parameter
* `user_preferences_contribute.dart`: removed useless parameter
* `user_preferences_faq.dart`: explicitly localized the OFF world subdomain; removed useless parameter
* `website_card.dart`: removed useless parameter

* Update user_preferences_faq.dart

Removed one parameter.
2024-02-20 06:55:46 +01:00
494acb885e Add privacy policy link in app (#5074) 2024-02-19 17:49:38 +01:00
346c6e30c4 fix: 1815 - around context.mounted (#4768)
* fix: 1815 - around context.mounted

The PR is about two related topics:
* Removing all the `ignore: use_build_context_synchronously`
* Replacing all the `State<StatefulWidget> widget` by `BuildContext context`, now that it's possible in flutter

* Update packages/smooth_app/lib/pages/onboarding/permissions_page.dart

* format fix
2023-11-15 11:50:00 +01:00
1096948f0d feat: 4513 - new "preferences search" page from dev mode (#4640)
* feat: 4513 - new "preferences search page" from dev mode

Deleted files:
* `user_preferences_camera_sound.dart`
* `user_preferences_crash_reporting.dart`
* `user_preferences_haptic_feedback.dart`
* `user_preferences_send_anonymous.dart`

New files:
* `user_preferences_item.dart`: Item for preferences, with labels for pre-filtering and widget builder.
* `user_preferences_search_page.dart`: Search page for preferences, with TextField filter.

Impacted files:
* `abstract_user_preferences.dart`: new `getLabels` method for filtering; children are now `UserPreferencesItem` for filtering; minor refactoring.
* `user_preferences_account.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_advanced_settings.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_attribute_group.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_choose_accent_color.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_choose_app_theme.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_choose_text_color_contrast.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_connect.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_contribute.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_country_selector.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_dev_mode.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_faq.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_food.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_image_source.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_language_selector.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_page.dart`: moved `getUserPreferences` to `PreferencePageType`; minor refactoring
* `user_preferences_rate_us.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_settings.dart`: children are now `UserPreferencesItem`; minor refactoring
* `user_preferences_share_with_friends.dart`: added a static `UserPreferencesItem` getter
* `user_preferences_widgets.dart`: new classes `UserPreferencesItemSwitch` and `UserPreferencesItemTile`

* Update packages/smooth_app/lib/pages/preferences/user_preferences_page.dart
2023-09-19 08:40:25 +02: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
8193cf1364 feat: 4551 - minor cosmetic changes on settings display (#4589)
* feat: 4551 - minor cosmetic changes on settings display

Impacted files:
* `app_en.arb`: new "join the skill pool" label
* `user_preferences_connect.dart`: added dividers; changed the newsletter icon; same email icon everywhere
* `user_preferences_contribute.dart`: added "contribute" and a "join the pool" items; minor refactoring
* `user_preferences_faq.dart`: changed the "feedback" icon

* feat: 4551 - changed one icon

* feat: 4551 - smaller nutrient icon (from 2 to 1.5 = -25%)

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

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2023-08-22 15:01:32 +02:00
369f14599c feat: 4554 - new links in FAQ (#4572)
* feat: 4554 - new links in FAQ

Impacted files:
* `app_en.arb`: added labels for the 9 new items
* `app_fr.arb`: added labels for 4 new items
* `user_preferences_faq.dart`: added 9 items; fixed 2 items
* `product_query.dart`: new `replaceSubdomain` method

* feat: 4554 - new icons for app install

Impacted files:
* `RVB_ICON_BLACK_BG_OBF.svg`: dark version of Beauty app icon
* `RVB_ICON_BLACK_BG_OPF.svg`: dark version of Product app icon
* `RVB_ICON_BLACK_BG_OPFF.svg`: dark version of Pet Food app icon
* `RVB_ICON_WHITE_BG_OBF.svg`: light version of Beauty app icon
* `RVB_ICON_WHITE_BG_OPF.svg`: light version of Product app icon
* `RVB_ICON_WHITE_BG_OPFF.svg`: light version of Pet Food app icon
* `user_preferences_faq.dart`: new icons for app install, dark and light

* feat: 4554 - new icon layout

Impacted file:
* `user_preferences_faq.dart`: all icons are now centered on a 48x48 square, the real icons have the standard size, and the svg icons have a width of 48

* feat: 4554 - new 5 items for the contact page

Impacted files:
* `app_en.arb`: added labels for the new 5 items
* `user_preferences_connect.dart`: added 5 items
* `user_preferences_faq.dart`: minor refactoring
2023-08-19 10:17:18 +02:00
9c6138d0da Terms of use+legal notices (#4559) 2023-08-17 11:30:52 +02:00
e265e75dbd feat: Improvements for a11n on preferences (#4550)
* Ensure all items in the preferences behave the same + a hint for screen readers

* Regenerate goldens
2023-08-16 12:16:23 +02:00
7815266a2f feat: Add some consistency between dialogs in the profile (#4458)
* Add some consistency between dialogs in the profile

* Update goldens

* (Re) update goldens
2023-08-06 13:28:01 +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
63b65e6f79 fix: Stronger F-Droid analytics rules (#3902)
Co-authored-by: Cirrus CI <support@cirruslabs.org>
2023-04-24 19:43:34 +02:00
1734a20381 ci: Return to entrypoint based scanner (#3874)
* ci: Return to entrypoint based scanner

* Update basic_test.dart
2023-04-14 17:07:37 +02:00
ad7ac7732a refactor: Flutter v3.7.0 (#3642) 2023-01-31 22:39:07 +01:00
c607be95b0 feat: added feedback form links (#3487)
* added feedback form links

* formated code

* localization

* feedback form link function

* removed unwanted imports

* new class file for userfeedbacklink

* fix: Imports

Co-authored-by: Marvin Möltgen <39344769+M123-dev@users.noreply.github.com>
2023-01-14 16:40:04 +01:00
a35b7db371 ci: Show flavour in about this app and sentry (#3429)
Co-authored-by: Aman Raj <57723319+AshAman999@users.noreply.github.com>
2022-12-10 11:14:22 +01:00
e3564e53a4 refactor: Make smooth_app a module (also called step 1) (#3101)
* Make smooth_app a module (also called step 1)

Android impl is OK.
Still have to check for iOS and tests

* Fix scan sound not working

* Fix ci/pub_upgrade.sh issues

* Fix tests

* Some doc

* Fix build actions

* Fix iOS build

* Fix warnings

* Fix Flutter analyze

* Fix typo

* The CI needs at least one test

Co-authored-by: Marvin Möltgen <39344769+M123-dev@users.noreply.github.com>
2022-10-13 18:33:14 +02:00
8446b3082a fix: #2575 - fixed brightness check for app icon (#2579)
Impacted file:
* `user_preferences_faq.dart`: fixed brightness check for app icon
2022-07-11 11:45:35 +02:00
f1469289b7 Fixes for the About Dialog (#2468) 2022-07-02 19:03:50 +02:00
fe3c986d72 feat: #2056 - added color to preference headers (#2069)
Impacted files:
* `abstract_user_preferences.dart`: added optional header asset and color methods
* `user_preferences_connect.dart`: implemented header asset and color
* `user_preferences_contribute.dart`: implemented header asset and color
* `user_preferences_faq.dart`: implemented header asset and color
* `user_preferences_page.dart`: fine-tuned the display of header with color
* `welcome_page.dart`: unrelated overflow fix
* 6 golden files refreshed
2022-05-30 16:41:01 +02:00
6bff6070aa feat: #2042 - icons for preference items (#2048)
* feat: #2042 - icons for preference items

New files:
* `attribute_group_list_tile.dart`: Custom `ListTile` for attribute groups in preferences.
* `instagram-camera.svg`
* `twitter-bird.svg`

Impacted files:
* `abstract_user_preferences.dart`: new protected method `getLeadingIconData`; refactored
* `all_user_product_list_page.dart`: refactored
* `user_preferences_account.dart`: implemented `getLeadingIconData`
* `user_preferences_attribute_group.dart`: now using new class `AttributeGroupListTile`
* `user_preferences_connect.dart`: implemented `getLeadingIconData`; added leading icons for items
* `user_preferences_contribute.dart`: implemented `getLeadingIconData`; added leading icons for items
* `user_preferences_dev_mode.dart`: implemented `getLeadingIconData`
* `user_preferences_faq.dart`: implemented `getLeadingIconData`; added leading icons for items
* `user_preferences_food.dart`: implemented `getLeadingIconData`
* `user_preferences_list_tile.dart`: simplified
* `user_preferences_page-blue-dark.png`: golden refresh
* `user_preferences_page-blue-light.png`: golden refresh
* `user_preferences_page-brown-dark.png`: golden refresh
* `user_preferences_page-brown-light.png`: golden refresh
* `user_preferences_page-green-dark.png`: golden refresh
* `user_preferences_page-green-light.png`: golden refresh
* `user_preferences_settings.dart`: implemented `getLeadingIconData`
* `user_preferences_user_lists.dart`: implemented `getLeadingIconData`; refactored
2022-05-28 17:13:08 +02:00
b007de2af6 feat: #2030 - added logo to 5 preference pages (#2036)
New files:
* `contact.svg`
* `contribute.svg`
* `faq.svg`
* `login.svg`
* `main.svg`

Impacted files:
* `login_page.php`: added logo
* `pubspec.yaml`: added asset folder
* `user_preferences_connect.dart`: added logo
* `user_preferences_contribute.dart`: added logo
* `user_preferences_faq.dart`: added logo
* `user_preferences_page.dart`: added logo
* + golden test files
2022-05-28 13:17:25 +02:00
1c3f3d542b fix: Visual issues (again) (#2018)
* About app dialog: OK button as positive / Licenses as negative

* Fix visual issues
2022-05-26 22:21:16 +02:00
aedd8391b7 Add the user id (or email) to the profile (#1849) 2022-05-25 19:39:27 +02:00
818cd13979 feat: Harmonize app dialogs (#1978)
* Harmonize app dialogs

* Flat/text button for negative & neutral states
+ fix a missing image

* Remove unused SmoothActionButton implementation

* Fix build issues
2022-05-25 12:43:12 +02:00
c2f85c5d92 fix: #1816 - removed "support" item, changed "faq" link (#1818)
Impacted file:
* `user_preferences_faq.dart`
2022-05-12 14:35:36 +02:00
c43ad920ed feat: #1501 - refactored user preferences files into a dedicated folders (#1812) 2022-05-11 08:22:34 +02:00