Page MenuHomePhabricator

Form field: Design explorations
Closed, ResolvedPublic

Description

Background goal

Explore design solutions for Field component before implementing it in Codex in T309239.

Design proposal

Label style

Label could be customizable to Bold and Regular, but the base style will be Bold.

  • Text size: base font 14px on desktop and 16px on mobile.
  • Format: base style Bold although it could be customized to Regular
  • Color: color-base
Required/Optional

Since all form fields are required by default, we will indicate just the optional ones in order to avoid too many asterisks across the form page. Optional text will appear next to the label and it will be included within the text when the label is multiline. It will be indicated with the whole word in order to be translated to different languages.

  • Text size: base font 14px on desktop and 16px on mobile.
  • Color: color-subtle
  • Separation between label and "Optional": 4px

Captura de Pantalla 2023-02-24 a las 11.23.32.png (1×836 px, 60 KB)

Label and description

A description will be implemented as part of the Field component. It will use the following styles:

  • Text size: base font 14px on desktop and 16px on mobile.
  • Color: color-subtle
  • It could include a link within the text

We will provide some guidelines about the use of Description, Helper text and Tooltip since all of them are used to display informative text for the user but they have some differences. Description and Helper text could contain links while Tooltip will display just informative text.

Captura de Pantalla 2023-03-10 a las 10.10.04.png (1×2 px, 856 KB)

Tooltip

Tooltip will be placed next to the label so it's not separated from the label when the field is too long. Tooltip will be included within the label text when it's multiline.

  • Color: content-base
  • We can use a quiet neutral button to make the tooltip interactive
  • Separation between label and tooltip icon: 8px

Captura de Pantalla 2023-02-24 a las 11.25.27.png (1×1 px, 447 KB)

Helper text and Inline message

For this MVP task, we will implement the same as we have in production to avoid possible problems. So the inline message will appear below the helper text and both texts will be visible in the Field in some cases.
Since the InineMessage is currently a bit prominent, it could be redesigned in T331623 to be more subtle and fit better with the helper text.

Captura de Pantalla 2023-03-10 a las 10.22.22.png (546×796 px, 144 KB)
Captura de Pantalla 2023-03-10 a las 10.21.06.png (586×830 px, 150 KB)
Current InlineMessageProposed InlineMessage in T331623
Characters counter

❌ It will not be implemented as part of the MVP task. It will be implemented in this other task T331000

Field action (e.g. delete)

According to how the fields are connected, the Field component will display two different types of actions:

  • Inline action
  • Stacked action

Captura de Pantalla 2023-03-02 a las 13.57.08.png (858×1 px, 253 KB)

Label placement

We should unify our forms with one single option (label on top or label on left) in order to unify our forms as much as possible. We will implement the label on top for the MVP task. The option with the label on the left will be implemented in future iterations just if it's really needed in the product.

Captura de Pantalla 2023-03-10 a las 10.31.24.png (792×2 px, 449 KB)


Acceptance criteria

  • Explore design proposals for:
    • Label style
    • Required/Optional
    • Label and description
    • Tooltip
    • Helper text and Inline message
    • Characters counter It will be implemented in T331000
    • Field action
    • Label placement
  • Review proposals with the design and DST team

Event Timeline

Restricted Application triaged this task as High priority. · View Herald TranscriptFeb 23 2023, 5:25 PM
bmartinezcalvo added a subscriber: CCiufo-WMF.

As commented with @CCiufo-WMF during our 1on1, we will work the design explorations in this separate task since I'm now working on some design explorations for Field component that will be implemented in T309239.

Now that technical decisions were made on T309239#8661406, Kieran will review and define more in-depth the visual decisions for this component.

The design explorations have been captured in this Figma file. The open questions related to design have been solved and the Field component styles and characteristics have been described in the task description. So I think this task can be solved.

The component's implementation is being discussed in T330803 and once it's decided we will create the Figma component's spec sheet in the MVP task T309239.