-
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.
In fact, it's rendering well, good job!
Very minor comments added.
class="ecl-form-label{{- invalid ? ' ecl-form-label--invalid' -}}{{- hide_label ? ' ecl-form-label--hidden'-}}" | ||
for={{- _id -}} | ||
> | ||
{% block label _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.
Missing dash :)
> | ||
{% block label _label %} | ||
</label> | ||
{% endif %} |
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.
The dash.
|
||
renderTwigFile( | ||
template, | ||
{ |
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.
It's not an issue for the size of this component. I'd suggest you either use the spec demo data object as a start and then use Object.assign
to modify for specific scenarios, adding properties for invalid_*
and helper_text
for instance, things which are not given from the reference demo data.
{%- if _label is not empty -%} | ||
<label | ||
class="ecl-form-label{{- invalid ? ' ecl-form-label--invalid' -}}{{- hide_label ? ' ecl-form-label--hidden'-}}" | ||
for={{- _id -}} |
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.
what if _id
contains a forbidden char?
The attribute value can remain unquoted if it doesn't contain ASCII whitespace or any of " ' ` = < or >. Otherwise, it has to be quoted using either single or double quotes.
— https://html.spec.whatwg.org/multipage/introduction.html#intro-early-example
"@ecl/ec-component-form-help-block": "^2.1.1", | ||
"@ecl/ec-component-form-label": "^2.1.1", | ||
"@ecl/ec-component-form-select": "^2.1.1", | ||
"@ecl/ec-resources-icons": "~2.1.1", |
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.
mixing "~2.1.1"
and "^2.1.1"
and (in other components) "2.0.0"
or "~2.1.0"
we have to harmonize all that. let's discuss it on slack 😉
PR description
Add component select (EC only)
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 ...)