Page MenuHomePhabricator

Integrate Codex's experimental CSS variables-based styles into MediaWiki
Closed, ResolvedPublic3 Estimated Story Points

Description

We want to be able to use the experimental styles described in T356537 in MediaWiki. This requires adding a theme for these experimental styles, so that skins can opt into them.

  • Add the style files produced by the experimental theme to foreign-resources.yaml
  • Add the experimental theme to the themeStyles property in the definition of @wikimedia/codex in Resources.php
  • Add support for the experimental theme to CodexModule::getManifestFile()
  • Create WIP patches demonstrating this
    • WIP patch that copies the Codex build outputs of https://gerrit.wikimedia.org/r/c/design/codex/+/993056 to resources/lib
    • On top of that, a WIP patch that implements the three items above
    • Depending on that (using Depends-On), a WIP patch in Minerva that selects the experimental theme (using skinCodexThemes in skin.json, see Vector for an example)
    • Ask the Web team to test with this (they will have to figure out how to define the values of the CSS vars)

Event Timeline

Catrope moved this task from Backlog to Infrastructure on the Codex board.
Catrope changed the task status from Open to In Progress.Feb 14 2024, 11:21 PM
Catrope claimed this task.

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

[mediawiki/core@master] [DO NOT MERGE] Update Codex to pre-1.3.3

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

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

[mediawiki/core@master] [WIP] Codex: Add experimental theme

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

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

[mediawiki/skins/MinervaNeue@master] [WIP] Use experimental theme from Codex

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

Testing instructions:

  • Install MinervaNeue and CodexExample if you haven't already
  • In MW core, run git review -d 1003572
  • In MinervaNeue, run git review -d 1003573
  • Go to http://localhost:8080/wiki/Special:CodexExample?minervanightmode=1
  • Note that night mode applies to Codex components (e.g. tab labels are white, icon in Card is white)
  • Any changes made to color token values in CSSCustomProperties.less in Minerva apply to Codex components too

@Catrope if you update to use this Codex patch to produce the experimental output, you'll get an RTL experimental stylesheet.

@Catrope if you update to use this Codex patch to produce the experimental output, you'll get an RTL experimental stylesheet.

Thanks! I will update MW core patch once the new Codex patch is updated to reinstate CSS vars for filter-invert-icon, filter-invert-primary-button-icon and opacity-icon-base

Change 1003571 abandoned by Catrope:

[mediawiki/core@master] [DO NOT MERGE] Update Codex to pre-1.3.3

Reason:

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

Change 1003572 merged by jenkins-bot:

[mediawiki/core@master] Codex: Add experimental theme

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

Change #1003573 abandoned by Catrope:

[mediawiki/skins/MinervaNeue@master] [WIP] Use experimental theme from Codex

Reason:

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