116 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
6b1c38369a fix: Hotfixes on 4.20.0 (#6600)
* Ensure the NutriScore guide always have a white status bar

* Fix food icons

* Product card without attributes

* Non-selected popular languages must be in the general list

* Fix infinite scroll

* Minor fixes for NOVA 2/3
2025-05-16 21:30:02 +02:00
5d1279cf32 fix Languages sort order (#6592) 2025-05-15 09:51:35 +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
740ea86acb fix: Infinite redraw in the gallery (#6355) 2025-02-11 11:37:15 +01:00
cdf637d960 fix: Product edition UI improvements (#6320)
* Edition improvements

* Sketch file

* Nutrition editor: the Next key is working again on Android

* Nutrition editor: tapping the title will force the focus on the TextField
2025-02-03 17:26:56 +01:00
d8e101666e Languages selector in a modal sheet (#6316) 2025-01-30 16:36:00 +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
4cef8f04e7 fix: 6281 LateError: LateInitializationError (#6287)
* Multi-lingual input for product name

* Fix LateError: LateInitializationError
2025-01-26 12:35:24 +01:00
4890b1bb76 Improvements for nutrition facts input (#6270) 2025-01-24 16:05:19 +01:00
8324456818 feat: Improved nutrition input (#6261)
* Improved nutrition input

* Translate all TODOs

* Loading + error states

* Update labeler

* "Add" icon with the same size as "Help"

* Fix light/dark mode switch issue

* Button to a nutrient at the bottom

* Remove warning
2025-01-21 19:20:48 +01:00
bf5ff8468d Snackbar action button with a different background (#6233) 2025-01-19 12:14:30 +01:00
4e8209d4e7 feat: Same layout between country/language pickers (settings) (#6231)
* Use the same layout between the country and language picker (in the settings)

* Add missing type
2025-01-19 12:14:19 +01:00
975ab434ec Pinch to zoom explanation + handle errors (#6186) 2025-01-12 16:00:46 +01:00
f718444185 feat: 4 bugfixes (URLs, language selector icon & unknown lng) (#6185)
* Wrong icon color for Language Selector

* Ensure the link opens in a browser

* Fix URLs

* UNknown language support for tabbar
2025-01-12 12:20:07 +01:00
a3f44f4c3b KP enhancements (#6184) 2025-01-12 12:14:47 +01:00
af4e8c3aa3 fix: Harmonize owner field icon + bugfixes (#6175)
* Harmonize owner field icon

* Margin fix

* Remove warnings

* Fix Login/Signup pages

* Emojis disabled + text capitalization
2025-01-11 12:07:08 +01:00
0102ede2d2 Edit product page: clickable barcode + open product on website (#6180) 2025-01-11 12:04:51 +01:00
e37d5698db 3 variants (#6163) 2025-01-10 11:29:44 +01:00
54b9f4010e Use a SmoothFloatingSnackbar on all screens (#6169) 2025-01-10 09:58:27 +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
019e319384 feat: New UI for history/search lists (#6161)
* Change the UI of history/search list items

* Update goldens
2025-01-09 16:08:37 +01:00
5ddb5127ec New UI for ingredients (#6156) 2025-01-08 13:38:50 +01:00
1f8ad04833 feat: UI improvements for the edit mode (bis) (#6147)
* Improvements for Edit mode (once again)

* Basic details improvements

* Basic details hints

* Force the new layout on subpages
2025-01-07 14:14:46 +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
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
85c13502d2 Migration to Flutter 3.27 (#6076)
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
2024-12-29 15:20:05 +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
2bffec147e Photo gallery with tabs (#5872) 2024-11-18 13:24:40 +01:00
45b7e7b39e feat: 5430 - "producer provided" icon for nutrients and 4 product fields (#5777)
* feat: 5430 - "producer provided" icon for nutrients and 4 product fields

Impacted files:
* `add_basic_details_page.dart`: display "producer provided" icon for name, brands and quantity
* `nutrition_page_loaded.dart`: display "producer provided" icon for serving size and each individual nutrient
* `product_query.dart`: set the icon to display when a product field value is "producer provided"
* `smooth_autocomplete_text_field.dart`: added parameter `suffixIcon`
* `smooth_text_form_field.dart`: added parameter `suffixIcon`

* Minor code cleaning

* Minor code cleaning

* Standard info tile about "owner fields"

New file:
* `owner_field_info.dart`: Standard info tile about "owner fields".

Impacted files:
* `add_basic_details_page.dart`: now displaying `OwnerFieldInfo` if relevant; minor refactoring
* `nutrition_page_loaded.dart`: now displaying `OwnerFieldInfo` if relevant; minor refactoring
* `product_query.dart`: moved field to new file `owner_field_info.dart`

* translations and semantics

Impacted files:
* add_basic_details_page.dart: added semantics
* app_en.arb: 2 new labels for "owner field info"
* nutrition_page_loaded.dart: added semantics
* owner_field_info.dart: translated labels

* typo fix
2024-11-11 11:48:27 +01:00
7045e2ce6f Add a loading state to the tagline image (#5832) 2024-11-11 09:42:25 +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
3c8c299d28 fix: Invisible loading animation (#5641) 2024-09-30 09:13:10 +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
9cbcf75d5d feat: Disallow emojis on brand name (#5461)
* Disallow emojis on brand name

* Fix Lint warning
2024-07-23 09:54:25 +02:00
1ff9a0a9b0 feat: Spellchecker on product name 5415 (#5451)
* feat: added spell check configuration to the smooth text form

* feat: added spellcheck to product field in basic details page

* fix: fixed formatting
2024-07-04 15:29:24 +02:00
1c4b95954e fix: Fix performances on the photos gallery (#5447)
* Improve performances for the photos gallery

* Allow to pass an `ImageSize` to `ProductImageWidget`

* Update packages/smooth_app/lib/pages/image/product_image_gallery_other_view.dart

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

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2024-06-28 09:07:12 +02:00
da76dd2cf0 Accessibility improvements for the list of prices (#5413) 2024-06-20 17:44:40 +02:00
b6ad19022d chore: removed unused package percent_indicator (#5308) 2024-05-30 11:37:24 +02:00
1922d39f07 feat: 5128 - visible dates on raw image grid items (#5144)
Impacted files:
* `product_image_gallery_other_view.dart`: display the upload date on top of raw image grid items
* `product_image_gallery_view.dart`: unrelated minor refactoring
* `pubspec.lock`: wtf
* `pubspec.yaml`: upgrade to off-dart 3.5.0 in order to get the uploaded timestamp of raw images
* `smooth_image.dart`: unrelated minor refactoring
2024-04-08 13:01:13 +02:00
4d9c7fc48c feat: 4996 - reordering product languages (#5025)
New file:
* `language_priority.dart`: Helper around the language priority.

Impacted files:
* `add_basic_details_page.dart`: minor refactoring
* `dao_string_list.dart`: now storing the latest languages used locally in the app
* `edit_ocr_page.dart`: minor refactoring
* `language_selector.dart`: now showing app and product languages as first languages
* `multilingual_helper.dart`: minor refactoring
2024-02-04 14:44:24 +01:00
7e711d1850 fix: 4924 - OCR page minor UI improvements (#5017)
Impacted files:
* `edit_ocr_page.dart`: uncropped the "no image" placeholder; padded the text; reshaped the "add" button
* `picture_not_found.dart`: minor refactoring
* `product_image_local_button.dart`: removed a confusing parameter
* `product_image_viewer.dart`: removed a confusing parameter
2024-01-29 08:45:07 +01:00
e904b05630 fix: Don't rely on removeDiacritics to highlight text (#4636)
* When we highlight a suggestion, we can't rely on the `removeDiacritics`, as it replaces some letters of 1 word into 2 or +

* Better algorithm

* Remove unused things

* Fix typo

* Unnecessary brackets

* Replace all `toLowerCase` + `removeDiacritics` by a single `getComparisonSafeString`

* Reformat CountrySelector

* `removeAccents` removed + 1 new test

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-12-16 12:08:01 +01:00
f81ba98ec1 feat: Use the Slivers mechanism with the Gallery view (#4913)
* Use the Slivers mechanism with the Gallery view

* Remove the print from the demo

* Also remove keep alives

* Ok, here is your format thing

* Remove Provider
2023-12-16 12:06:17 +01:00
21469afdab feat: Create a screen listing all attributes for a product (#4714)
* feat: Create a screen listing all attributes for a product

- resolves: #4673
- I have just added a simple button in edit product page just to test the
new page. It will be removed and added in the paticular screen.
- taking `edit_product_page.dart` as a base `product_attribute_page.dart`
is designed as suggested by teolemon.
- Added all the mentioned section field in the issue.

* refactor: chnages done according to the feedback

- created seperte file for `svg_icon.dar`
- created newFile for `attribute_first_row_widget.dart`
- removed refreshIndicator
- useed stringbuffer for string concatenation
- fix: linting errors

* fix: move nutrients extraction to init state

- to avoid recalculation on every build

* remove usage of knowledgepanel, use product.nutriments

* move ingredient extraction to initstate

* helper abstract class for attribute_first_row_widget

* remove ui file and abstract ontap function

* tiny fix

* change ontap function to future<void>

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

---------

Co-authored-by: monsieurtanuki <fabrice_fontaine@hotmail.com>
2023-11-04 15:20:06 +01:00
9f713f5c20 feat: Add btn to finish adding new product (#4706) 2023-10-31 23:51:59 +01:00
efb0483f60 feat: 4674 - new UI for main image page; fallback image only for product icon (#4738)
Impacted files:
* `add_new_product_helper.dart`: minor refactoring
* `add_new_product_page.dart`: minor refactoring
* `image_field_extension.dart`: minor refactoring
* `product_cards_helper.dart`: removed references to fallback image - now we stick to the specified language; minor refactoring
* `product_image_carousel.dart`: minor refactoring
* `product_image_gallery_view.dart`: added a language selector; new UI
* `product_image_swipeable_view.dart`: added an optional language parameter; simplified the code now relying only on `ImageField`
* `product_image_viewer.dart`: minor refactoring
* `smooth_list_tile_card.dart`: minor refactoring
* `smooth_product_image.dart`: now we explicitly use the default image if needed
2023-10-28 12:23:00 +02:00
7f3bddf147 Responsive dialog when there is no product (#4315) 2023-08-03 14:33:11 +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