Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/character count component #419

Merged
merged 9 commits into from
Mar 2, 2023

Conversation

szilvihorvath
Copy link
Collaborator

@szilvihorvath szilvihorvath commented Feb 22, 2023

Issue: #414

Created new CharacterCount component.

Key features:

  • Developer should be able to specify the character limit number
  • Developer should be able to pass in the character limit prompt message (one when JS is enabled, and another for when non-js is disabled)
  • HTML structure should match GDS markup (with ability to set css classes) or the developer should be able to specify the HTML markup
  • Character should count down when JS is enabled

@daniele-zurico
Copy link
Contributor

daniele-zurico commented Feb 23, 2023

Hey @szilvihorvath really well done on your PR. It's almost perfect. I had a look on the gds toolkit documentation and I found out more scenario that we should take in consideration like the following:

  • it doesn't stop you writing but change the message when you over the limit (became red)

  • it counts the letters (maxlength)

  • it counts the words (maxwords)

  • it allow a threeshold after that the message appear (maxlength: 112, threshold: 75)

  • Please can you also keep an eye on the styled version (govUk)... I feel like some classes are not correctly implemented. Probably the class govuk-textarea should make the job.

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change

Comparison is base (cf21f21) 100.00% compared to head (2d15b2a) 100.00%.

❗ Current head 2d15b2a differs from pull request most recent head 86a1b0c. Consider uploading reports for the commit 86a1b0c to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@              Coverage Diff              @@
##           release/0.7      #419   +/-   ##
=============================================
  Coverage       100.00%   100.00%           
=============================================
  Files               45        46    +1     
  Lines             1029      1075   +46     
  Branches           400       428   +28     
=============================================
+ Hits              1029      1075   +46     
Impacted Files Coverage Δ
src/characterCount/CharacterCount.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@daniele-zurico daniele-zurico self-requested a review March 2, 2023 11:41
daniele-zurico
daniele-zurico previously approved these changes Mar 2, 2023
@daniele-zurico daniele-zurico requested a review from Ibabalola March 2, 2023 12:01
Co-authored-by: Isaac Babalola <Ibabalola@users.noreply.github.com>
Co-authored-by: Isaac Babalola <Ibabalola@users.noreply.github.com>
Ibabalola
Ibabalola previously approved these changes Mar 2, 2023
@daniele-zurico daniele-zurico self-requested a review March 2, 2023 12:20
daniele-zurico
daniele-zurico previously approved these changes Mar 2, 2023
@daniele-zurico daniele-zurico dismissed stale reviews from Ibabalola and themself via 86a1b0c March 2, 2023 13:00
@daniele-zurico daniele-zurico self-requested a review March 2, 2023 13:06
@daniele-zurico daniele-zurico merged commit ff0ce65 into release/0.7 Mar 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants