Page MenuHomePhabricator

Reduce number of ResourceLoader modules defined by the CampaignEvents extension
Closed, ResolvedPublic5 Estimated Story Points

Description

The extension currently defines 8 modules, 4 of which are styles; this is greatly above the recommended maximum of 3 modules. We should try and bundle these modules together, following the guidelines in https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader

We will combine the existing modules into 2 "SpecialPages" and "EventPages", using a dispatcher to include only the relevant javascript (see: CheckUser for an example)

CSS will need to be standardised and namespaced.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptNov 22 2023, 1:41 PM
Daimona updated the task description. (Show Details)

Change #1055211 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Migrate javascript modules to dispatcher model, to minimize number of loaded resources.

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

Change #1055211 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Migrate javascript modules to dispatcher model.

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

Change #1055487 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Make CSS identifiers more consistent and isolated

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

Change #1055926 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Merge special page styles into a single module

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

Change #1055944 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/CampaignEvents@master] Create new stylesheet to replace inline styles

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

Change #1055487 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Make CSS identifiers more consistent and isolated

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

Change #1055926 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Merge special page styles into a single module

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

Change #1055944 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Create new stylesheet to replace inline styles

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

We now have a total of 4 modules: event page JS, event page styles, special pages JS, special pages styles. I think it's good enough for this task. For QA, just make sure that everything is still looking good and there are no prominent client-side errors (e.g., a button that does nothing when clicked, a modal that doesn't open, or an unstyled element, etc.).

@Daimona checking this on betacluster and everything seems fine except it doesn't seem that response statistics are compiling on betacluster anymore (so I can't check anything inside of that tab). I don't THINK this would be related to this task though would it?

@Daimona checking this on betacluster and everything seems fine except it doesn't seem that response statistics are compiling on betacluster anymore (so I can't check anything inside of that tab). I don't THINK this would be related to this task though would it?

It's most likely unrelated, but can you expand on it?

vaughnwalters claimed this task.

@Daimona checking this on betacluster and everything seems fine except it doesn't seem that response statistics are compiling on betacluster anymore (so I can't check anything inside of that tab). I don't THINK this would be related to this task though would it?

It's most likely unrelated, but can you expand on it?

Ah, nevermind, I checked again today and the response statistics have been compiled now for this event I was testing on. Moving to done / resolved.