Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improved nutrition input #6261

Merged
merged 8 commits into from
Jan 21, 2025
Merged

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Jan 21, 2025

Hi everyone!

The current screen was really irritating me, so I changed a number of things.
Video (offline, due to the server):

ScreenRecording_01-21-2025.14-02-40_1.MP4

No more Switch

Everything is a dropdown, so we can see all the options
Untitled

Direct access to the photo

If no photo is available, the dedicated screen is opened
Untitled

Add a nutrient in a modal sheet

The + button stays at the top of the screen (sticky header) 🤌
Untitled

Bugfixes

There are no more multiple cursors 😮‍💨
IMG_1952

Help for everything

TODO: needs to be done
IMG_1956

There's even an easter egg

Where is it?

@github-actions github-actions bot added 🥫 Product page GitHub 🌐 l10n ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users ✏️ Editing - Nutrition input ✏️ Editing - Basic info input labels Jan 21, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 0.51086% with 779 lines in your changes missing coverage. Please review.

Project coverage is 6.03%. Comparing base (4d9c7fc) to head (3be4b60).
Report is 693 commits behind head on develop.

Files with missing lines Patch % Lines
...b/pages/product/nutrition_page/nutrition_page.dart 0.00% 181 Missing ⚠️
...nutrition_page/widgets/nutrition_facts_editor.dart 0.97% 102 Missing ⚠️
...on_page/widgets/nutrition_add_nutrient_button.dart 0.00% 79 Missing ⚠️
...mooth_app/lib/generic_lib/widgets/smooth_card.dart 0.00% 77 Missing ⚠️
...pp/lib/generic_lib/widgets/smooth_sliver_card.dart 0.00% 66 Missing ⚠️
...nutrition_page/widgets/nutrition_image_viewer.dart 0.00% 43 Missing ⚠️
...ckages/smooth_app/lib/widgets/smooth_dropdown.dart 0.00% 42 Missing ⚠️
...kages/smooth_app/lib/resources/app_animations.dart 0.00% 30 Missing ⚠️
...page/widgets/nutrition_availability_container.dart 3.57% 27 Missing ⚠️
...nutrition_page/widgets/nutrition_serving_size.dart 0.00% 27 Missing ⚠️
... and 18 more
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6261      +/-   ##
==========================================
- Coverage     9.54%   6.03%   -3.52%     
==========================================
  Files          325     469     +144     
  Lines        16411   27437   +11026     
==========================================
+ Hits          1567    1656      +89     
- Misses       14844   25781   +10937     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, but I would add a second way to add a nutrient at the bottom of the table, with an explicit text.
In the future, we could have additional buttons/toggles/nudges at the bottom for edge cases : the product is a mineral water, the product is alcoholized, chocolate, supplements, either manual, or category driven (automatically more fields)

@g123k
Copy link
Collaborator Author

g123k commented Jan 21, 2025

Very nice, but I would add a second way to add a nutrient at the bottom of the table, with an explicit text. In the future, we could have additional buttons/toggles/nudges at the bottom for edge cases : the product is a mineral water, the product is alcoholized, chocolate, supplements, either manual, or category driven (automatically more fields)

Ok, I will bring the button back, but it's so annoying to scroll down everything single time

@g123k
Copy link
Collaborator Author

g123k commented Jan 21, 2025

Untitled

@teolemon teolemon merged commit 8324456 into openfoodfacts:develop Jan 21, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editing - Basic info input ✏️ Editing - Nutrition input ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users GitHub 🌐 l10n 🥫 Product page
Development

Successfully merging this pull request may close these issues.

3 participants