Page MenuHomePhabricator

Explore pointing Pixel to the standalone Codex sandbox
Closed, ResolvedPublic5 Estimated Story Points

Description

In addition to the existing Special:VueTest-based visual regression test that tests Codex in an MW environment, we would like to also be able to run visual regression tests on the standalone Codex sandbox.

I can think of two different ways to do this, but maybe there are more:

  • Have Pixel download the main branch of Codex, build its sandbox, and point Pixel to sandbox/index.html (as well as the other subpages of the sandbox)
  • Have the npm run doc command build the sandbox and put it in the output directory under /sandbox, similar to what npm run branch-deploy does. That would make the sandbox available at https://doc.wikimedia.org/codex/main/sandbox , and we could then point Pixel to that URL

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
CCiufo-WMF triaged this task as Medium priority.Jan 22 2024, 6:41 PM

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

[design/codex@main] build: Respect CODEX_DOC_ROOT when building the sandbox

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

Catrope changed the task status from Open to In Progress.Jan 31 2024, 4:06 AM
Catrope claimed this task.

I got something sort of working. It needs more work, but here's what I have for now: https://github.com/catrope/pixel/commit/fc79f446ad734e49be0d4245cf1a825aeae85bf6

Instructions for how to use this proof of concept:

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

[design/codex@main] build: Automatically add all demos/*.html files to the sandbox build

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

Change 994351 merged by jenkins-bot:

[design/codex@main] build: Respect CODEX_DOC_ROOT when building the sandbox

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

Remaining issues with this proof of concept:

  • -b latest-release doesn't work, because it attempts to check out the wmf/1.42.0-wmf.17 branch in the Codex repo, which doesn't exist. We want latest-release to mean the latest Codex release instead.
  • As a consequence, runAll doesn't work, which is why this needs to be fixed before this PR can be merged.

Areas for improvement:

  • Special treatment for the Codex repo is currently hard-coded with if ( repoId === 'design/codex' ), which is not ideal
  • We still have to hard-code the list of components in configCodex.js; it would be nicer (and more resilient) if we didn't have to do this, and we instead got the list of components from Codex itself somehow

This task was filed as an exploration, and that exploration is now done. I've filed T357185: Set up Pixel testing for the Codex sandbox for productionizing the locally built sandbox approach.

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

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

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

Change 1005171 merged by jenkins-bot:

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

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