Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

feat: EC component text area #35

Merged
merged 8 commits into from
Feb 28, 2019
Merged

feat: EC component text area #35

merged 8 commits into from
Feb 28, 2019

Conversation

emeryro
Copy link
Contributor

@emeryro emeryro commented Feb 26, 2019

No description provided.

@emeryro emeryro added the pr: wip Mark the PR as WIP label Feb 26, 2019
@emeryro emeryro self-assigned this Feb 26, 2019
@emeryro emeryro added pr: review needed Use this label to show that your PR needs to be review and removed pr: wip Mark the PR as WIP labels Feb 26, 2019
@emeryro emeryro removed their assignment Feb 26, 2019
@planctus planctus added pr: under review and removed pr: review needed Use this label to show that your PR needs to be review labels Feb 26, 2019
Copy link
Contributor

@planctus planctus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The component looks good to me, i just found minor things that can be easily fixed. Thanks!

{% set _id = id|default('') %}
{% set _disabled = disabled|default(false) %}
{% set _invalid = invalid|default(false) %}
{% set _invalid_icon_label = invalid_icon_label|default('') %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this in this component, right? (_invalid_icon_label) It's also in the "notes".

- "hide_label" (boolean) (default: '')
- "placeholder" (string) (default: '')
- "rows" (int) (default: 4)
- "extra_classes" (optional) (string) (default: '') Extra classes (space separated) for the icon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wrongly refers to icon, extra_attributes as well

@emeryro emeryro self-assigned this Feb 27, 2019
@emeryro emeryro added the pr: wip Mark the PR as WIP label Feb 27, 2019
@emeryro emeryro removed their assignment Feb 27, 2019
@emeryro emeryro added pr: review needed Use this label to show that your PR needs to be review and removed pr: wip Mark the PR as WIP labels Feb 27, 2019
@kalinchernev kalinchernev self-assigned this Feb 28, 2019
Copy link
Contributor

@kalinchernev kalinchernev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renders well, I think it's ready to be merged. Questions added for what I noticed going through the code while making the review.


{% set _css_class = ['ecl-text-area'] %}
{% if _invalid %}
{% set _css_class=_css_class|merge(['ecl-text-area--invalid']) %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, yet it "hurts" the eyes not having spaces between assignments. Later in the same document, there are spaces. Too pity there is no prettier for that ...

placeholder="{{- _placeholder -}}"
class="{{- _css_class -}}"
{{- _disabled ? "disabled" -}}
{{- _extra_attributes|raw -}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quickly checked a very-old implementation. It has aria-multiline and role="textbox" attributes. Seems like they could be useful for assisting technologies, would it make sense to include them by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point... I don't know if they have been remove on purpose in ECL 2.
I'll check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it seems, the role="textbox" should not be used in textarea (first paragraph here, and also https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#Technical_summary)

In a similar way, aria-multiline seems to be used only to mimic a textarea, but not in actual textareas.
So I'd leave the implementation as it is.

@kalinchernev kalinchernev removed their assignment Feb 28, 2019
@emeryro emeryro added pr: wip Mark the PR as WIP and removed pr: review needed Use this label to show that your PR needs to be review labels Feb 28, 2019
@emeryro emeryro self-assigned this Feb 28, 2019
@emeryro emeryro added pr: review needed Use this label to show that your PR needs to be review and removed pr: wip Mark the PR as WIP labels Feb 28, 2019
@emeryro emeryro removed their assignment Feb 28, 2019
@kalinchernev kalinchernev removed the pr: review needed Use this label to show that your PR needs to be review label Feb 28, 2019
@kalinchernev kalinchernev dismissed planctus’s stale review February 28, 2019 13:35

Made a new review, checking previous points.

@kalinchernev kalinchernev merged commit a38e2b1 into master Feb 28, 2019
@kalinchernev kalinchernev deleted the ec-component-text-area branch February 28, 2019 13:36
@yhuard yhuard removed pr: modification needed pr: review needed Use this label to show that your PR needs to be review pr: under review labels Mar 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants