59 Commits

Author SHA1 Message Date
4aae8f94a8 Bump project dependencies (#6726) 2025-07-10 11:38:43 +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
12c2569b81 feat: Added Matomo event for producers signups from the app (#6418)
* Added Matomo event for producers signups from the app

* Fixed formatting issues

---------

Co-authored-by: Abhishek Rathore <abhishek2525rathore@gmail.co>
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2025-06-12 18:08:04 +02:00
b3b9ed8ad9 feat: 4679 - added a way to edit traces (#6495)
* 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
2025-04-13 12:05:45 +02:00
e93f0692c4 feat: Added Robotoff nutrition extraction to nutrition edit page (#6366)
* Add robotoff nutrition extraction to nutrition edit page

* feat: Enhance nutrition extraction UI with loading indicators and improved nutrient handling

* feat: Add localized messages for nutrient extraction actions and results

* feat: Track robotoff nutrition extraction events and update UI components

* Removed duplicated translation entries

* feat: Refactor analytics tracking for Robotoff nutrition events
2025-03-02 14:47:52 +01:00
5846d304ad fix: 6020 - disable automatic report of failed http connections (#6378) 2025-02-18 08:55:01 +01:00
8681098bd6 App review is back (#6367) 2025-02-11 11:36:53 +01:00
baea968433 Eco-Score -> Green Score (#6072) 2024-12-27 22:24:37 +01:00
bab4fd879b feat: 5638 - 5 dimensions for matomo (#5837)
* feat: 5638 - 5 dimensions for matomo

Impacted files:
* `add_basic_details_page.dart`: minor refactoring
* `add_new_product_page.dart`: using new method `trackProductEvent`
* `add_other_details_page.dart`: minor refactoring
* `analytics_helper.dart`: new method `trackProductEvent`; added 5 dimensions to matomo event track methods
* `attribute_first_row_helper.dart`: minor refactoring
* `barcode_product_query.dart`: using new method `trackProductEvent`
* `edit_new_packagings.dart`: minor refactoring
* `edit_ocr_page.dart`: minor refactoring
* `edit_product_page.dart`: minor refactoring
* `new_product_footer.dart`: using new method `trackProductEvent`
* `nutrition_page_loaded.dart`: minor refactoring
* `product_field_editor.dart`: minor refactoring
* `product_image_gallery_view.dart`: minor refactoring
* `product_incomplete_card.dart`: using new method `trackProductEvent`
* `product_questions_widget.dart`: using new method `trackProductEvent`
* `simple_input_page.dart`: minor refactoring
* `summary_card.dart`: using new method `trackProductEvent`

* minor refactoring

* minor refactoring
2024-11-12 14:27:27 +01:00
06e9fea0fb chore(deps): bump uuid and matomo_tracker in /packages/smooth_app (#5505)
* chore(deps): bump uuid and matomo_tracker in /packages/smooth_app

Bumps [uuid](https://github.com/Daegalus/dart-uuid) and [matomo_tracker](https://github.com/Floating-Dartists/matomo-tracker). These dependencies needed to be updated together.

Updates `uuid` from 3.0.7 to 4.4.2
- [Release notes](https://github.com/Daegalus/dart-uuid/releases)
- [Changelog](https://github.com/daegalus/dart-uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Daegalus/dart-uuid/compare/3.0.7...4.4.2)

Updates `matomo_tracker` from 4.1.1 to 5.0.0-dev.2
- [Release notes](https://github.com/Floating-Dartists/matomo-tracker/releases)
- [Changelog](https://github.com/Floating-Dartists/matomo-tracker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Floating-Dartists/matomo-tracker/compare/4.1.1...5.0.0-dev.2)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: matomo_tracker
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* breaking change: int to string

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cirrus CI <support@cirruslabs.org>
2024-08-12 14:08:05 +02:00
5136e9d812 chore(deps): bump sentry_flutter from 7.18.0 to 8.3.0 in /packages/smooth_app (#5477)
* chore(deps): bump sentry_flutter in /packages/smooth_app

Bumps [sentry_flutter](https://github.com/getsentry/sentry-dart) from 7.18.0 to 8.3.0.
- [Release notes](https://github.com/getsentry/sentry-dart/releases)
- [Changelog](https://github.com/getsentry/sentry-dart/blob/main/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-dart/compare/7.18.0...8.3.0)

---
updated-dependencies:
- dependency-name: sentry_flutter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* minor fix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-authored-by: Cirrus CI <support@cirruslabs.org>
2024-07-07 21:08:34 +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
7a81c0c69f feat: 5014 - track all READ server queries when consented (#5057)
* feat: 5014 - track all READ server queries when consented

Impacted files:
* `analytics_helper.dart`: added a public static `isEnabled` method
* `background_task.dart`: now explicitly using the WRITE user
* `background_task_download_products.dart`: now explicitly using the READ user
* `background_task_top_barcodes.dart`: now explicitly using the READ user
* `brand_suggestion_manager.dart`: now explicitly using the READ user
* `ocr_helper.dart`: now explicitly using the READ user
* `paged_product_query.dart`: now explicitly using the READ user
* `product_list_page.dart`: now explicitly using the READ user
* `product_query.dart`: split the user into READ and WRITE users
* `product_refresher.dart`: now explicitly using the READ user
* `random_questions_query.dart`: now explicitly using the READ user
* `simple_input_text_field.dart`: now explicitly using the READ user
* `user_management_provider.dart`: now explicitly using the WRITE user
* `user_preferences_account.dart`: now explicitly using the WRITE user

* minor refactoring

* merge conflicts desperate fix
2024-02-13 20:24:26 +01: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
0ea1967d1d fix: Add hunger game analytics event and track it (#5004)
* fix:4682 Add hunger game analytics event and track it

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

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

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2024-01-25 17:02:50 +01:00
0ddd5c6538 chore: upgraded flutter_map to 6.0.1 (#4757)
* chore: upgraded flutter_map to 6.0.1

Impacted files:
* `add_new_product_page.dart`: matomo upgrade
* `analytics_helper.dart`: matomo upgrade
* `camera_scan_page.dart`: matomo upgrade
* `forgot_password_page.dart`: matomo upgrade
* `knowledge_panel_page.dart`: matomo upgrade
* `knowledge_panel_world_map_card.dart`: flutter_map upgrade
* `login_page.dart`: matomo upgrade
* `main.dart`: matomo upgrade
* `new_product_page.dart`: matomo upgrade
* `personalized_ranking_page.dart`: matomo upgrade
* `product_list_page.dart`: matomo upgrade
* `product_query_page.dart`: matomo upgrade
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded flutter_map to 6.0.1 (+ domino effect)
* `question_page.dart`: matomo upgrade
* `sign_up_page.dart`: matomo upgrade
* `user_preferences_page.dart`: matomo upgrade

* chore: upgrade flutter_map to 6.0.1

Impacted file:
* `mocks.dart`: matomo upgrade

* chore: unit test fix

* pubspec upgrade
2023-11-17 12:50:35 +01:00
5bac72068a fix: 4595 - no fast track if nutriscore is not applicable (#4599)
* fix: 4595 - no fast track if nutriscore is not applicable

* fix: 4595 - added ecoscore check, and matomo
2023-08-26 17:12:49 +02:00
d1a7e9e3d9 chore: Upgrade Sentry + add screenshots (#4566)
* Upgrade Sentry + add screenshots

* Upgrade iOS & macOS dependencies

* Remove unused variable
2023-08-17 11:30:38 +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
a6997733af feat: Robotoff question as a banner or a button (#4280)
* Robotoff question in a product, visible as a banner (at the bottom of the screen) or in a button (current implementation)
We split the users into two cohorts and we will have some Analytics to understand if one is better than the other.
The CongratsWidget is also improved by some animations and accessibility

* Now with a better animation
2023-07-29 19:28:12 +02:00
41e919129a feat: Product loading card (#4318) 2023-07-22 17:30:46 +02:00
b8b0a8f58b fix: Fix a regression with Matomo (#4326) 2023-07-17 13:36:47 +02:00
5a72a46fbf feat: Better support error when saving the picture locally (#4305) 2023-07-17 13:17:52 +02:00
7487b72af0 chore: Upgrade Matomo to 3.1 (#4000) 2023-07-16 18:49:07 +02:00
7dd3983f35 feat: Re-enable analytics on FDroid builds (#4289) 2023-07-13 09:18:05 +02:00
92505439c4 feat: 4163 - "incomplete product" card added to product summary (#4236)
* feat: 4163 - "incomplete product" card added to product summary

New files:
* `product_compatibility_header.dart`: Header showing the product compatibility (color + text). Used to be private in `summary_card.dart`.
* `product_incomplete_card.dart`: "Incomplete product!" card to be displayed in product summary, if relevant.
* `summary_attribute_group.dart`: Shows the attribute groups in a product summary card. Used to be private in `summary_card.dart`.

Impacted files:
* `add_new_product_page.dart`: added a constructor for product instead of barcode; added display parameters; now using new "nutrition field editor"
* `add_nutrition_button.dart`: minor refactoring
* `app_en.arb`: added 1 label for the "hey! please complete the product!" message
* `app_navigator.dart`: minor refactoring
* `edit_product_page.dart`: minor refactoring
* `nutrition_page_loaded.dart`: minor refactoring
* `product_field_editor.dart`: new "nutrition field editor"
* `smooth_product_card_not_found.dart`: minor refactoring
* `summary_card.dart`: refactored into additional files because the file was getting too big and possibly too confusing; added the "incomplete product" card (if relevant)

* feat: 4163 - after review

Impacted files:
* `app_en.arb`: changed the label
* `product_incomplete_card.dart`: changed the border radius

* feat: 4163 - after comment

Impacted files:
* `add_new_product_page.dart`: added an `AnalyticsEvent` in the constructors; simplified the constructors.
* `analytics_helper.dart`: added 2 events
* `product_incomplete_card.dart`: minor refactoring
* `summary_card.dart`: added a matomo

* feat: 4163 - after comment

Impacted files:
* `add_new_product_page.dart`: added an `AnalyticsEvent` in the constructors; simplified the constructors.
* `analytics_helper.dart`: added 2 events
* `product_incomplete_card.dart`: minor refactoring
* `summary_card.dart`: added a matomo

* feat: 4163 - new analytics category "fast track edit product"

Impacted files:
* `add_new_product_page.dart`: specific events for each case
* `analytics_helper.dart`: added 1 category and 4 events
2023-06-28 14:29:36 +02:00
7ac86dc4f8 feat: 3843 - matomo for new product page (#4217)
* feat: 3843 - matomo for new product page

Impacted files:
* `add_new_product_page.dart`: implemented the tracking of 6 events for matomo
* `analytics_helper.dart`: added 1 category and 6 related events for the "new product page"

* feat: 3843 - TraceableClientMixin
2023-06-20 17:44:16 +02:00
85fcde1b5c Force all "Hero" widgets to have a unique tag (#4124) 2023-06-15 12:24:33 +02:00
74c00ae50f feat: Allow to remove a product not found from the carousel (#4126)
* Allow to remove a product not found from the carousel

* Add an analytics event when the user removes an unknown product
2023-06-12 17:48:19 +02:00
abab9342a9 Improve how we manager consent in the app (#4118) 2023-06-11 09:18:09 +02:00
9f449486bb Add the current visitor ID of Matomo in the debug settings (#4095) 2023-06-07 20:09:02 +02:00
bfe1d60db9 Revert ""_allow" attribute was never initialized (#4087)" (#4090)
This reverts commit ba695dcad472f9892e6a2f33599b7276243cf2f7.
2023-06-06 21:37:21 +02:00
ba695dcad4 "_allow" attribute was never initialized (#4087) 2023-06-06 16:36:32 +02:00
4c44b06bcd feat: Support for deep links (#3995)
* Support for deep links on Android

* Deep links: Better support for network errors / unknown product

* iOS configuration for deep links

* Improve documentation

* Improve doc

* Support other domains

* Add an error page

* Upgrade to go_router 7.0.2

* Add some Sentry events

* Update packages/smooth_app/lib/helpers/extension_on_text_helper.dart

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

* SizedBox -> EMPTY_WIDGET

* PreferencePageType: from name to tag

* Remove an unused async keyword

* Move internal app routes to an enum

* Add a clarification about `ProductLoaderPage`

* Update packages/smooth_app/lib/pages/navigator/app_navigator.dart

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

* Revert how we open the product addition/creation on the product not found card

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2023-05-23 15:52:33 +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
f7e42c762b chore: Shared common scanner (#3883)
* First movement

* devcotainer

* Lint fixes

* Shared visor

* Final moves

* Final lint fixes

* Empty widget, moved scan header

* Update scanner_ml_kit.dart

---------

Co-authored-by: Marvin Moeltgen
2023-04-18 21:05:28 +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
54560fffdb fix: 3679 - reporting with a 000000000000 matomo user id (#3840)
* fix: test that if user opts out he/she will be
tracked with a user id of 0000000000000000

* fix: implement to make test work

* fix: Implement suggestions from review

* fix: change to init

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

* fix: add comment

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

* fix: add explicit optOut

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

* fix: remove surplus statement

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

* fix: remove test

* fix: use old imports

* fix: format with dart format

---------

Co-authored-by: markdurst <mark.durst@deutschebahn.com>
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-04-04 19:40:02 +02:00
0bf279473b fix: 3782 - more relevant check and matomo message (#3787)
Impacted files:
* `add_basic_details_page.dart`: unrelated typo fix
* `analytics_helper.dart`: added 2 events for matomo; unrelated typo fix
* `edit_product_page.dart`: unrelated typo fix
* `smooth_barcode_scanner_mlkit.dart`: added an `isStarting` check; now sends matomo instead of red snackbar; simplified
2023-03-20 14:29:37 +01:00
cd04400194 chore: Track edit events (#3755)
* track edit events

* flutter format

* fixed the logic for most edit events

* dart formatting

* typo fixes

* fix the bugs and simple input page

* Update packages/smooth_app/lib/helpers/analytics_helper.dart

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

* Update packages/smooth_app/lib/pages/product/edit_product_page.dart

* Update packages/smooth_app/lib/pages/product/new_product_page.dart

* remove the webview ^

* Update presubmit.yml

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-03-16 18:36:48 +01:00
777f54cdf3 feat: Allow to share and view lists on web (#3757)
* feat: Allow to share and view lists on web

* formatting

* chore: Analytics

* Update temp_product_list_share_helper.dart

* Revert "Update temp_product_list_share_helper.dart"

This reverts commit a36473ae11caa74e3781caf84a1a828f7dcf07f4.

* localized
2023-03-09 18:05:51 +01:00
7e861f569e refactor: upgrade to off-dart 2.0.0 (#3495)
Impacted files:
* `paged_to_be_completed_product_query.dart`: renamed `State` as `ProductState`
* `paged_user_product_query.dart`: created local `UserSearchType` instead of deprecated off-dart `UserProductSearchType`; used `ProductSearchQueryConfiguration` instead of deprecated `UserProductSearchQueryConfiguration`
* `product_query.dart`: now that we use fully v3, we don't need the temporary field list for user-related queries with v2
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 2.0.0
* `user_preferences_account.dart`: now using new local class `UserSearchType`
* and reduced all off-dart imports to a single `import 'package:openfoodfacts/openfoodfacts.dart';`
2023-01-02 16:10:52 +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
1996907f74 chore: Matomo refactor (#3273)
* chore: Matomo refactor

* ci: add labeler for analytics

* fix: Review

Co-Authored-By: monsieurtanuki <11576431+monsieurtanuki@users.noreply.github.com>

* Revert play dart run

* Rename + added comments

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
Co-authored-by: monsieurtanuki <11576431+monsieurtanuki@users.noreply.github.com>
2022-11-08 18:02:53 +01:00
3dca648800 feat: #2852 - Matomo message when barcode is not found (#2854)
Impacted files:
* `analytics_helper.dart`: new method about barcode not found; fixed typos
* `barcode_product_query.dart`: added Matomo (and not Sentry) message when barcode is not found
2022-08-29 15:55:58 +02:00
f6f851179c feat: Show osm attribution + removed matomo_tracker fork (#2740)
* feat: Show osm attribution + removed matomo_tracker fork

* shorten attribution

* Added back contributors
2022-08-08 11:29:46 +02:00
347c39cf89 feat: Allow to share products (#2287)
* feat: Allow to send products

* Use getProductUri instead + matomo
2022-06-15 18:05:05 +02:00
8cdea111ea feat: Matomo refinements (#2264)
* feat: Matomo refinements

* Update login_page.dart
2022-06-14 16:04:10 +02:00
8ebda96dac fix: Matomo not sending requests (country) (#2132) 2022-06-01 23:17:46 +02:00
a08203edc1 fix: Analytics switch (#2029) 2022-05-28 09:45:49 +02:00