Page MenuHomePhabricator

Enable embedding of Codex component demos inside of VueTest MediaWiki extension
Closed, ResolvedPublic5 Estimated Story Points

Description

Background/Goal

We need a way to QA test Codex components (including experimental/WIP components which are not yet a part of published releases) inside a MediaWiki (MW) environment in order to unblock T306180: [Epic] Define manual testing & QA strategy in Codex . DST maintains the VueTest MediaWiki extension that can be used for this purpose; eventually we'd like to deploy this extension to Beta labs in order to have a persistent test environment that testers can access as needed. Until that happens we may need to rely on PatchDemo or local testing. For more background on this task consult T287044: Determine how to perform QA testing of Codex components inside a MediaWiki environment.

In order to accomplish the above, we need a way to package up and distribute some of the Codex component demos so that they can be embedded inside the SpecialPage that VueTest creates.

To facilitate this, we can add a vite.config.js file to the codex-docs package that enables a stand-alone build of the component demos. We won't actually release these demos as an NPM package, because we need to be able to test out incremental changes that happen between Codex versioned releases. Instead, Codex can be embedded in the MediaWiki VueTest extension as a git submodule, which allows even un-released updates to be demoed.

Acceptance criteria
  • Add a new vite config setup that enables a stand-alone build of the component demos, usable outside of the documentation site
  • Code has access to WIP components that aren’t part of current Codex package
  • Demos are available inside of the VueTest extension outside of normal Codex releases

Event Timeline

egardner updated the task description. (Show Details)
egardner added a subscriber: Catrope.
Volker_E renamed this task from Create new Codex-QA subpackage to allow for testing components inside mediawiki to Create new Codex-QA subpackage to allow for testing components inside MediaWiki.Oct 12 2022, 7:02 PM
Volker_E updated the task description. (Show Details)

Change 845728 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[design/codex@main] [WIP, DNM] Create a new codex-demos package

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

Change 845728 abandoned by Eric Gardner:

[design/codex@main] [WIP, DNM] Create a new codex-demos package

Reason:

Abandoning in favor of another approach, will post new patch soon

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

Change 850534 had a related patch set uploaded (by Eric Gardner; author: Eric Gardner):

[design/codex@main] [WIP] Build: Bundle component demos using Vite library mode

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

As an alternative to creating a whole new sub-package, I think we could just add a Vite config file to the codex-docs site and define a new entry point that exports all the component-demo files (each one is itself a Vue component). This is a completely independent build from the Vitepress process that outputs the docs site, and could be assigned its own command (build-demos maybe).

See https://gerrit.wikimedia.org/r/c/design/codex/+/850534 for an example of how this could work. This would require us to publish the codex-docs workspace on NPM (but the published package would only need to include the bundled demo files, not anything Vitepress related).

Change 850534 merged by jenkins-bot:

[design/codex@main] Build: Bundle component demos using Vite library mode

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

egardner renamed this task from Create new Codex-QA subpackage to allow for testing components inside MediaWiki to Enable embedding of Codex component demos inside of VueTest MediaWiki extension.Nov 7 2022, 10:26 PM
egardner updated the task description. (Show Details)

This is now done. There is no need for design or QA here since this is for internal tooling. The parent task T306180: [Epic] Define manual testing & QA strategy in Codex should be reviewed by QA to make sure that the updated workflow based on this new capability makes sense from the QA engineer perspective. I'll update some of the docs there next.

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/03948f5680/w/

Change 859597 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v0.2.2 to v0.3.0

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

Change 859597 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.2.2 to v0.3.0

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