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: 3436 - no more "serving size" jump #3921

Merged
merged 1 commit into from
Apr 29, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • When we changed a nutrient unit, the whole page was refreshed. And there was a side-effect with the focus nodes that got recomputed.
  • The fix was to refactor in several Widgets. More specifically, with a StatefulWidget for the nutrient unit, that only refreshes itself.

Fixes bug(s)

Impacted file

  • nutrition_page_loaded.dart: refactored with "real" Widgets

Impacted file:
* `nutrition_page_loaded.dart`: refactored with "real" `Widget`s
@codecov-commenter
Copy link

Codecov Report

Merging #3921 (a0b4d11) into develop (e5bf1cb) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #3921      +/-   ##
===========================================
- Coverage    10.64%   10.63%   -0.01%     
===========================================
  Files          271      271              
  Lines        13478    13489      +11     
===========================================
  Hits          1435     1435              
- Misses       12043    12054      +11     
Impacted Files Coverage Δ
...h_app/lib/pages/product/nutrition_page_loaded.dart 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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

Related: #2621

@monsieurtanuki monsieurtanuki merged commit 9ed1cdc into openfoodfacts:develop Apr 29, 2023
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for your review!

Indeed that's why splitting in different Widgets and possibly different files makes sense.

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.

Nutrition Facts Page: view jumps to empty Serving size field when clicking unit buttons
3 participants