-
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 character length counter #1580
Conversation
size-limit report 📦
|
Codecov Report
@@ Coverage Diff @@
## next #1580 +/- ##
==========================================
+ Coverage 91.63% 91.69% +0.06%
==========================================
Files 279 279
Lines 4267 4289 +22
Branches 776 786 +10
==========================================
+ Hits 3910 3933 +23
+ Misses 331 330 -1
Partials 26 26
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
39c62f9
to
e066606
Compare
I don't see a story that includes the character count, would it be worth capturing that state? |
@jeremiah-clothier We apply character count when there's a |
Oh, I guess I was looking at the wrong chromatic build. I didn't realize their had been a few for the PR and the stories with that character limit displayed were already accepted |
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.
Any thoughts on having character count validation either as a recipe or a wrapping component to also be used on InputField?
@jinlee93 having the counter exist as a separate composable component isn't a bad idea. We can confer with design if any other fields like |
Makes sense to me, thanks |
- only shows up if max length is specified - turns red if the default value is greater than allowed - updates as you type - currently no warning color as you approach limit - by default textareas do not allow entry above maxlength - but you can delete if somehow above maxlength - handle custom onChange events
e066606
to
dab979f
Compare
## [12.0.0](v11.1.1...v12.0.0) (2023-04-17) ### ⚠ BREAKING CHANGES * use rollup (#1555) ### Features * export some subcomponents ([#1579](#1579)) ([2857ae4](2857ae4)) * **TextareaField:** add character length counter ([#1580](#1580)) ([ff6226f](ff6226f)) ### Bug Fixes * restore check for undefined any types ([#1585](#1585)) ([c7fae07](c7fae07)) * **Skeleton:** mark .Rect as deprecated ([#1586](#1586)) ([405f81b](405f81b)) * sync typography presets to documentation ([#1592](#1592)) ([b56eadb](b56eadb)) * **typography:** add missing eds-font-size-20 ([#1591](#1591)) ([de5dd03](de5dd03)) ### build * use rollup ([#1555](#1555)) ([d794696](d794696)), closes [#1558](#1558) [#1572](#1572) [#1581](#1581) [#1582](#1582)
Summary:
Test Plan: