Page MenuHomePhabricator

Allow MediaWiki developers to use their local version of Codex
Open, LowPublic5 Estimated Story Points

Description

Background

Testing a non-release version of Codex with your local MediaWiki install is possible right now, but it's annoying. You basically have to run the Codex build and then copy the files from Codex's dist directories to the resources/lib/codex* directories (and of course there's no documentation on what to copy where).

Proposed solution

We could make this easier by adding an optional config setting in MediaWiki that a developer can point to the directory where they have cloned the Codex repo, which would then use the right files from Codex's dist directories instead of the files in resources/lib. We would also need an npm watch-style command in Codex that rebuilds the dist files whenever the source files change.


Acceptance criteria
  • Pointing to a local version of Codex for local MediaWiki development is implemented in MediaWiki core
  • This feature is documented

Event Timeline

It would also be nice if MW could be configured to use the bundled release version of Codex by default, but switch to the local version when a URL parameter is set (e.g. ?uselocalcodex=1). That would be helpful for local development in some cases, but could also be very helpful to allow testing of both versions in beta labs (if we can get the main branch of Codex to be synchronized and built there).

Catrope triaged this task as High priority.Sep 12 2022, 8:30 AM
Catrope moved this task from Inbox to Up Next on the Design-System-Team board.
AnneT set the point value for this task to 3.Sep 12 2022, 6:59 PM
ldelench_wmf changed the point value for this task from 3 to 5.Sep 19 2022, 5:00 PM
ldelench_wmf subscribed.
  • updating to 5 points because it's a change to mediawiki core
  • OK to leave in "up next" for now -review at next planning mtg
ldelench_wmf lowered the priority of this task from High to Medium.Oct 24 2022, 4:40 PM
ldelench_wmf raised the priority of this task from Medium to High.Feb 27 2023, 5:51 PM

This would be really nice, and also helps non-DST engineers contribute to upstream Codex, since our work is going to be motivated by real-world usage of the component library, and we need to be able to verify our changes / contributions in an MW environment.

copy the files from Codex's dist directories to the resources/lib/codex* directories (and of course there's no documentation on what to copy where).

as a starting point, if someone from DST has done this recently, could you please document the manual process in this task or in https://doc.wikimedia.org/codex ?

@kostajh I went ahead and added instructions on the Codex MediaWiki page (we're trying to keep all MediaWiki-specific docs here, to keep the Codex docs site more MediaWiki-agnostic). Hope this helps until we can automate this!

@kostajh I went ahead and added instructions on the Codex MediaWiki page (we're trying to keep all MediaWiki-specific docs here, to keep the Codex docs site more MediaWiki-agnostic). Hope this helps until we can automate this!

thanks!

This should wait for T349423 to be done first, but should be more straightforward to do after that

CCiufo-WMF lowered the priority of this task from High to Medium.Oct 27 2023, 6:45 PM
CCiufo-WMF lowered the priority of this task from Medium to Low.Mar 13 2024, 5:27 PM

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

[mediawiki/core@master] [WIP] Codex: Allow a local development version to be used

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