Page MenuHomePhabricator

Restructure frontend code to facilitate re-use across experiments
Closed, ResolvedPublic3 Estimated Story Points

Description

Per https://wikimedia.slack.com/archives/C08TB64J750/p1775043304314469 & eng enclave, let's settle on a clear structure for organizing our projects and any code they may share.

Proposal: standardize around a frontend directory structure & module names like this:

- resources/common -> ext.readerExperiments
  ^ shared components
- resources/experiments/* -> ext.readerExperiments/*
  ^ individual experiments
- resources/lib/* -> ext.readerExperiments/lib/*
  ^ external libraries

For shared/common resources, I would suggest to implement them in the relevant experiment first (although if we can make it somewhat generic from the go, all the better) and not move them into “common” until we have a 2nd experiment where they will actually be re-used (to prevent premature optimization when we can’t properly assess re-use nuances yet)

Details

Event Timeline

Change #1266180 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Restructure resources

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

egardner set the point value for this task to 3.Apr 14 2026, 4:22 PM

Change #1266180 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Restructure resources

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

Mentioned in SAL (#wikimedia-operations) [2026-04-16T13:17:04Z] <lucaswerkmeister-wmde@deploy1003> mwscript-k8s job started: namespaceDupes sahwikisource --fix # T423273

Mentioned in SAL (#wikimedia-operations) [2026-04-16T13:17:04Z] <lucaswerkmeister-wmde@deploy1003> mwscript-k8s job started: namespaceDupes sahwikisource --fix # T423273

Sorry, that belonged to T423374: Author namespace in sahwikisource.