Page MenuHomePhabricator

tokens: Implement new static layout background-color tokens
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

  • Description: Currently in a huge number of skins and extensions, Gray 100 #f8f9fa and Gray 200 #eaecf0 ]] are used as backgrounds in various places to add visual structure to the layout. So far we have defined both values only in component specific tokens, that shouldn't be used for the structure case for semantic reasons.
  • History (if needed): In mediawiki.ui/variables are featuring colorGray14 and colorGray15 which are (mis)used for exactly that reasons, to structure layouts
  • Known use case(s):
    • wikitable table header are among the more clearly defined use cases,
    • others in CodeSearch for #f8f9fa and in CodeSearch mediawiki.ui var/hex code for #eaecf0
      • Special:Search: .searchResultImage-thumbnail-placeholder, #mw-searchoptions, Special:Contribute: .mw-contribute-tabs-content
      • pre, code, .mw-code backgrounds

Previous implementations

  • Codex demo: Codex background-color token demo
  • Design style guide: In the DSG both colors are used too, the lighter as image figure background, the darker as page background (header).

User stories

As designer, there are page/view layout structuring needs, where subtle grays Gray 100 and Gray 200 are used for.

Design spec

Open questions

  • Nomenclature semantically important
    • Considerations: Nomenclature definition:
      • @background-color-light/@background-color-lightest or
      • background-color-page-xxx or
      • background-color-area-xxx

Decision: We've turned the decision on the head and went for naming the interactive backgrounds intentionally. It's clearer in the bigger token application, as most interactive elements are aimed to come out of premade Codex components, while page layouts will be mixed inside and majority outside Codex via skin variables.

Acceptance criteria for Done

Design

  • Design the Figma spec sheet and add it in this task
  • Add the new tokens as Figma variables in the library. This step will be done by a DST member.
  • Replace the color tokens in the components needed: Framed Tabs background, Thumbnail Placeholder, and ChipInput (when chips are separated from the input)

Code

Related Objects

StatusSubtypeAssignedTask
OpenJdrewniak
OpenJdrewniak
Openovasileva
ResolvedJdlrobson
Openovasileva
Openovasileva
ResolvedJdlrobson
Resolvedovasileva
ResolvedBUG REPORTJdlrobson
ResolvedBUG REPORTJScherer-WMF
OpenNone
Resolvedovasileva
ResolvedBUG REPORTovasileva
Openovasileva
ResolvedBUG REPORTovasileva
ResolvedBUG REPORTabi_
ResolvedBUG REPORTNikerabbit
ResolvedBUG REPORTovasileva
OpenNone
ResolvedBUG REPORTJdlrobson
In ProgressDTorsani-WMF
Resolvedovasileva
ResolvedVolker_E

Event Timeline

Restricted Application triaged this task as High priority. · View Herald TranscriptApr 19 2023, 9:07 PM

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

[design/codex@main] [WIP] tokens: Add area background color tokens and apply

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

egardner raised the priority of this task from High to Needs Triage.Oct 2 2023, 9:14 PM
egardner moved this task from Needs Refinement to Backlog on the Design-System-Team board.
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo updated the task description. (Show Details)

I've included the new background color tokens in the Figma library and I've updated the following components n the Figma library with these new colors: ChipInput (when the chips are outside the input), Thumbnail's placeholder and Framed Tabs background.

@bmartinezcalvo what about tables, code blocks and categories? Should they also use @background-color-neutral-subtle ?
On https://en.wikipedia.org/wiki/Barcelona

Screenshot 2024-03-01 at 8.16.33 AM.png (448×1 px, 154 KB)

Screenshot 2024-03-01 at 8.18.26 AM.png (1×548 px, 108 KB)

On https://www.mediawiki.org/wiki/User:Jdlrobson/codeblock
Screenshot 2024-03-01 at 8.21.40 AM.png (132×204 px, 8 KB)

@bmartinezcalvo what about tables, code blocks and categories? Should they also use @background-color-neutral-subtle ?
On https://en.wikipedia.org/wiki/Barcelona

Screenshot 2024-03-01 at 8.16.33 AM.png (448×1 px, 154 KB)

I've updated just the components in the Figma libraries and we don't have this as Figma component. But in code this should be updated as well with the new @background-color-neutral-subtle #F8F9FA.

Screenshot 2024-03-01 at 8.18.26 AM.png (1×548 px, 108 KB)

On https://www.mediawiki.org/wiki/User:Jdlrobson/codeblock
Screenshot 2024-03-01 at 8.21.40 AM.png (132×204 px, 8 KB)

The new Codex Table T303320 will not use these grays (Figma exploration file). But the new background colors will be updated in this non-Codex table.

Any component in code using grays for non-interactive backgrounds should be updated with these new tokens.

CCiufo-WMF changed the task status from Open to In Progress.Mar 5 2024, 3:48 PM
CCiufo-WMF assigned this task to Volker_E.
Volker_E renamed this task from Evaluate new layout background-color tokens in Codex to tokens: Implement new static layout background-color tokens.Mar 6 2024, 3:16 PM
Volker_E updated the task description. (Show Details)

Change 911851 merged by jenkins-bot:

[design/codex@main] tokens: Add area background color tokens and apply

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

Change 1012737 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from 1.3.4 to 1.3.5

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

Change 1012737 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from 1.3.4 to 1.3.5

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