-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(TextareaField): add TextArea base component and TextareaField #1493
Conversation
Codecov Report
@@ Coverage Diff @@
## next #1493 +/- ##
==========================================
+ Coverage 91.87% 91.90% +0.02%
==========================================
Files 272 277 +5
Lines 4113 4177 +64
Branches 732 755 +23
==========================================
+ Hits 3779 3839 +60
- Misses 309 313 +4
Partials 25 25
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
size-limit report 📦
|
Notes to self:
|
d4451f9
to
867c56a
Compare
6b39903
to
bd4100f
Compare
bd4100f
to
1e852b5
Compare
@jinlee93 we can talk thru the states when an input is required and empty. b/c we don't apply I was thinking to try and use |
c8f1563
to
4a0c7d2
Compare
- create TextArea base component - for now exporting, but we would want to treat this similar to how we do the input base component - will sync with latest design before merging - create TextareaField component (augmenting with label, a11y changes, etc.) - specify examples for updating height using rows - handle disabled on base component
4a0c7d2
to
1fa0d5d
Compare
args: { | ||
rows: 10, | ||
}, | ||
}; |
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.
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.
not a bad idea. I was planning to create a separate ticket for the text count thing, as there are a few behaviors i want to discuss.
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.
@jinlee93 created ticket and tagged you on that one!
@@ -133,13 +133,15 @@ | |||
* Input error state | |||
*/ | |||
&.error { | |||
/* TODO: should this color be applied when a field is in an :invalid state */ |
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.
Can we make input have an invalid
state manually, or is it interpreted from fields such as the disabled
attribute?
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.
:invalid
is determined by the browser based on other attributes, and the value in the field, so it's not really an attribute unto itself. for <textarea>
s :invalid
applies if the value in the field is outside the bounds of what minlength
and maxlength
says is allowed (and in the case of maxlength
only after some user action triggers the check, which is weird)
For <input>
s, :invalid
applies if you have a required
field, and it becomes empty OR if the pattern
is violated, along with the above.
When i added &:invalid
to the selector list on line 135, it changed some TextField snapshots to an error state b/c the fields didn't have any default value. this means that blank forms might start out with red outlines if marked as required, which we don't want
@import '../../design-tokens/mixins.css'; | ||
|
||
/*------------------------------------*\ | ||
# TEXTAREA |
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.
nit: is textarea one word or two words loll 🤔 (doesn't actually need to change)
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.
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.
Looks good!
## [10.0.0](v9.1.0...v10.0.0) (2023-03-02) ### ⚠ BREAKING CHANGES * remove data-bootstrap-override EDS-850 ### Features * **Avatar:** add avatar component ([#1510](#1510)) ([bc21f85](bc21f85)) * **slider:** create slider ([#1503](#1503)) ([e7ced34](e7ced34)) * **TextareaField:** add TextArea base component and TextareaField ([#1493](#1493)) ([f2ba31d](f2ba31d)) ### Bug Fixes * remove data-bootstrap-override EDS-850 ([3b5d59b](3b5d59b)) * remove old, outdated, unnecessary snapshot ([fb63a34](fb63a34)) * **Select:** sync label design with form fields ([#1506](#1506)) ([efe9330](efe9330)) * update deps ([9a80e7f](9a80e7f)) * upgrade axe-core from 4.4.3 to 4.6.3 ([af3f9c5](af3f9c5))
Summary:
Test Plan:
TODO