Page MenuHomePhabricator

Select: unify styles with the rest of form items
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

There are some visual inconsistencies between Select and the rest of form items (Combobox, TextInput, Lookup):

  • Padding is not the same as flagged in T340858: Select: unify padding with TextInput
  • Background color: It will finally remain @background-color-interactive-subtle while TextInput, Combobox, and Lookup will use @background-color-base
  • Placeholder text: Select uses color-base while TextInput, Combobox, and Lookup use color-placeholder

We need to evaluate updating the Select component to unify its styles with the ones in the rest of form items.

Captura de pantalla 2024-10-02 a las 13.36.22.png (500×1 px, 49 KB)
Captura de pantalla 2024-10-02 a las 13.36.30.png (496×1 px, 52 KB)

Known use cases

image.png (1×896 px, 114 KB)
On Wikifunctions they use a combination of TextInput, Select, and Lookup component to let contributors edit a Wikifunctions object (a typed JSON) via a GUI.

Design spec

  • Left padding 8px
  • Default state: @color-subtle, @background-color-interactive-subtle, @border-color-interactive
    • Hover on default state: @color-subtle, @background-color-interactive-subtle--hover, @border-color-interactive--hover
  • Filled state: @color-base, @background-color-interactive-subtle, @border-color-interactive
    • Hover on filled state: @color-base, @background-color-interactive-subtle--hover, @border-color-interactive--hover

Open questions

  • Do we want to use @background-color-base for the Select's background? No, we will finally use @background-color-interactive-subtle in Select

Acceptance criteria (or Done)

Design

  • Design the Figma spec sheet and add it in this task
  • Update the component in the Figma library. This step will be done by a DST member.

Code

  • Implement the component updates in Codex

Future tasks

Event Timeline

bmartinezcalvo renamed this task from Select: evaluate the background color to Select: unify styles with the rest of form items.Oct 2 2024, 11:37 AM
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo added a subscriber: DTorsani-WMF.
CCiufo-WMF triaged this task as Low priority.
CCiufo-WMF set the point value for this task to 0.

Temporary estimate to reflect design work this sprint.

DTorsani-WMF changed the point value for this task from 0 to 1.Oct 29 2024, 6:55 PM

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

[design/codex@main] Select: unify form element styles

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

CCiufo-WMF raised the priority of this task from Low to Needs Triage.Nov 12 2024, 5:47 PM
CCiufo-WMF moved this task from Backlog to Needs Refinement on the Design-System-Team board.

Change #1088361 merged by jenkins-bot:

[design/codex@main] Select: unify form element styles

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

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

[design/codex@main] Select: unify form element styles

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

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

[mediawiki/core@master] Update Codex from v1.16.0 to v1.17.0

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

Test wiki created on Patch demo by Eric C Gardner using patch(es) linked to this task:
http://patchdemo.wmcloud.org/wikis/421c033f07/w/

Change #1098171 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.16.0 to v1.17.0

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

The padding change results in this, which is design-wise problematic:

image.png (766×308 px, 57 KB)

@Volker_E do you mean because the horizontal padding of menu items within a menu is 12px and not 8px, same as the new select styles? I think that's okay. We could update it to be 8px, but I think we could make that update later. I also think it might be okay that the menu items feel a bit indented from the select.

@DTorsani-WMF Indeed. This looks unclean and faulty to me. But in all honesty I might be too old-school here when I compare it with a number of macOS menus end of 2024. 🙂

The padding change results in this, which is design-wise problematic:

image.png (766×308 px, 57 KB)

Since the rest of inputs use 8px padding, the padding between the menu items and the input is currently inconsistent in all the form items displaying a menu (Combobox, Lookup, MultiselectLookup).

Captura de pantalla 2024-12-05 a las 18.13.32.png (434×789 px, 20 KB)

In case we want to align input and menu items, there are 2 possible solutions:

  • Update the MenuItem paddings from 12px to 8px
  • Update all the form items paddings from 8px to 12px

For now, I would solve this task since this was to align the Select styles with the rest of the form items. We will explore how to align the menu with Select (and the rest of items displaying a Menu) in T381566.

Change #1097486 merged by jenkins-bot:

[design/codex@main] Select: unify form element styles

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

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

[mediawiki/core@master] Update Codex from v1.17.0 to v1.18.0

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

Change #1101943 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.17.0 to v1.18.0

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

Test wiki on Patch demo by Eric C Gardner using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/421c033f07/w/