-
Notifications
You must be signed in to change notification settings - Fork 5
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.
Ec icon is already merged, but we have a failure in the test, here, would you fix this before we go into a full review of the component? Thanks a lot.
For me, locally tests come out ok - later I will check what may be the reason for the wrong tests. |
@planctus the tests have been fixed in the last commit - you can review component now. |
- "type" (string) (default: '') - type of tag (can be 'link', 'button', 'removable') | ||
- "label" (string) (default: '') - tag label | ||
- "default_icon_path" (string ) (default: '') - path for the icon image (need to render Icon component if tag is removable) | ||
- "extra_classes" (optional) (string) (default: '') Extra classes (space separated) for the icon |
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.
typo: this is tag and not icon here (and next line too)
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 don't know what you mean. The variable default_icon_path
defines here the path to the file with icons, which is required for the tag type removable
. Do you mean to change the variable name and description or define this path in the structure of the tag object. e.g.
tag: { type: 'removable', icon_path: '/pathtoicon' }
?
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.
no it's just the comment for extra_classes and extra_attributes. It should be tag instead of icon (but I agree that it is minor)
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.
Ok I see my mistake, I will correct everything after merging with the EC Icon.
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.
Fixed in 069ce05
{{ _tag.label }} | ||
{% if _tag.type=='removable' %} | ||
<span class="ecl-tag__icon"> | ||
{% include '../ec-component-icon/icon.html.twig' with { icon: { type: 'ui', name: 'close', size: 'xs', path: default_icon_path }, extra_classes: 'ecl-tag__icon-close' } %} |
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.
We recently added the extra attribute focusable="false"
to all svg icons, to prevent a bug on Internet Explorer. Could you add it on your side too?
See https://v2--europa-component-library.netlify.com/ec/components/icon/code/
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.
Fixed in 069ce05
All fixed here and test passed please make final review |
Component seems good. |
Fixed in latest commit. Should I always add to every component |
Yes, please do so for every components |
Please nogte that this is deoendent on CC icon so have to be merger after that