(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

Replace WikimediaUI Base vars with Codex design tokens in ContentTranslation
Closed, ResolvedPublic

Description

Background

Codex design tokens are available now as npm package.
They are much more powerful and comprehensive and are aimed to replace WikimediaUI Base.

ContentTranslation has used WikimediaUI Base vars interchangeably and extensively.
As we're touching a number of files and among all changes towards Codex design tokens usage also replace very few values that are close, but not 1:1 equivalent, this task is providing the venue to discuss possible visual amendments.

Goal

Replace all calls of the former variable files @import "@/lib/mediawiki.ui/variables/wikimedia-ui-base.less"';
While at it, also provide best practice usage of Codex design tokens – but only in CSS property categories that are already in use. For example colors shouldn't be directly referenced in code (don't: color: @wmui-color-base30;, do: color: @color-subtle)

User story

As a developer when browsing Wikimedia repositories and search for best practices, I'm currently seeing different styling variables and don't know what best latest practice is. Ensure simplicity for developers.

Developer/designer notes
  • color: @wmui-color-base30; (#72777d) is replaced by color: @color-subtle (#54595d) as only disabled and placeholder elements receive 72777d in Codex latest token definition.
Open questions
Acceptance criteria for done
  • Replace all calls to WikimediaUI Base '@import "@/lib/mediawiki.ui/variables/wikimedia-ui-base.less"'
    • Replace all WikimediaUI Base deprecated variables in favor of Codex tokens
  • Remove WikimediaUI Base variables dependency
  • Replace close static values, starting with background-colors, colors, opacities, border properties and border-radius
  • Replace outdated color names with new Codex Design System color names
  • Replace all mentions of WikimediaUI Base with Codex tokens in documentation

Event Timeline

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

[mediawiki/extensions/ContentTranslation@master] Replace WikimediaUI Base with Codex design tokens

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

Volker_E renamed this task from Replace WikimediaUI Base vars with Codex design tokens to Replace WikimediaUI Base vars with Codex design tokens in ContentTranslation.Nov 6 2023, 5:03 AM

Change 969232 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Replace WikimediaUI Base with Codex design tokens

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

The last piece missing for resolving this is the color names have changed and CX carries the old soon to disappear names in a JS variables file.

Are you planning to submit a patch for that, or is that on us?

Plan to submit a patch, but need code review from your side. Note Design Systems Team offsite is happening this week.

Change 975779 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20231120

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

Nikerabbit changed the task status from Open to In Progress.Nov 23 2023, 8:48 AM

Change 975779 merged by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20231124

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

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

[mediawiki/extensions/ContentTranslation@master] styles: Rename color variables to match the new color names

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

Change 981668 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] styles: Rename color variables to match the new color names

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

Volker_E updated the task description. (Show Details)

Change 987763 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20240104

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

Change 987763 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20240104

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