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: Nutrition edition: no listener was set on unit/"data per" #4579

Merged
merged 1 commit into from Mar 21, 2022

Conversation

g123k
Copy link
Contributor

@g123k g123k commented Mar 21, 2022

I think I've found why the "nutrition_data_per" was always wrong: no listener was set on the radio group.
This should resolve #4470

(But please test it, as I'm not 100% sure)

@g123k g123k requested a review from a team as a code owner March 21, 2022 20:38
@g123k g123k changed the title fix: Nutrition edition: no listener was set on the unit fix: Nutrition edition: no listener was set on the unit/"data per" Mar 21, 2022
@sonarcloud
Copy link

sonarcloud bot commented Mar 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@g123k g123k changed the title fix: Nutrition edition: no listener was set on the unit/"data per" fix: Nutrition edition: no listener was set on unit/"data per" Mar 21, 2022
@teolemon
Copy link
Member

I'm going to merge and deploy it to internal so that we can thoroughly test.

@teolemon teolemon merged commit 9772106 into openfoodfacts:develop Mar 21, 2022
@teolemon
Copy link
Member

teolemon commented Mar 22, 2022

@g123k
Copy link
Contributor Author

g123k commented Mar 22, 2022

I have noticed this behavior yesterday, but wasn't sure if it was a bug or not.
If the switch is set to ON, we should hide the rest of the UI? And the same goes for the data sent to the server, isn't it?

@teolemon
Copy link
Member

We should hide it, but reshow it when we untick the toggle, and ensure the boolean is sent each time.

@g123k
Copy link
Contributor Author

g123k commented Mar 22, 2022

Ok I will fix that

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.

[Bug]: Application does not take into account "per portion" switch when entering nutrition facts
2 participants