35 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
d9648b14c6 feat: added shortcut link for community calendar (closes #5536) (#6472)
* Initial changes

* Links added successfully

* Final changes

* Reverted files

* Reverted files

* Final revert

* added description in translation files

* subscription to community calendar

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2025-03-26 08:43:55 +01:00
dff1c58a27 feat: Add Mastodon, TikTok, and BlueSky social media accounts to links and update assets (#6343)
* Add translations for new social media links

- Updated .arb files to include translations for Mastodon, TikTok, and Bluesky

* Add assets for Mastodon, TikTok, and Bluesky logos

- Added logo assets for Mastodon, TikTok, and Bluesky to the project

* Update 'Contact Us' page with new social media contacts

- Added Mastodon, TikTok, and Bluesky links to the 'Contact Us' page

* Revert "Add translations for new social media links"

This reverts commit a8c5dfe3e26ff99c1a722c961cf7411c9c216460.

* Add translations for new social media links

* Fix code formatting and indentation issues
2025-02-09 10:09:52 +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
d2ac037b74 Revert "chore: Revert Flutter bump to 3.22 (#5463)" (#5468)
This reverts commit 1a9091c09d0ad4addf46e85b90bc9075749ce153.
2024-07-04 15:28:58 +02:00
1a9091c09d chore: Revert Flutter bump to 3.22 (#5463)
This reverts commit 9e211ca29c5caf33c5ca7401ab92235ccb81cb27.
2024-07-04 10:33:23 +02:00
9e211ca29c chore: Bump Flutter version to 3.22 (#5458)
* Bump Flutter version to 3.22

* Migrate Material properties
2024-07-04 09:10:34 +02:00
44913afd77 chore: Moving email and newsletter up in contact page (#5111)
Co-authored-by: Gabriel Moraes <gmmoraes@Gabriels-Mac-mini.local>
2024-03-10 08:36:28 +01: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
527eb64c16 Change the email address for the contact form (#4793) 2023-11-15 12:15:07 +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
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
c5321805dc feat: 4533 - new twitter logo and label (#4539)
Deleted file:
* `twitter-bird.svg`

New file:
* `x-logo.svg`

Impacted files:
* `app_en.arb`: edited twitter label
* `user_preferences_connect.dart`: now using the new tinted twitter logo
2023-08-15 16:16:16 +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
c232320279 feat: add forum link to preferences (#3839) 2023-04-02 15:23:10 +02:00
3a0e71af09 feat: add copy to clipboard button for email (#3651)
-fix: when user clicks on X button also the no email application
dialog was showing up. now its solved using includepath variable.
if its null we will return.
- when user has no application the app shows a dialoge, saying user to
send email manually, so for thar copy to clipboard button added.
- onclick this button will copy the email to clipboard ans shows a
snackbar saying that the email is copied.
- add comment for awrapping up dialog content in scafflod

Co-authored-by: Marvin Möltgen <39344769+M123-dev@users.noreply.github.com>
2023-02-08 18:46:47 +01:00
ad7ac7732a refactor: Flutter v3.7.0 (#3642) 2023-01-31 22:39:07 +01:00
a5949dcee4 fix: 3494 pop dialog navigator properly (#3528)
Impacted file:
* `user_preferences_connect.dart`

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2023-01-06 18:19:50 +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
29d9e9c99e If no email application is installed, explain why we can't send an email. (#2865) 2022-08-30 19:55:46 +02:00
aa294b4e6e fix: localized title for email (#2691)
* fixes #2680

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

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>

* formatting issues fixed

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-08-01 15:20:44 +02:00
93590713f1 feat: Improved translations (#2272)
* Translation for email body

* Plurals support for refreshing history Snackbars

* Descriptions updated

* Add descriptions for each placeholder
2022-06-24 08:07:26 +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
5dba723fdf feat: More info about the app/device in email (#2188)
* More info about the app/device in the email

* Private getter

* Fix unused ref
2022-06-06 12:37:37 +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
aedd8391b7 Add the user id (or email) to the profile (#1849) 2022-05-25 19:39:27 +02:00
110723677e feat/#1976 - translatable instagram and twitter links (#1977) 2022-05-25 19:05:45 +02:00
dd8f09a21a fix: add URL of new responsive blog (#1975)
fix: add URL of new responsive blog (theme will be ready soon)
2022-05-25 12:40:10 +02:00
c43ad920ed feat: #1501 - refactored user preferences files into a dedicated folders (#1812) 2022-05-11 08:22:34 +02:00