19 Commits

Author SHA1 Message Date
7652657de0 3 visual issues: attributes without spacing, empty field editor and Robotoff banner with bottom margin (#6717) 2025-07-07 12:28:30 +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
db036a4c4f fix: New UI for the food preferences (#6466)
Co-authored-by: chetanr25 <1ds22ai010@dsce.edu.com>
Co-authored-by: Edouard Marquez <g123k@users.noreply.github.com>
Co-authored-by: Edouard Marquez <animatrix30@gmail.com>
2025-05-16 10:46:29 +02:00
fd3ae027fa feat: Food icons with NOVA groups (#6521)
* Food icons for NOVA

* Level -> group
2025-04-07 13:34:50 +02:00
19aef3b3da feat: Food icons for the product page (#6387)
* Food icons for the product page

* Lint error

* factor-like attributes

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

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

* Revert "Update packages/smooth_app/lib/pages/product/attribute_icons.dart"

This reverts commit aaa1efce5646d3a2d51c68ed89af552dd3d28d9d.

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2025-03-12 17:12:39 +01:00
d4bdca2a91 feat: 4223 - comparison page for 3 random products on dev mode (#4444)
* feat: 4223 - comparison page for 3 random products on dev mode

New file:
* `compare_products3_page.dart`: Test page about comparing 3 products. Work in progress.

Impacted files:
* `attributes_card_helper.dart`: refactored introducing two new reusable methods
* `nutrition_container.dart`: refactored introducing one reusable getter
* `product_cards_helper.dart`: refactored introducing one new reusable method
* `user_preferences_dev_mode.dart`: added an item computing 3 random products and showing the product comparison page

* feat: 4223 - stupid lint check part 4

* feat: 4223 - access to boosted comparison from list page via dev mode

Impacted files:
* `product_list_page.dart`: slightly refactored the app bar text in selection mode, in order to have several possible actions; replaced the FAB with an explicit (?) "multi-select" button; added a "boosted comparison" icon button when 2 or 3 products are selected; added a "ranking" icon button
* `user_preferences_dev_mode.dart`: added a dev mode flag for "boosted comparison" (sic)

* feat: 4223 - minor warning fix

* feat: 4223 - now displays item actions in a "more..." menu

New file:
* `product_list_item_popup_items.dart`: Popup menu items for the product list page, for selected items.

Impacted files:
* `product_list_page.dart`: now displays item actions in a "more..." menu
* `product_list_popup_items.dart`: minor refactoring
2023-08-27 09:56:02 +02:00
12a561a4a0 refact: score card refactoring (#3961)
Impacted files:
* `attributes_card_helper.dart`: refactor as advanced `enum` from `score_card_helper.dart`
* `knowledge_panel_summary_card.dart`: now using the new `ScoreCard.titleElement` constructor
* `score_card.dart`: refactored `CardEvaluation` as advanced `enum` from `score_card_helper.dart`; refactored `ScoreCard` with 2 explicit constructors instead of a single nameless one
* `score_card_helper.dart`: refactored `enum`s and moved code to more relevant files
* `summary_card.dart`: now using the new `ScoreCard.attribute` constructor
2023-05-13 10:30:21 +02: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
9ebe5c849c feat: Remove a maximum of hardcoded sizes and move Padding to Directional ones (#2534)
* Remove a maximum of hardcoded sizes and move Padding to Directional ones

* Fix build issue

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2022-07-13 14:58:02 +02:00
e7df9e53e6 fix: Colors of generic widgets replaced with globalized constants for colors (#1268)
* new colors added

* colors replaced with constants

* colors replaced with constants

* colors replaced with constants

* colors moved to design_constants.dart

* empty attribute helper deleted

* imports updated

* screenshots updated

Co-authored-by: Gayangi Seneviratne <sgayangi@gmail.com>
2022-03-20 16:47:25 +01:00
0d61134375 General radius throughout the app (#1179)
* Added design const

* ROUNDED_RADIUS

* General radius throughout the app

* Update smooth_main_button.dart

* .all instead of .circular
2022-03-03 21:25:46 +01:00
4198d41985 fix: #1094 - icons instead of unicode for score items (#1104)
New file:
* `Podfile.lock`: related to a fresh iOS restart

Impacted file:
* `attributes_card_helper.dart`: icons instead of unicode for score items
* `contents.xcworkspacedata`: related to a fresh iOS restart
* `Debug.xcconfig`: related to a fresh iOS restart
* `project.pbxproj`: related to a fresh iOS restart
* `Release.xcconfig`: related to a fresh iOS restart
2022-02-10 09:49:53 +01:00
0a267d8017 feat: #833 - dev mode (#834)
New file:
* `user_preferences_dev_mode.dart`: Collapsed/expanded display of "dev mode" for the preferences page.

Impacted files:
* `attributes_card_helper.dart`: unrelated - removed useless cupertino.dart imports
* `forgot_password_page.dart`: added a system to trigger the dev mode (click 10 times on the action button)
* `product_cards_helper.dart`: unrelated - removed useless cupertino.dart imports
* `score_card_helper.dart`: unrelated - removed useless cupertino.dart imports
* `smooth_reveal_animation.dart`: unrelated - removed useless cupertino.dart imports
* `svg_icon_chip.dart`: unrelated - removed useless cupertino.dart imports
* `user_preferences.dart`: added a getter/setter for dev mode
* `user_preferences_page.dart`: display the dev mode options - if activated
2022-01-04 08:01:49 +01:00
7ab5b83ee2 fix: #754 - display localized description for nova score (#755)
Impacted file:
* `attributes_card_helper.dart` - for nova, now using an attribute field instead of a list of terms in English
2021-12-26 19:15:20 +01:00
36a1d89346 Fix how to process attribute match score (#627)
* Don't show label attribute widgets when their status is unknown

* Create named arguments

* First version of displaying eco card with knowledge panels

* Pubspec changes revert

* Pubspec changes revert

* Pubspec changes revert

* Pubspec changes revert

* Comments resolution and adhere to new BE format

* Revert pubspec.yaml

* Work with nullable elements

* Fix padding

* Add a padding after Icon in Score Card (otherwise on smaller devices the text appears right next to the icon)

* Create a place for shared constants in Smoothie to go

* Merge conflicts resolution

* Add comment

* Make new_product_page responsive on multiple devices

* Update constants.dart

* Tiny

* Update sorting order

* Add some more consts

* Move ui_helpers to -> smooth_ui_library

* Format

* Some more changes

* Merge

* Merge

* Merge

* Updates to ui_helper

* Format

* Remove 'Loading..' text and fix some padding

* Remove 'Loading..' text and fix some padding

* Remove 'Loading..' text and fix some padding

* Fix how to process attribute match score

Co-authored-by: Jasmeet Singh <jasmeetsingh@google.com>
2021-10-18 11:35:12 +02:00
a3d1602413 First version of displaying eco card with knowledge panels (#617) 2021-10-13 11:04:25 +02:00
2ed5c83b49 Compute the Product compatibility score and set the appropriate text and color on the compatibility header (#609) 2021-10-05 13:20:31 +02:00
4d0ff3499a feat: Updated the summary page (#581)
Please note that there are a lot of moving elements that are not final in this PR, specifically:

1. The group ordering or the attributes inside groups will change on the server
2. Attribute titles will change from the server
3. Attribute icons are still not final, and will change, currently we have 3 shades of colors that will most likely change to 5, instead of emojis we will most likely use icons.
4. The red panel on top of the card is currently static, it will be modified based on a new field from backend.
5. the styling of the Divider will change
6. None of the UI elements are currently final, (padding, text style, colors etc).

Please also note that this PR has a side-effect of changing the background color of the app's theme to material-light-blue from material-blue. This is in sync with the current mocks.

Example summary card: 
![image](https://user-images.githubusercontent.com/7541730/134514044-b40d0cc4-4a3d-4c90-8626-58486a398f24.png)
2021-09-26 14:05:07 +02:00
67890cb7f2 Add a new product page that follows the new design. (#572)
Add a new product page that follows the new design, reuses as much code as possible with the old one, some of the code is copy pasted, eventually the old product page will be deleted..
2021-09-14 19:39:16 +02:00