Page MenuHomePhabricator

Create a dev entry-point to support the development of structured task onboardings
Closed, ResolvedPublic

Description

Background
Currently, to develop the onboarding dialog for structured tasks, one needs to go through the process of selecting a task from the Homepage, be forwarded to VE, wait for the VE session to load, and then the onboarding shows up with one's local changes. On top of that there are issues with old javascript being stored in the browser by MediaWikis ResourceLoader system.

Acceptance Criteria
Create a new dev-entry point based, if possible on Vite's dev server, that allows loading the App.vue in modules/ext.growthExperiments.StructuredTask.PreEdit/App.vue and subcomponents required from within there. That dev-server should ideally also support Hot Module Replacement (HMR).

Event Timeline

Change #1187388 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/extensions/GrowthExperiments@master] Create dev entry point for StructuredTask PreEdit onboarding

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

Is the expectation that the code produced is both compatible with the development setup and the production one? Or are you thinking of compiling a bundle with the outcome of modules/ext.growthExperiments.StructuredTask.PreEdit/common and App.vue? The import mechanism may be a problem for both JS and less files. I believe that's why we ended up with a build the last time we tried this. cc @Cyndymediawiksim @Michael

Is the expectation that the code produced is both compatible with the development setup and the production one? Or are you thinking of compiling a bundle with the outcome of modules/ext.growthExperiments.StructuredTask.PreEdit/common and App.vue? The import mechanism may be a problem for both JS and less files. I believe that's why we ended up with a build the last time we tried this. cc @Cyndymediawiksim @Michael

Yes, having the files be both compatible with the development setup and the production environment is the goal. It is tricky. But compiled files in Wikimedia production are really not great, and I'd like to avoid them.

The import mechanism for Less is fine with a bit more config support, as far as I can tell. But making require( ... ) actually work everywhere is the real challenge here.

Change #1192100 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] chore(deps): update cypress-terminal-report

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

The two associated changes are now ready for review. Currently, the two plugins are very simple fakes, to be refined in the future. If you happen to know of more elaborate fakes already existing somewhere, I'd be happy to take them over! Somehow, I doubt we're the first tackling this issue.

Change #1192100 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] chore(deps): update cypress-terminal-report

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

Change #1187388 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Create dev entry point for StructuredTask PreEdit onboarding

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

I don't think that meaningful QA can be done here. This was literally only about developer-facing functionality.