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: #2364 - new preferences toggles for ingredients / nutrition expand mode #2634

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • app_en.arb: added labels for preferences toggles (ingredients and nutrition)
  • knowledge_panel_card.dart: now uses the new expand flags to expand the contents (or not)
  • user_preferences_settings.dart: added 2 preferences toggles (expand ingredients / nutrition)

What

  • Now in the user preferences, we can activate the expand mode of ingredients and nutrition facts on the product page.
  • Default mode is "not expanded" for both ingredients and nutrition facts.
  • The code is hugely inspired by @cli1005's feat: #2364 expand nutrition ingredients #2392. I wish I could have kept the original code, but I fell into a git rabbit hole that I was not able to escape from, and it was much safer to make a clean copy of the code instead.

Screenshot

Capture d’écran 2022-07-20 à 13 34 31

Fixes bug(s)

…nutrition expand mode

Impacted files:
* `app_en.arb`: added labels for preferences toggles (ingredients and nutrition)
* `knowledge_panel_card.dart`: now uses the new expand flags to expand the contents (or not)
* `user_preferences_settings.dart`: added 2 preferences toggles (expand ingredients / nutrition)
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.

ok on a visual level

@monsieurtanuki monsieurtanuki merged commit cc7c062 into openfoodfacts:develop Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an option to keep the nutrition table expanded
2 participants