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

fix: 5665 - display "add nutrition facts" button only for relevant types #5674

Merged
merged 6 commits into from
Oct 20, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Now we don't display "add nutrition facts" button for irrelevant product types.

Fixes bug(s)

Impacted files

  • add_nutrition_button.dart: new method to check if nutrition facts are relevant for this product type
  • knowledge_panel_action_card.dart: checks if the product type matches before displaying the nutrition facts button
  • knowledge_panels_builder.dart: checks if the product type matches before displaying the nutrition facts button
  • pubspec.lock: upgrade to flutter 3.24

Impacted files:
* `add_nutrition_button.dart`: new method to check if nutrition facts are relevant for this product type
* `knowledge_panel_action_card.dart`: checks if the product type matches before displaying the nutrition facts button
* `knowledge_panels_builder.dart`: checks if the product type matches before displaying the nutrition facts button
* `pubspec.lock`: upgrade to flutter `3.24`
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 6.79%. Comparing base (4d9c7fc) to head (8d178f6).
Report is 376 commits behind head on develop.

Files with missing lines Patch % Lines
...th_app/lib/pages/product/add_nutrition_button.dart 0.00% 3 Missing ⚠️
.../knowledge_panels/knowledge_panel_action_card.dart 0.00% 2 Missing ⚠️
.../lib/knowledge_panel/knowledge_panels_builder.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5674      +/-   ##
==========================================
- Coverage     9.54%   6.79%   -2.76%     
==========================================
  Files          325     404      +79     
  Lines        16411   21583    +5172     
==========================================
- Hits          1567    1466     -101     
- Misses       14844   20117    +5273     

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

@teolemon
Copy link
Member

Thanks @monsieurtanuki 👌

@monsieurtanuki monsieurtanuki merged commit 3185c72 into openfoodfacts:develop Oct 20, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

We should not show the nudge for nutrition on cosmetics
3 participants