50 Commits

Author SHA1 Message Date
4aae8f94a8 Bump project dependencies (#6726) 2025-07-10 11:38:43 +02:00
e74f94abc3 fix: Visual glitches (#6724)
* SmoothScaffold everywhere

* DateFormat from MaterialLocalizations

* Packagings: fix InkWell
2025-07-08 17:27:21 +02:00
692610cf6f Bump to flutter_lints 6.0.0 (#6713) 2025-07-06 12:01:44 +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
dda75e283e feat: Flutter 3.32 (#6665)
* Migration to Flutter 3.32

* Temporary ignore dart formatter issues
2025-06-23 09:56:00 +02:00
ea9293911f Fix: Queries are lost when opening the browser from a deep link (#6328) 2025-02-03 16:55:25 +01:00
61585caadd feat: Edit product page with product type + footer (#6313)
* Edit product page with product type + footer

* Revert background_task_image

* Haptic feedback for barcode copy

* Fix a regression with TopBar2
2025-01-30 16:31:31 +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
23288dfc44 feat: Less annoying floating spam (#6190)
* Less annoying floating spam

* Ooops, remove that test, Edouard

* No message for pictures

* Better edit product page banner
2025-01-13 14:17:00 +01:00
a3f44f4c3b KP enhancements (#6184) 2025-01-12 12:14:47 +01:00
85c13502d2 Migration to Flutter 3.27 (#6076)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2024-12-29 15:20:05 +01:00
c8d5392b42 fix: Optimized version of the scan cards for small screens (#5928)
* Optimized version of the scan cards for small screens

* Fix some Rive animations

* Use a slideup transition from the carousel
2024-11-25 10:42:02 +01:00
f81af45047 feat: Change UI of new product type cards (#5857) 2024-11-23 09:26:54 +01:00
3655c3b300 feat: Scan cards share the same UI (#5866)
* Harmonized UI for scan cards

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

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

* Fix build issue

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2024-11-18 15:24:05 +01:00
3475631930 fix: Fix external links (#5754)
* Fix: Donate link

* Better handle external links

* Typo
2024-10-27 20:06:01 +01:00
b07b942076 feat: Action bar for the product (+ light redesign) (#5749)
* Light redesign for the Product page + action bar

(cherry picked from commit cb50d79ce66aacdb729b44c94e061112db3b3aa3)

* Remove unused variable

* Update Sketch file
2024-10-27 20:00:17 +01:00
a4b3632067 The user was stuck in the onboarding (#5723) 2024-10-21 15:09:17 +02:00
4025f30880 GoRouter doesn't like subroutes for external links (#5706) 2024-10-18 17:51:33 +02: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
30ca6b64b2 feat: Improvements for the search experience (#5519)
* Improvements

* Fix typo

* One more typo
2024-08-07 17:33:51 +02:00
9ad3887577 An attempt to fix the blank external page (#5514) 2024-07-30 08:54:05 +02:00
a3e9bc24ec refactor: Rename tagline* to AppNews (#5377)
* Rename `tagline*` to `AppNews`

* Fix labeler path
2024-06-16 17:39:33 +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
2dd4575b96 fix: 5345 (#5346)
* fix: 5345

* fix: 5345
2024-06-08 15:08:16 +02:00
2e44edb566 feat: added deeplinking for the sign up page #4169 (#5332)
* feat: added sign up deeplink #4169

* feat: made it so that the user goes to onboarding after sign up

* feat: added deeplinking for the sign up page #4169
### What
<!-- Added deep linking for the sign up page-->
- <!-- Changed x to achieve y -->
<!--
Please name your pull request following this scheme: `type: What you did` this allows us to automatically generate the changelog
Following `type`s are allowed:
  - `feat`, for Features
  - `fix`, for Bug Fixes
  - `docs`, for Documentation
  - `ci`, for Automation
  - `refactor`, for code Refactoring
  - `chore`, for Miscellaneous things
-->
### Screenshot
<!-- Insert a screenshot to provide visual record of your changes, if visible -->

### Fixes bug(s)
<!-- change by appropriate issues. -->
<!-- Please use a linking keyword https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword -->
- Fixes: <!-- #1 Note: you can also use Closes: -->

### Part of
- #525 <!-- Add the most granular issue possible -->

* feat: added an external link for the signup page

* feat: moved the getting of user preferences to the success state only
2024-06-07 15:03:18 +02:00
6fab67f859 A deeplink to open the NutriScore Guide (https://fr.openfoodfacts.org/nutriscore-v2) (#5275) 2024-05-22 14:42:18 +02:00
5a95ca688a feat: 5195 - location search, as a preliminary step (#5274)
New files:
* `dao_osm_location.dart`: DAO about OSM locations.
* `loading_status.dart`: Common loading status.
* `location_list_supplier.dart`: Asynchronously loads locations.
* `location_map_page.dart`: Page that displays a map centered on a location.
* `location_query_model.dart`: Location query model.
* `location_query_page.dart`: Page that displays location results during and after download.
* `osm_location.dart`: Location as expected from OSM.
* `product_loading_status.dart`: Product loading status. Refactored from `product_list_item_simple.dart`
* `search_app_bar_title.dart`: Common search app bar title.
* `search_empty_screen.dart`: Common search empty screen.
* `search_helper.dart`: Common "text-field + history" search helper.
* `search_loading_screen.dart`: Common search loading screen.
* `search_location_helper.dart`: Search helper dedicated to location search.
* `search_location_model.dart`: Search location model.
* `search_location_preloaded_item.dart`: Location search preloaded list item, for locations historically selected.
* `search_preloaded_item.dart`: Common search preloaded item.
* `search_product_helper.dart`: Search helper dedicated to product search. Used to be in `search_page.dart`

Impacted files
* `app_en.arb`: added a "No location found" label
* `app_fr.arb`: added a "No location found" label
* `app_navigator.dart`: minor refactoring
* `dao_string_list.dart`: history key for new feature "previous location searches"
* `local_database.dart`: upgraded the version to take into account new class `DaoOsmLocation`
* `personalized_ranking_model.dart`: now using a common `LoadingStatus`
* `personalized_ranking_page.dart`: now using a common `LoadingStatus`
* `product_list_item_simple.dart`: now using a common `ProductLoadingStatus`
* `product_model.dart`: now using a common `ProductLoadingStatus`
* `product_price_item.dart`: added unrelated TODO comment
* `product_query_model.dart`: now using a common `LoadingStatus`
* `product_query_page.dart`: now using common `SearchLoadingScreen`, `SearchEmptyScreen` and `SearchAppBarTitle`
* `product_query_page_helper.dart`: removed useless `ProductQueryPageResult`; refactored `EditProductCallback` to `SearchQueryCallback` somewhere else
* `search_history_view.dart`: refactored with `SearchHelper` and preloaded items
* `search_page.dart`: refactored the actual search code to `SearchHelper`; added preloaded items; found a bug
* `smooth_product_carousel.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: added a temporary access to location search; removed useless key
2024-05-21 18:45:38 +02:00
d873a9902b If a product is passed as a Map, the Product page should be openable (#5155) 2024-04-15 20:25:24 +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
a7d7704c8d chore: upgraded flutter_custom_tabs to 2.0.0 (#5041) 2024-02-06 15:30:40 +01:00
77914a9b85 Navigator: if the path is empty -> force the homepage (#4986) 2024-01-15 13:03:05 +01:00
9822fd6c4c chore: Upgrade GoRouter to the latest version (7.x -> 12.x) (#4851)
* Upgrade GoRouter to the latest version (7.x -> 12.x)

* Let's reformat
2023-11-24 17:55:47 +01:00
bac58f9d6a Force the app language to be set by the router (where a Localization widget is available) (#4819) 2023-11-17 22:44:05 +01:00
9d03d4b7f8 chore: Goodbye little Data Importer 👋 (#4781)
* Goodbye little boy

* Move the code to init the language

* A little change

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-11-16 10:23:46 +01:00
bbf84d17d9 feat: Step-by-step fast-track (#4698)
* Product Info Design Changed

* Product Design Page splitted

* Back Button Added

* Product info page fullscreen, and Back button Added

* Made Review Changes

* used the double format + trailing commas + removed hardcode values

* Trailling comma change

* Theme.of(Context) cached, added trailiing commas, Mediaquery.sizeof() used

* Print Removed and Colorsceme is now under build function

* Text style Edited with copywith()

* Text style Edited with copywith()

---------

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2023-11-15 19:08:46 +01:00
d8042224f3 fix: 4575 - country is now always populated (#4591)
* fix: 4575 - country is now always populated

* Update packages/smooth_app/lib/query/product_query.dart

* fix: 4575 - reformatted
2023-08-26 17:11:53 +02:00
34ccb260b3 Supports cgi/product.pl?type=edit&code=XXXX links (#4587) 2023-08-22 16:52:52 +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
a6cdcaf9c1 Rework how the carousel is managed (#4403) 2023-07-31 17:14:09 +02:00
82b1db0b9d Pass SentryNavigatorObserver to the router (#4391) 2023-07-29 19:17:24 +02:00
a08a2f9216 fix: 4348 - simplified app navigator code (#4355) 2023-07-28 23:06:10 +02:00
580b8221a6 Fix: food preferences redirecting to a 404 page (#4348) 2023-07-21 14:31:58 +02:00
296a0d2a47 feat: Ensure the deeplink '/open-food-facts-mobile-app' will open our homepage (#4297) 2023-07-13 15:08:30 +02:00
fa68745906 feat: Bring the "Hot reload" feature back (#4279) 2023-07-13 14:38:24 +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
85fcde1b5c Force all "Hero" widgets to have a unique tag (#4124) 2023-06-15 12:24:33 +02:00
6013224101 The Hero animation should be disabled from deep links (#4112) 2023-06-10 16:55:10 +02:00
8fee4569ce Use Chrome Custom Tabs on Android for external links (#4014) 2023-05-25 16:16:07 +02:00
d5d86b46e1 feat: Better support deep links with unsupported URLs (#4007)
* Better support for external links

* Change the import we use
2023-05-24 14:27:41 +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