Page MenuHomePhabricator

Move PCS service from WikimediaUI Base to Codex
Closed, ResolvedPublic

Description

The WikimediaUI-Base library has been superseded by Codex, and is being sunset (T354310, T334934).

However, PCS still depends on WikimediaUI-Base for its design tokens. Let's bring in the latest Codex tokens for PCS's usage of Dark and Light themes. (And let's even consider upstreaming our tokens for Black and Sepia themes.)

Details

Event Timeline

CCiufo-WMF moved this task from Inbox to Triaging on the Design-System-Team board.
CCiufo-WMF added subscribers: Volker_E, CCiufo-WMF.

@Volker_E it looks like we missed this one. Let's make sure not to do T354310 until PCS is migrated too.

Wait, @Dbrant do the apps (through PCS) rely on Wikimedia-UI Base for its theme system?

Wait, @Dbrant do the apps (through PCS) rely on Wikimedia-UI Base for its theme system?

The apps rely on PCS only for rendering articles, and all the styled elements within articles. Aside from that (i.e. for styling native components for the rest of our features) we do not use wikimedia-ui-base.

@Dbrant @JTannerWMF Thanks for picking this up! What would/could DST do to make this workable.
From my POV apps and PCS are not using wikimedia-ui-base as dependency, just an outdated copy. We can proceed with sunsetting it.
The transformation to Codex is as simple as updating it itself.
A bigger question is if the apps would benefit from Codex tokens as dependency with an export format as shown in proof-of-concept in https://gerrit.wikimedia.org/r/c/design/codex/+/856036 on task T327200: [Spike] Explore tokens export to mobile platforms Android and iOS

Thanks @Volker_E -- Could you clarify what you mean by "transformation to Codex is as simple as updating it itself"?

Here's where PCS declares its dependency on wikimedia-ui-base:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/services/mobileapps/+/refs/heads/master/pagelib/package.json#110

And this where PCS imports wikimedia-ui-base as the basis of our color themes:
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/services/mobileapps/+/refs/heads/master/pagelib/src/transform/Constants.less#1

Do you mean that we can drop-in Codex in place of wikimedia-ui-base, and it would just work? (what should we import there instead?)

FYI @DTorsani-WMF and @cmadeo - when this work is started, there will be some sepia and black theme colour tokens that DST/Design need to determine how to incorporate (upstreaming directly and/or with some changes to specific colours colours)...

Change #1080748 had a related patch set uploaded (by Dbrant; author: Dbrant):

[mediawiki/services/mobileapps@master] [WIP] Migrate to Codex from WikimediaUI-Base.

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

@Dbrant just reviewed the Android screenshots, this looks great — TY!

Change #1080748 merged by jenkins-bot:

[mediawiki/services/mobileapps@master] Migrate to Codex from WikimediaUI-Base.

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