-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Nutrition Facts Table templatization #3631
Conversation
simplify template data structure for nutrition table
@Ban3 @CharlesNepote @hangy @VaiTon : @areeshatariq has templatized the nutrition facts table, it would be great to have your feedback. Thank you! |
|
||
[% FOREACH comparison IN comparisons %] | ||
<label style="display:inline;font-size:1rem;"> | ||
<input type="checkbox" id="[% comparison.col_id %]" name="[% comparison.col_id %]" value="on" [% IF comparison.checked %]checked="checked"[% END %] class="show_comparison"> [% comparison.name %]</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.
Indentation is not consistent: sometimes <space>
, sometimes <tab>
.
Also, here <label></label>
is not correctly indented and "balanced".
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.
@VaiTon @CharlesNepote what's the recommended way? Making all these suggested changes in a single commit OR directly clicking 'Commit suggestion' for every suggested change?
Personally, I'd batch them and add them in one commit. Especially with some simple whitespace changes, I don't see a huge value in having separate commits.
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.
👍
<br> | ||
<input type="radio" id="nutrition_data_compare_percent" value="compare_percent" name="nutrition_data_compare_type" checked> | ||
<label for="nutrition_data_compare_percent">[% lang('nutrition_data_compare_percent') %]</label> | ||
<input type="radio" id="nutrition_data_compare_value" value="compare_value" name="nutrition_data_compare_type"> | ||
<label for="nutrition_data_compare_value">[% lang('nutrition_data_compare_value') %]</label> | ||
|
||
<p class="note">→ [% lang('nutrition_data_comparison_with_categories_note') %]</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.
<br> | |
<input type="radio" id="nutrition_data_compare_percent" value="compare_percent" name="nutrition_data_compare_type" checked> | |
<label for="nutrition_data_compare_percent">[% lang('nutrition_data_compare_percent') %]</label> | |
<input type="radio" id="nutrition_data_compare_value" value="compare_value" name="nutrition_data_compare_type"> | |
<label for="nutrition_data_compare_value">[% lang('nutrition_data_compare_value') %]</label> | |
<p class="note">→ [% lang('nutrition_data_comparison_with_categories_note') %]</p> | |
<br> | |
<input type="radio" id="nutrition_data_compare_percent" value="compare_percent" name="nutrition_data_compare_type" checked> | |
<label for="nutrition_data_compare_percent">[% lang('nutrition_data_compare_percent') %]</label> | |
<input type="radio" id="nutrition_data_compare_value" value="compare_value" name="nutrition_data_compare_type"> | |
<label for="nutrition_data_compare_value">[% lang('nutrition_data_compare_value') %]</label> | |
<p class="note">→ [% lang('nutrition_data_comparison_with_categories_note') %]</p> |
…s/openfoodfacts-server into nutrition-table-wip
|
||
[% FOREACH comparison IN comparisons %] | ||
<label style="display:inline;font-size:1rem;"> | ||
<input type="checkbox" id="[% comparison.col_id %]" name="[% comparison.col_id %]" value="on" [% IF comparison.checked %]checked="checked"[% END %] class="show_comparison"> [% comparison.name %]</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.
@VaiTon @CharlesNepote what's the recommended way? Making all these suggested changes in a single commit OR directly clicking 'Commit suggestion' for every suggested change?
Personally, I'd batch them and add them in one commit. Especially with some simple whitespace changes, I don't see a huge value in having separate commits.
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.
Looks good to me, thank you!
Description:
HTML Template has been created for Nutrition Facts Table using Template::Toolkit
Related issues and discussion: #2416