Page MenuHomePhabricator

Add application tokens for status graphic purposes
Closed, ResolvedPublic1 Estimated Story Points

Description

Background

Currently in Codex, we have @color- tokens for statuses including error, warning, success, and notice. These tokens are sometimes applied to text and sometimes graphical elements, i.e. icons. We need to separate these out to keep our current @color- tokens for status to be used in text, and new tokens @color-[blank]-[status] for use with graphical elements, mainly icons.

Open questions

  1. What should we replace "blank" with for these new tokens?
    1. "graphic"
    2. "icon"
    3. "nontext"
    4. something else?
Decision

We will use color-icon-[status] for the new application tokens name since it is the most explicit and clear for its intended use.

Acceptance criteria

  • Adjust all option tokens in the 500 level to ensure accessibility on all possible backgrounds
  • Add in new status application tokens in code
  • Add in new status application tokens in Figma
  • Reconcile/adjust any related tokens to match the updates to application tokens (i.e. background and border error tokens)
Expected changes

Application.json

Token namenew, update, or remove?beforeafteradditional notes
background-color-errorupdatered600red500
background-color-error-hoverupdatered500red600
background-color-error-activeupdatered800red700
color-warningupdateyellow300yellow700remove token comment
color-successupdategreen700green700same value; remove token comment
color-noticeupdategray900gray700
color-icon-errornewred500
color-icon-warningnewyellow500
color-icon-successnewgreen500
color-icon-noticenewgray500
border-color-errorupdatered800red500
border-color-error-hoverupdatered500red600
border-color-warningupdateyellow600yellow500
border-color-successupdategreen800green500
border-color-noticeupdategray600gray500

Dark.json

Token namenew, update, or remove?beforeafteradditional notes
background-color-errorremovered500
background-color-error-hoverremovered400
background-color-error-activeremovered300
color-warningupdateyellow200yellow400
color-noticeupdategray50gray400
border-color-errorremovered500
border-color-error-hoverremovered400
border-color-warningremoveyellow200
border-color-successremovegreen400
border-color-noticeremovegray300

Wikimedia-ui.json

Token namenew, update, or remove?beforeafteradditional notes
red500update#fc493b#f54739
orange500update#d96c27#d46926
yellow500update#b0832b#ab7f2a
lime500update#269f4b#259948
green500update#099d7c#099979
blue500update#6b8edf#6485d1
purple500update#9182c2#8d7ebd
pink500update#b976a1#b5739e
maroon500update#ba7a78#b57775

Details

Related Changes in Gerrit:

Event Timeline

I don't have an opinion on the word choice, but would recommend we make the order color-[whatever we pick here]-[status] e.g. @color-graphic-error to keep the modifier last, matching the pattern used to name other tokens.

Great point @AnneT. I've updated the description to match that recommendation. Thank you!

Change #1079566 had a related patch set uploaded (by Dtorsani; author: Dtorsani):

[design/codex@main] tokens: add and adjust status tokens

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

Change #1079566 merged by jenkins-bot:

[design/codex@main] tokens: add and adjust status tokens

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
http://patchdemo.wmcloud.org/wikis/a5d0a31f72/w/

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

http://patchdemo.wmcloud.org/wikis/a5d0a31f72/w/