Page MenuHomePhabricator

Include error-hover state in the rest of form components containing error
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

In T346168 we've implemented the error-hover state using border-color-error--hover in TextInput. We need to include the same logic in the other components utilized in forms that contain error states.

  • TextArea
  • Select
  • ChipInput

User stories

  • As a user, I need to know when a TextArea and Select are interactive when error.

Design spec

Link the spec sheets here once they are completed.

Open questions

Acceptance criteria (or Done)

Design

  • Design the Figma spec sheets for those components and link them in this task:
    • TextArea
    • Select
    • ChipInput
  • Update the components in the Codex Figma library. This step will be done by a DST member.
  • Update the image and list of states in the Guidelines > Interaction states in both:
    • TextArea
    • Select
    • ChipInput

Code

  • Update components in Codex using the border-color-error--hover token in the error-hover state:
    • TextArea
    • Select
    • ChipInput

Future tasks

Event Timeline

Change #1023135 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] Select, TextArea, TextInput: Implement error hover feedback

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

@bmartinezcalvo This task currently says rest of the form components, but names only TextArea and Select right now. Combobox, Radio etc. are also missing.

El T363137#9739039, @Volker_E escribió:

@bmartinezcalvo This task currently says rest of the form components, but names only TextArea and Select right now. Combobox, Radio etc. are also missing.

@Volker_E at the moment, Combobox, Lookup, and Radio doesn't provide error state. I guess we will need to include the error state within all the components that can be contained within Field:

  • Radio: there is an option where the Radio group with no initial selection. In this case, the radios could contain errors in case the form Field is mandatory and the user doesn't select one of the radios.
  • Combobox: If the form Field is mandatory and the user leaves the Combobox empty with no selection, would the Combobox contain an error?
  • Lookup: same, in case the form Field is mandatory and the user leaves the Lookup empty with no selection from the menu, would the Lookup contain an error?

Captura de pantalla 2024-04-24 a las 11.02.29.png (1×1 px, 190 KB)

Is there a particular reason why these components haven't incorporated the error state yet?

bmartinezcalvo renamed this task from Include error-hover state in the rest of form components to Include error-hover state in the rest of form components containing error.Wed, Apr 24, 9:03 AM

While not completed mandatory fields are the most common case for erroneous feedback, error states could also apply to non-mandatory field, for example in an inline validation, where a Combobox would have to include a certain pre-given or pattern-following value (think only letters versus other chars like special characters).

On why mentioned components haven't incorporated the error state yet, I can just speculate, that neither error handling nor validation (which came much later and only limited) were a topic when the components were originally requested.

Change #1023135 merged by LWatson:

[design/codex@main] Select, TextArea, TextInput: Implement error hover feedback

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

As decided with @CCiufo-WMF I've created this separate task T363515 to discuss and implement the error in Combobox, Lookup, and Radio, since these components don't provide an error state yet.

Change #1025849 had a related patch set uploaded (by LWatson; author: LWatson):

[mediawiki/core@master] Update Codex from v1.4.0 to v1.5.0

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

Change #1025849 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.4.0 to v1.5.0

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

I've completed the design specifications as outlined in the acceptance criteria. The Figma spec sheet has been updated accordingly. This task is now ready for the development phase.

I've completed the design specifications as outlined in the acceptance criteria. The Figma spec sheet has been updated accordingly. This task is now ready for the development phase.

@SGautam_WMF thank you! Next step is preparing the updated images for the "Interaction states" section in these components page sin Codex. Once you prepare the images, let us know and we will include them in Codex.

Change #1030083 had a related patch set uploaded (by Bmartinezcalvo; author: Bmartinezcalvo):

[design/codex@main] docs: include error-hover state in select, chip-input, and text-area guidelines

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

Change #1030083 merged by jenkins-bot:

[design/codex@main] docs: include error-hover state in Select, ChipInput and TextArea guidelines

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

Change #1030299 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] ChipInput, styles: Implement error-hover state

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

Change #1030906 had a related patch set uploaded (by Bmartinezcalvo; author: Bmartinezcalvo):

[design/codex@main] docs: fix "Interaction states" images in Select, ChipInput and TextArea

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

Change #1030906 merged by jenkins-bot:

[design/codex@main] docs: fix "Interaction states" images in Select, ChipInput and TextArea

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

Change #1030299 merged by jenkins-bot:

[design/codex@main] ChipInput, styles: Implement error-hover state

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

Change #1032095 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from 1.5.0 to 1.6.0

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

Change #1032095 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from 1.5.0 to 1.6.0

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

Volker_E removed a project: Patch-For-Review.
Volker_E set the point value for this task to 1.