openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
860 stars 286 forks source link

feat: Nutrition page improvements #5922

Closed g123k closed 25 minutes ago

g123k commented 2 days ago

Hi everyone!

Here are a few changes to the nutrition page. 🎥 Video: https://github.com/user-attachments/assets/e64ce4fb-2988-4654-9719-807bf41a7019

Empty serving size

When there is no serving size, but a quantity for the product, there is an icon to import it easily: IMG_1457

Owner field info

The info is not in the list anymore, but all icons are clickable. They will open a dismissible banner: IMG_3CFCB0576F0D-1

Banner improvements

It's now possible to make a SmoothBanner dismissible. In that case, a Close button will be displayed, and the banner is also dismissible when swiping down.

Bottom button bar

When the keyboard is visible, there is a small padding before the two buttons: BottomBar

Refactor

The close button from the scan cards is the same used for the banner.

codecov-commenter commented 2 days ago

Codecov Report

Attention: Patch coverage is 1.32450% with 149 lines in your changes missing coverage. Please review.

Project coverage is 6.58%. Comparing base (4d9c7fc) to head (a157689). Report is 514 commits behind head on develop.

Files with missing lines Patch % Lines
...h_app/lib/pages/product/nutrition_page_loaded.dart 0.00% 60 Missing :warning:
...smooth_app/lib/pages/product/owner_field_info.dart 2.27% 43 Missing :warning:
packages/smooth_app/lib/widgets/smooth_banner.dart 0.00% 23 Missing :warning:
...es/smooth_app/lib/widgets/smooth_close_button.dart 0.00% 19 Missing :warning:
.../cards/product_cards/smooth_product_base_card.dart 0.00% 2 Missing :warning:
packages/smooth_app/lib/resources/app_icons.dart 50.00% 1 Missing :warning:
.../smooth_app/lib/widgets/v2/smooth_buttons_bar.dart 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #5922 +/- ## ========================================== - Coverage 9.54% 6.58% -2.97% ========================================== Files 325 437 +112 Lines 16411 24650 +8239 ========================================== + Hits 1567 1622 +55 - Misses 14844 23028 +8184 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: