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: #1060 - added an "exclude ecoscore" switch in dev mode #1510

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • product_cards_helper.dart: added the exclusion of "excluded attributes"
  • smooth_matched_product.dart: added the exclusion of "excluded attributes"
  • smooth_product_card_found.dart: added the exclusion of "excluded attributes"
  • summary_card.dart: added the exclusion of "excluded attributes"
  • user_preferences.dart: added the list of "excluded attributes"
  • user_preferences_attribute_group.dart: added the exclusion of "excluded attributes"
  • user_preferences_dev_mode.dart: added a switch for "exclude ecoscore"; refactored

What

  • the idea is to emulate what life would be like without "ecoscore" (which is the case in most countries)
  • more specifically, to check the impact on scores and display
  • the next step would be to know which countries have ecoscore
  • but for the moment, it's just a switch in dev mode

Screenshots

Tests with "strong" matching, "pizza", from Estonia (it looks like Polish pizzas to me) (no, it's not a French saying ;)

  • with "ecoscore" explicitly excluded

Simulator Screen Shot - iPhone 8 Plus - 2022-04-07 at 10 34 35

  • without "ecoscore" explicitly excluded (previous behavior)

Simulator Screen Shot - iPhone 8 Plus - 2022-04-07 at 10 35 34

Part of

…mode

Impacted files:
* `product_cards_helper.dart`: added the exclusion of "excluded attributes"
* `smooth_matched_product.dart`: added the exclusion of "excluded attributes"
* `smooth_product_card_found.dart`: added the exclusion of "excluded attributes"
* `summary_card.dart`: added the exclusion of "excluded attributes"
* `user_preferences.dart`: added the list of "excluded attributes"
* `user_preferences_attribute_group.dart`: added the exclusion of "excluded attributes"
* `user_preferences_dev_mode.dart`: added a switch for "exclude ecoscore"; refactored
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner April 7, 2022 08:41
@monsieurtanuki monsieurtanuki requested a review from M123-dev April 7, 2022 08:41
@codecov-commenter
Copy link

Codecov Report

Merging #1510 (b8bc7a4) into develop (c5780f0) will decrease coverage by 0.04%.
The diff coverage is 18.91%.

@@            Coverage Diff             @@
##           develop   #1510      +/-   ##
==========================================
- Coverage     8.94%   8.90%   -0.05%     
==========================================
  Files          161     162       +1     
  Lines         6514    6568      +54     
==========================================
+ Hits           583     585       +2     
- Misses        5931    5983      +52     
Impacted Files Coverage Δ
...cards/product_cards/smooth_product_card_found.dart 0.00% <0.00%> (ø)
...s/smooth_app/lib/helpers/product_cards_helper.dart 0.00% <0.00%> (ø)
...smooth_app/lib/helpers/smooth_matched_product.dart 1.44% <0.00%> (-0.07%) ⬇️
...ges/smooth_app/lib/pages/product/summary_card.dart 0.00% <0.00%> (ø)
...mooth_app/lib/pages/user_preferences_dev_mode.dart 0.72% <0.00%> (-0.06%) ⬇️
...s/smooth_app/lib/data_models/user_preferences.dart 32.30% <60.00%> (+2.30%) ⬆️
...pp/lib/pages/user_preferences_attribute_group.dart 100.00% <100.00%> (ø)
packages/smooth_app/lib/pages/page_manager.dart 2.12% <0.00%> (-0.32%) ⬇️
...mooth_app/lib/widgets/smooth_product_carousel.dart 0.00% <0.00%> (ø)
...ib/pages/onboarding/onboarding_flow_navigator.dart 1.61% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5780f0...b8bc7a4. Read the comment docs.

@monsieurtanuki monsieurtanuki self-assigned this Apr 7, 2022
Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @monsieurtanuki definitly something we build upon later

@monsieurtanuki monsieurtanuki merged commit 2b6b0b1 into openfoodfacts:develop Apr 7, 2022
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev!

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

Successfully merging this pull request may close these issues.

3 participants