Page MenuHomePhabricator

TextInput: add remaining characters counter to TextInput.vue
Closed, InvalidPublic

Description

Description

@Jdforrester-WMF mentioned that it might make sense to add the character counter for text inputs directly to the TextInput.vue component, and I like the idea of preventing future wheels from being reinvented. This will use the existing maxChars prop to calculate the number of characters remaining.

Desired behavior/Acceptance criteria

  • the number of remaining characters is displayed when necessary
  • the user cannot continue typing in the input after maxChars has been reached
  • rendering the counter is togglable (toggleable? able to be toggled?)

Completion checklist

Event Timeline

CCoxwell-WMF changed the task status from Open to In Progress.Aug 8 2023, 8:51 PM

I disagree with this task

Our WlTextInput component was a necessary wrapper for CdxTextInput when we needed the field to expand from fitted to 100% width. However, this feature was dropped after some design considerations, and this rendered the WlTextInput component as an unnecessary wrapper.

Our intention should be to release Wikilambda vue component base of as many unnecessary components as possible, and use Codex directly.

There are plans to incorporate a character count into CdxField component: T331000