-
-
Notifications
You must be signed in to change notification settings - Fork 406
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: reset preferences instead of deleting + add switch to use preferences in preferences + fix bug for unknown mandatory attributes #6800
Conversation
stephanegigandet
commented
May 19, 2022
•
edited
Loading
edited
- delete preferences button changed to reset preferences button + a precision that it will be Nutri-Score, Eco-Score, NOVA
- in the preferences selection, add a switch at the top to use the preferences for matching products
- if a mandatory attribute is unknown, the product status is set to unknown (bug identified by @monsieurtanuki in Implement new algorithm to compute how products match users food preferences -- being tested on OFF website smooth-app#1894 (comment) )
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
…s-server into product-match
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM + tested ok
var html = '<fieldset class="switch round success" tabindex="0" id="' + checkbox_id +'_switch" style="float:left;margin:0;margin-right:.5rem;padding-top:0.1rem;">' | ||
+ '<input class="preferences_checkboxes" id="' + checkbox_id + '" type="checkbox"' + checked + '>' | ||
+ '<label for="' + checkbox_id +'"></label></fieldset>' | ||
+ '<label for="' + checkbox_id +'" style="float:left;margin-right:1em;padding-top:4px">' + preferences_text + '</label>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One day you will embrace javascript template strings :-P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do it in another PR :)