Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(TextArea): add component #1897

Merged
merged 29 commits into from
Sep 11, 2019
Merged

feat(TextArea): add component #1897

merged 29 commits into from
Sep 11, 2019

Conversation

lucivpav
Copy link
Contributor

@lucivpav lucivpav commented Sep 6, 2019

Implements #755

Prop Meaning
accessibility? Accessibility behavior if overridden by the user.
defaultValue? The default value of the text area.
onChange? Called on change.
value? The value of the text area.
disabled? The text area becomes read-only.

Semantic UI's TextArea for reference
Mozilla's docs on <textarea>

@@ -27,6 +27,7 @@ const unsupportedComponents = [
'Portal',
'Provider',
'RadioGroup',
'TextArea',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a problem (along the lines: "A component is changing an uncontrolled input of type text to be controlled error in ReactJS") when one plays with placeholder in the playground. So I decided to disable it.

Copy link
Member

Choose a reason for hiding this comment

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

Can be reenabled now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since there is no longer placeholder prop on (nor maxLength prop), it can be enabled. But I am not sure about its value

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

Let's add a common test

@miroslavstastny
Copy link
Member

Are there any props you would change/add? Such as minHeight??

No minHeight we have design prop for that. Once you set correct className on ElementType this will work: <TextArea design={{minHeight: '400px'}} />

@lucivpav
Copy link
Contributor Author

lucivpav commented Sep 9, 2019

Let's add a common test

I added unit test as well as a behavior test

@lucivpav

This comment has been minimized.

@lucivpav
Copy link
Contributor Author

lucivpav commented Sep 9, 2019

There should be a text text to the textarea that has limited number of characters. (And used aria-describedby/labeledby)

@lucivpav

This comment has been minimized.

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

Left minor comments, LGTM 👍

Let's add some dumb styles and variables (for margin: 0, resize: vertical) to create boilerplate under Teams theme. And add an entry to CHANGELOG.md before merging 😼

@vercel vercel bot temporarily deployed to staging September 10, 2019 16:21 Inactive
@vercel vercel bot temporarily deployed to staging September 11, 2019 09:08 Inactive
…xample.shorthand.tsx

Co-Authored-By: Oleksandr Fediashov <olfedias@microsoft.com>
@vercel vercel bot temporarily deployed to staging September 11, 2019 10:50 Inactive
@vercel vercel bot temporarily deployed to staging September 11, 2019 12:09 Inactive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants