Page MenuHomePhabricator

docs: Add a Field demo showing interactive help-text content
Closed, ResolvedPublic2 Estimated Story Points

Description

Background goal

Add an interactive demo (with code sample) to the Field component page to demonstrate how to embed an interactive character counter in the component's help-text slot.

This can be used as a reference for teams who need to implement similar custom features in their own applications.

Design proposal

  • The characters counter appears next to the Helper text (if the helper text is visible)
  • The characters counter counts down while typing
  • The characters counter becomes error when the user types more than the available characters, and an error inline message appears below the helper and counter. The error in the characters counter is maintained until the user removes the extra characters.
  • When there is no helper text, the inline error message appears next to the error characters counter.

Characters counter.png (1×3 px, 196 KB)

Acceptance criteria

Design

Code

  • Include characters counter as example in the demo (not as component's property at the moment)

Event Timeline

egardner triaged this task as Medium priority.Sep 7 2023, 5:45 PM
egardner set the point value for this task to 2.
egardner renamed this task from docs: Add an Field demo showing interactive help-text content to docs: Add a Field demo showing interactive help-text content.Sep 7 2023, 6:12 PM

Change 955416 had a related patch set uploaded (by Catrope; author: Eric Gardner):

[design/codex@main] docs: Add a Field demo showing a custom character counter

https://gerrit.wikimedia.org/r/955416

Change 955416 merged by jenkins-bot:

[design/codex@main] docs: Add a Field demo showing a custom character counter

https://gerrit.wikimedia.org/r/955416

Change 956973 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[mediawiki/core@master] Update Codex from v0.18.0 to v0.19.0

https://gerrit.wikimedia.org/r/956973

Change 956973 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.18.0 to v0.19.0

https://gerrit.wikimedia.org/r/956973