-
Notifications
You must be signed in to change notification settings - Fork 5
fix(tag): fix markup for removable tags - TWIG-78 #182
Conversation
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.
Merci @libetho, it's very much ok, just two small things that i found, one of that should now be discovered by our sniffers if we manage to fix their conf.. :)
@@ -37,6 +38,9 @@ | |||
|
|||
{% if _tag.type == 'removable' %} | |||
{% set _css_class = _css_class ~ ' ecl-tag--removable' %} | |||
{% if _tag.aria_label is defined and _tag.aria_label is not empty %} |
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.
@libetho , here we have an extra space.
In the meantime we merged the fix for the configuration of our linters, if you managed to have php7 in your env you can install it following the docs (getting-started) and it should normally run on every commit checking your staged files. There also other scripts in the composer.json that you can use if you have the libraries installed.
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.
Extra space has been removed
<a href="{{ _tag.path }}" class="{{ _css_class }}"{{ _extra_attributes|raw }}> | ||
{{- _tag.label -}} | ||
</a> | ||
{% elseif _tag.type == 'button' %} | ||
<button class="{{ _css_class }}" type="button"{{ _extra_attributes|raw }}> |
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 know this might be inconsistent in all the templates, but why not starting fixing these inconsistencies? :) here i don't get the reason why we put a space between the classes and the type but not between the type and the extra_attributes. Both are correct, but it's weird to have this inconsistency, imho ;)
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've put spaces between all attributes. From point of view its more readable
PR description
Please drop a few lines about the PR: what it does, how to test it, etc.
QA Checklist
In order to ensure a safe and quick review, please check that your PR follow those guidelines:
devDependencies
devDependencies
include
orembed
) asdependencies
@ecl-twig/ec-components
'sdependencies
yarn.lock
contains changes, I have committed itpr: review needed
to indicate that I'm done and now waiting for a review ,pr: wip
to indicate that I'm actively working on it ...)