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: reset preferences instead of deleting + add switch to use preferences in preferences + fix bug for unknown mandatory attributes #6800

Merged
merged 9 commits into from
May 25, 2022

Conversation

stephanegigandet
Copy link
Contributor

@stephanegigandet stephanegigandet commented May 19, 2022

image

@stephanegigandet stephanegigandet requested a review from a team as a code owner May 19, 2022 17:02
@github-actions github-actions bot added the Translations We use a non-standard version of GetText, lack language variants support translate.openfoodfacts.org label May 19, 2022
po/common/en.po Outdated Show resolved Hide resolved
@stephanegigandet stephanegigandet changed the title feat: reset preferences instead of deleting + add switch to use preferences in preferences feat: reset preferences instead of deleting + add switch to use preferences in preferences + fix bug for unknown mandatory attributes May 20, 2022
@sonarcloud
Copy link

sonarcloud bot commented May 20, 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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alexgarel alexgarel added the personal search https://wiki.openfoodfacts.org/Project:Personalized_Search label May 23, 2022
Copy link
Member

@alexgarel alexgarel left a 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>';
Copy link
Member

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

Copy link
Contributor Author

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 :)

@stephanegigandet stephanegigandet merged commit 9251301 into main May 25, 2022
@stephanegigandet stephanegigandet deleted the product-match branch May 25, 2022 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
personal search https://wiki.openfoodfacts.org/Project:Personalized_Search Translations We use a non-standard version of GetText, lack language variants support translate.openfoodfacts.org
Projects
Development

Successfully merging this pull request may close these issues.

3 participants