Skip to content
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

Rework of the character count requirements display #1189

Merged
merged 16 commits into from
Nov 25, 2023

Conversation

Oaphi
Copy link
Member

@Oaphi Oaphi commented Aug 23, 2023

This PR reworks the display of character count requirements, including:

  • adds a shared char_count view for reusable & configurable character counters;
  • adds proper abstractions (setCounterState, setInputState, setSubmitButtonState) for the character_count JS handler;
  • ensures character count limits are always displayed on initial load so as the user knows how many they can enter (or left to enter);
  • ensures current character count is properly displayed in forms with content already set;

The following is an example of how the character count will work after the change:

Screencast.from.23.08.2023.17.19.13.webm

Closes #1145

@Oaphi Oaphi self-assigned this Aug 23, 2023
@Oaphi Oaphi added area: ruby Changes to server-side code area: html/css/js Changes to front-end code complexity: easy Issues that should take limited effort to resolve/fix/build. labels Aug 23, 2023
@Oaphi Oaphi force-pushed the 0valt/1145/show-min-length-char-reqs branch from 1a9edc8 to 47a4d21 Compare September 25, 2023 09:32
app/assets/javascripts/character_count.js Outdated Show resolved Hide resolved
app/assets/javascripts/character_count.js Outdated Show resolved Hide resolved
app/views/shared/_char_count.html.erb Show resolved Hide resolved
app/views/shared/_char_count.html.erb Show resolved Hide resolved
@Oaphi Oaphi marked this pull request as ready for review November 21, 2023 03:45
@Oaphi Oaphi requested a review from ArtOfCode- November 21, 2023 03:45
@ArtOfCode- ArtOfCode- merged commit 813dea4 into develop Nov 25, 2023
7 checks passed
@ArtOfCode- ArtOfCode- deleted the 0valt/1145/show-min-length-char-reqs branch November 25, 2023 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: html/css/js Changes to front-end code area: ruby Changes to server-side code complexity: easy Issues that should take limited effort to resolve/fix/build.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minimum length requirements are not shown to the user
3 participants