Page MenuHomePhabricator

Tokens: reorganize token files
Closed, ResolvedPublic3 Estimated Story Points

Description

Reorganize the Codex design tokens into 3 tiers per ADR 8.

  • Option tokens for a given theme (right now we only support one theme, wikimedia-ui)
  • Decision tokens for a given mode (right now we only have a default light mode, but soon we'll have a dark mode as well; we may also define other modes or variants here as needed)
  • Component-specific tokens, which should not need to change on a per-theme or per-mode basis

Event Timeline

lwatson set the point value for this task to 3.Feb 20 2024, 6:26 PM
CCiufo-WMF renamed this task from token: reorganize token files to Tokens: reorganize token files.Feb 20 2024, 6:42 PM
CCiufo-WMF added a project: Codex.
CCiufo-WMF renamed this task from Tokens: reorganize token files to [PLACEHOLDER] Tokens: reorganize token files.Feb 20 2024, 6:42 PM

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

[design/codex@main] build: Re-organize Codex design tokens

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

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

[design/codex@main] build, tokens: treat "legacy" font size as a mode

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

Change 1007474 merged by jenkins-bot:

[design/codex@main] build: Re-organize Codex design tokens

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

egardner renamed this task from [PLACEHOLDER] Tokens: reorganize token files to Tokens: reorganize token files.Mar 4 2024, 8:15 PM
egardner updated the task description. (Show Details)

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

[mediawiki/core@master] Update Codex from v1.3.3 to v1.3.4

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

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

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

[design/codex@main] build: Token reorganization part 2

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

Change 1008950 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.3.3 to v1.3.4

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

Change 1008970 merged by jenkins-bot:

[design/codex@main] build: Token reorganization part 2

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

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

Change 1007984 merged by jenkins-bot:

[design/codex@main] build: Make "legacy" build redundant

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

Does it mean we will have a official night mode color palette coming from Codex (see T357835)? Since the night mode is pushed on wikis and editors are starting to use their own colors... Edit: just found T360343, I think it covers my question.

Does it mean we will have a official night mode color palette coming from Codex (see T357835)? Since the night mode is pushed on wikis and editors are starting to use their own colors... Edit: just found T360343, I think it covers my question.

The initial beta version of the Night Mode feature is being developed in Minerva. But eventually we'd like everything to come from Codex. We just expanded the Codex color palette internally, and soon we will add a new file that defines which colors will be overridden in dark mode (T360341). Finally, we will start producing the dark mode CSS files from Codex itself (T360343 will start this work).

Eventually Night Mode will be introduced in Vector as well as Minerva. Our goal is to make it so that all the dark mode color values can come from Codex itself at that point, with the files produced in such a way to allow optimized and client-side switching between light and dark colors.

You might find this article interesting, as it informs a lot of the work we are doing here: https://dbanks.design/blog/dark-mode-with-style-dictionary/. The author is also the creator of Style Dictionary, an open-source tool that we use within Codex to manage our design tokens.

Catrope subscribed.

Moving this out of code review because all the associated patches are merged.

@egardner is this task done or is there more work to do here?

egardner subscribed.

Moving this out of code review because all the associated patches are merged.

@egardner is this task done or is there more work to do here?

I think we can consider this one done now.

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

[mediawiki/core@master] Update Codex from v1.3.5 to v1.3.6

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

Change #1016452 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.3.5 to v1.3.6

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