90 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
dda75e283e feat: Flutter 3.32 (#6665)
* Migration to Flutter 3.32

* Temporary ignore dart formatter issues
2025-06-23 09:56:00 +02:00
453ccf558f feat: Improvements for Robotoff questions in Edit mode (#6579)
* Improve robotoff questions in edit mode

* SmoothImage for the proof

* Remove print statement
2025-05-05 19:23:01 +02:00
61e421cba2 fix: Swipe to refresh in ingredients sub-knowledge panel (#6438)
* fix: Update barcode retrieval method in knowledge panel page to fix refresh indicator.

* fix: Remove unused import for scan carousel manager in knowledge panel page

---------

Co-authored-by: Satyam Jha <satyamj210@gmail.com>
2025-03-10 09:27:17 +01:00
67539c17f3 Suggestions for countries (#6344) 2025-02-05 16:05:29 +01:00
ebcbe320f7 Knowledge panel page: shortcuts to edit mode (#6268) 2025-01-22 12:37:17 +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
104b30972b Portion calculator detached from nutrition facts (#6240) 2025-01-19 12:16:17 +01:00
9b1bbc4a5a Ensure all titles on KP pages are in bold (#6235) 2025-01-19 12:14:59 +01:00
a9f9c470bc Nutrition facts KP: the toggle per 100g/portion was not working (#6234) 2025-01-19 12:14:42 +01:00
29bc10768f fix: Fix issues with the menu on lists (#6202)
* bugfixes_list

* Remove heroTag from search results

* Personalized lists: better header

* Lists: Ensure the pull to refresh works with non-scrollable listview

* Personalized search: Dismissible widget to take the full height

* Flutter Map: InkWell with the same border radius as the ClipRRect
2025-01-14 09:49:45 +01:00
a3f44f4c3b KP enhancements (#6184) 2025-01-12 12:14:47 +01:00
5ddb5127ec New UI for ingredients (#6156) 2025-01-08 13:38:50 +01:00
d3893675d5 fix: KP UI improvements (font size/font height…) (#6155)
* KP improvements

(cherry picked from commit 9506642832d82356a8ab717de5d07e3273e73cfe)

* Use the correct variant of the SVG

* Improve normal text in dark mode
2025-01-08 13:37:31 +01:00
5186bc6cda Minor improvements (#6146) 2025-01-07 14:14:59 +01:00
4db7eaa9ed Minor onboarding improvements (#6126) 2025-01-06 20:21:44 +01:00
43d282a241 fix: 5 bugfixes (icons color, better network mgmt / Japanese…) (#6127)
* Fix the elevated button color

* Scan tagline : when there is an error, hide the image

* Better management of errors for the `ProductPicture`

* Force a loader for the gallery

* Fix Japanese issue with tables

* Update packages/smooth_app/lib/cards/product_cards/smooth_product_image.dart

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

* Force a color for Price buttons

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2025-01-06 08:52:08 +01:00
454060e6c0 Better selection area (#6113) 2025-01-04 11:51:51 +01:00
7a02b57fd0 feat: Disable gestures on the KP map (#6081)
* Disable gestures on the KP map

* World map

* Remove warning
2024-12-30 08:12:57 +01:00
f53938c8e9 feat: Improve KP tables layout (#6080)
* Improve KP tables

* Cache horizontalDivider

* Some comments

* Improvements for dropdown

* no message
2024-12-29 22:58:48 +01:00
edf16ddb07 chore: 5944 - systematically using "upToDateProduct" (#5951)
Impacted files:
* `edit_ocr_page.dart`: replaced "widget.product" with "upToDateProduct"; used "barcode" getter
* `knowledge_panel_page.dart`: replaced "widget.product" with "upToDateProduct"
* `nutrition_page_loaded.dart`: replaced "widget.product" with "upToDateProduct"
* `product_image_gallery_view.dart`: replaced "widget.product" with "upToDateProduct"
* `product_image_swipeable_view.dart`: replaced "widget.product" with "upToDateProduct"
2024-11-28 09:42:41 +01:00
453bf9e64f Knowledge Panel background color in light mode + product name (#5920) 2024-11-24 14:11:39 +01:00
688ddc214f feat: Improvements for the product page (Part 2) (#5764)
* Improvements for the product page

* Fix Android issues

* Remove unused variable
2024-10-28 21:57:31 +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
29f433c806 feat: 5700 - no click for KP title without additional elements (#5709)
Impacted files:
* `knowledge_panel_card.dart`: overrides the "isClickable" parameter in case there are eventually no further elements to display
* `knowledge_panels_builder.dart`: new helper methods
2024-10-20 14:16:33 +02:00
3185c72a36 fix: 5665 - display "add nutrition facts" button only for relevant types (#5674)
Impacted files:
* `add_nutrition_button.dart`: new method to check if nutrition facts are relevant for this product type
* `knowledge_panel_action_card.dart`: checks if the product type matches before displaying the nutrition facts button
* `knowledge_panels_builder.dart`: checks if the product type matches before displaying the nutrition facts button
* `pubspec.lock`: upgrade to flutter `3.24`
2024-10-20 08:40:26 +02:00
ddb127d4cd Remove flutter map attribution (#5511) 2024-07-30 08:54:18 +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
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
44e4774936 feat: Knowledge Panel details page accessibility improvements (#5290)
* KP page accessibility improvements

* ScoreCardType as a public enum
2024-05-25 17:15:03 +02:00
db20b51cb6 feat: 5191 - knowledge panel image card now clickable (#5220)
Impacted files:
* `knowledge_panel_image_card.dart`: now using the optional `linkUrl` field for click operation
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to off-dart 3.7.0
2024-05-05 12:34:40 +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
91212a98bf Remove the package name from the quick tile (#4985) 2024-01-15 13:02:14 +01:00
735ae8cf47 fix: If a "panel summary widget" is incomplete, the app shouldn't crash (#4987)
* In the case where a "panel summary widget" is null, we have to pass a non-null WIdget

* Add a missing `const`
2024-01-15 13:00:53 +01:00
465060c7c3 Add some debug info to Knowledge Panels (#4960) 2024-01-09 12:00:45 +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
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
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
b3f73c061b chore: upgrade to flutter_map 4.0.0 (#4752)
Impacted files:
* `knowledge_panel_world_map_card.dart`: recoded with flutter_map 4.0.0 syntax
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgraded to flutter_map 4.0.0
2023-11-01 02:20:35 +01:00
e463ca37a8 feat: 4628 - refactoring as preparatory work (#4641)
* feat: 4628 - refactoring

Deleted files:
* `knowledge_panel_element_card.dart`
* `knowledge_panel_summary_card.dart`

New files:
* `knowledge_panel_image_card.dart`: Card that displays a Knowledge Panel _Image_ element.
* `knowledge_panel_text_card.dart`: Card that displays a Knowledge Panel _Text_ element.
* `website_card.dart`: Card that displays a website link. Code used to be inside `new_product_page.dart`

Impacted files:
* `knowledge_panel_card.dart`: minor refactoring
* `knowledge_panel_expanded_card.dart`: minor refactoring
* `knowledge_panel_page.dart`: minor refactoring
* `knowledge_panel_page_template.dart`: minor refactoring
* `knowledge_panels_builder.dart`: moved code here from `knowledge_panel_element_card.dart` and `knowledge_panel_summary_card.dart`; minor refactoring
* `new_product_page.dart`: moved the `WebsiteCard` code to a dedicated file; minor refactoring
* `product_cards_helper.dart`: minor refactoring
* `summary_card.dart`: minor refactoring

* feat: 4628 - additional TODO's
2023-10-28 07:32:03 +02:00
c31e4582a4 chore: Migration to Flutter 3.13 (#4579)
Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-09-30 19:39:12 +02:00
1c75f86d1d fixed crop and added padding (#4514) 2023-08-15 16:20:20 +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
fe7189c9db feat: Improve a11n by forcing a label on Nutri-Score / Eco-score / NOVA buttons (#4356)
* Improve a11n by forcing a label on Nutri-Score and Eco-score buttons

* Fix a typo

* Add more cases + NOVA

* Remove a print statement

* Improve a bit the score card

* Improve accessibility for KP title cards

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

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

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

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

---------

Co-authored-by: Pierre Slamich <pierre.slamich@gmail.com>
2023-07-29 19:21:30 +02:00
829e2a1e3c feat: Improve the Nutrition Facts screen (#4278) 2023-07-21 01:42:53 +02:00
b03f60b085 feat: Better support RTL languages (#4310) 2023-07-16 20:29:51 +02:00
4f35708f74 feat: 3941 - refactoring about up-to-date product data for StatefulWidgets (#4262) 2023-07-13 09:15:09 +02:00