34 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
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
f6284e0861 feat: Adding Robotoff Questions to product edition (#6407)
* feat: adds robotoff questions to SimpleInputPage

* feat: add localization for Robotoff question answered message

* fix: remove unused import

* Added missing type annotation

* feat: redesigned Robotoff questions integration.

* fix: update state change notification mechanism in AbstractSimpleInputPageHelper

* feat: improve layout and padding in SimpleInputWidget and SmoothIconButton

* feat: implement SmoothBooleanButton for enhanced boolean selection UI

* fix: take into account multiple questions

* Merging translations

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

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

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2025-04-26 16:58:02 +02:00
67539c17f3 Suggestions for countries (#6344) 2025-02-05 16:05:29 +01:00
a3f44f4c3b KP enhancements (#6184) 2025-01-12 12:14:47 +01:00
863aa76e62 fix: Language selector + ingredients (text field + outdated) (#6170)
* Language selector + ingredients text field

* Minor fix

* Outdated explanations

* Remove shadow from edit buttons

* Invert colors for Cancel/Save buttons in dark mode

* Format

* SafeArea for Edit Page
2025-01-10 09:56:44 +01:00
d1ebb689d9 feat: UI improvements for the edit mode (#6132)
* UI improvements for the edit mode

* Better website input

* Some comments + minor fixes

* Add missing bottom space

* Fix page padding

* Help is better embedded

* Change ingredients instructions
2025-01-06 20:20:01 +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
db6ccda32d feat: New layout when a product is found (#6073)
* New layout when a product is found

* Customizable fields

* Change types
2024-12-27 18:46:53 +01: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
2b8d592a75 feat: 3297 - added an "add pics" button to the "edit origins" widget (#4863)
* feat: 3297 - added an "add pics" button to the "edit origins" widget

Impacted files:
* `app_en.arb`: added label for "add origin pics"
* `app_fr.arb`: added label for "add origin pics"
* `simple_input_page_helpers.dart`: added an "extra widget" for simple inputs, and implemented it for "origins" with an "add photo" button; minor refactoring on `getIcon`
* `simple_input_widget.dart`: minor refactoring

* feat: 3297 - added extra buttons for emb and labels

Impacted files:
* `app_en.arb`: added labels for "add pics" buttons (emb and labels)
* `app_fr.arb`: added labels for "add pics" buttons (emb and labels)
* `simple_input_page_helpers.dart`: added extra buttons for emb and labels
* `smooth_large_button_with_icon.dart`: minor UI fix
2023-11-30 09:26:45 +01:00
8b01257be8 fix: 4335 - "check" icon for "done" details - instead of "edit" (#4739)
Impacted files:
* `add_new_product_helper.dart`: added a specific trailing icon in some cases
* `smooth_large_button_with_icon.dart`: fixed color bug
2023-10-31 08:23:02 +01:00
68201655eb fix: Truncated button text #4240 (#4677)
* c1

* c1

* c1

* c2

* c2

* c2
2023-10-02 13:42:44 +02:00
390aa65826 feat: Ensure the SmoothSimpleButton has a border on AMOLED theme (#4440)
* Ensure the `SmoothSimpleButton` has a border

* Fix tests
2023-08-05 17:28:54 +02:00
01ae1fac25 feat: Hunger games: a better loading view + we finally support errors… (#4448)
* Hunger games: better loading view + support for error & reloading + each state is a dedicated Widget

* Explicitly say we want the async package (it's a transitive one)
2023-08-05 15:26:54 +02:00
75ee10349c fix: Additives Page: Button text on additives page is not centered. (#4216)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
Co-authored-by: Edouard Marquez <moi@edouard-marquez.me>
2023-07-13 07:52:00 +02:00
fa570d4599 feat: 4058 - new UI for "add product" (#4060)
* feat: 4058 - new UI for "add product"

TODO:
* dark mode
* localization
* facultative ecoscore fields

Impacted files:
* `add_new_product_page.dart`: score titles and subtitles; no more blue background; score on one line; leading (1) and (2) icons; deactivated button
* `add_simple_input_button.dart`: minor refactoring
* `edit_product_page.dart`: minor refactoring
* `simple_input_page_helpers.dart`: new method `showEditPage` from previous code
* `smooth_large_button_with_icon.dart`: refactored with `backgroundColor`, `foregroundColor` and `trailing` parameters

* feat: 4058 - after review

Impacted files:
* `add_new_product_page.dart`: dark mode; images first; titles and subtitles for nutriscore and ecoscore
* `app_en.arb`: titles and subtitles for nutriscore and ecoscore
* `app_fr.arb`: titles and subtitles for nutriscore and ecoscore
2023-06-03 14:37:19 +02:00
dbf4c32f90 feat: 2910 - big UI/UX refactoring (#4054)
Impacted files:
* `add_new_product_page.dart`: big refactoring
* `add_simple_input_button.dart`: refactoring
* `app_en.arb`: added 5 labels
* `app_fr.arb`: added 5 labels
* `smooth_large_button_with_icon.dart`: added an optional image file to display in RRect
2023-06-01 17:50:11 +02:00
ad7ac7732a refactor: Flutter v3.7.0 (#3642) 2023-01-31 22:39:07 +01:00
ddb8bea405 feat: Horizontal buttons for Dialogs (#2626)
* Revert "Revert "feat: Smooth Dialog with an axis for buttons (#2587)" (#2608)"

This reverts commit 6b52473394b921126d71be3291902ad27aa03e62.

* Many fixes

* Small doc + Title & Cross in separated widgets

* Increase a little bit the line height to improve readability

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-08-18 19:27:35 +02:00
115722b613 feat: #2396 - better memory management - load products only when needed (#2609)
Deleted files:
* `scan_page_helper.dart`: refactored as there was only a single small method there, with a lousy "ignore" management.
* `smooth_main_button.dart`: old redundant button that did not fit the latest UI

New files:
* `personalized_ranking_model.dart`: Model that computes the scores and sorts the barcodes accordingly.
* `product_model.dart`: Model for product database get and refresh.
* `scan_product_card_loader.dart`: Display of product for the scan page, after async load from local database.
* `tmp_matched_product_v2.dart`: to be merged into off-dart

Impacted files:
* `app_en.arb`: added a label for "refresh_with_new_preferences"
* `app_fr.arb`: added a label for "refresh_with_new_preferences"
* `continuous_scan_model.dart`: now we don't store Product and we let the product cards get the product from the local db if and only if needed
* `dao_product.dart`: minor refactoring
* `dao_product_list.dart`: now we don't deal with products anymore, just barcodes.
* `group_query_filter_view.dart`: removed deprecated `SmoothMainButton`
* `partial_product_list.dart`: now we don't deal with products anymore, just barcodes.
* `personalized_ranking_page.dart`: now uses new class `PersonalizedRankingModel` for better refresh and async product load; now using appropriate button with localized label; fixed dismiss action
* `product_list.dart`: now we don't deal with products anymore, just barcodes.
* `product_list_import_export.dart`: refactored
* `product_list_item_simple.dart`: now we `async`ly load the product from the local database, and keep it refreshed for every change; now based on new class `ProductModel`; added sentry error calls; typo fix
* `product_list_page.dart`: now we don't store Product and we let the product cards get the product from the local db if and only if needed
* `product_preferences.dart`: new method `getCompactView` used to know if something changed.
* `product_query_model.dart`: now we include the "category" process in the model, and we don't store products.
* `product_query_page.dart`: removed useless and inactive sliver effect and `Hero`; refactored
* `product_query_page_helper.dart`: removed bug generating `Hero`
* `scan_header.dart`: refactored from `scan_page_helper.dart` being removed and slightly modified
* `search_page.dart`: removed bug generating `Hero`
* `smooth_product_carousel.dart`: now we async'ly load product from local database, and don't store them in memory.
* `summary_card.dart`: removed bug generating `Hero`
* `up_to_date_product_provider.dart`: added timestamps for new method `needsRefresh`
* `user_preferences_account.dart`: removed bug generating `Hero`
2022-07-25 08:12:04 +02:00
4e6d51fb67 feat: #2067 - code cleaning (#2185)
Impacted file:
* `personalized_ranking_page.dart`: code cleaning
2022-06-06 15:19:57 +02:00
6fb61c17e4 feat: Update to new color scheme (#2028)
* feat: Update to new color scheme

* Update goldens

* Update packages/smooth_app/lib/themes/smooth_theme.dart

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

* Updated to new smaller color scheme

* Updated Goldens

* Some minor fixes

* Update pubspec.lock

* Update goldens

* Next fixes

* fix login page

* More fixes

* Even more fixes

* latest fixes with pierre

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2022-06-02 19:02:08 +02:00
818cd13979 feat: Harmonize app dialogs (#1978)
* Harmonize app dialogs

* Flat/text button for negative & neutral states
+ fix a missing image

* Remove unused SmoothActionButton implementation

* Fix build issues
2022-05-25 12:43:12 +02:00
c3b44aced2 fix: Flutter 3.0 fixes (#1814)
* fix: Flutter 3.0 fixes

* Workflows

* Update gradle

* Automated fixes

* Manual async gap fixes

* Fix merge conflict reverts

* Format

* qr_code_scanner fixes
2022-05-12 16:07:22 +02:00
52237c1ea0 feat: Dev Mode: setting to change the post frame callback duration (#1766)
* Dev mode to change the post frame callback

* Dialog editor extracted in a dedicated file + some doc

Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2022-05-08 12:15:51 +02:00
093dbac1ad fix: fixes new product found button overflow (#1586)
* fix: fixes new product found button overflow

* removed comments

* reduced padding

* replaced constrained box with expanded
2022-04-18 20:01:25 +02:00
2b86e9541f fix: Overflow in add new product front photo button (#1497)
* Overflow of the button when taking a front photo in French removed

* formatted

* added confirm_button_lable and appbar

* description removed

* added appbar titles

* formatted
2022-04-13 12:51:54 +02:00
47c53f7715 fix: #1537 - moved the "slack" and "email" contact options (#1546)
Impacted files:
* `smooth_main_button.dart`: added a `TODO` about probable deleting of this class.
* `social_handle_view.dart`: moved there "slack" and "email" contact options; refactored
* `user_preferences_settings.dart`: removed the "support" (slack or email) button
2022-04-11 15:15:37 +02:00
809e2efada feat: Auto detect dark theme (#1276)
* made changes for getting theme from shared pref

* constants and methods added

* ui changes for the selecting themeMode

* check dark theme with platform brightness

* removed unnessary fields and imports

* used conext wherever nessacry

* temp fix for showing systemDefault on ui

* formatted the code

* ran flutter format .

* removed unused dark theme prefs

* pulled the changes

* removed  themeprovider from wherever un-necessary

* solve merge conflicts

* create single utility method to check Darktheme

* formatted the code

* added todo for translation

* used isDarkMode function throughout the code

* deleted scrshots from test/pages/failures

* call provider to get theme data

* fix: Mock data for screenshot tests

* Update next_button.dart

* Update next_button.dart

Co-authored-by: M123-dev <marvinmoel05@gmail.com>
Co-authored-by: Marvin M <39344769+M123-dev@users.noreply.github.com>
2022-03-30 18:52:07 +02: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
e874bbeea0 refactor: Package merge (#981) 2022-01-26 16:50:13 +01:00