Page MenuHomePhabricator

Make sure there are no transclusion bugs due to global state access when transcluding the communities tab of Special:AllEvents
Closed, ResolvedPublic

Description

This task is identical to T388427, but for the communities tab only. As I wrote int that task:

When transcluding a special page that accesses the global state directly, things could break in the most surprising ways due to how special page transclusion works, by replacing the main context of the request. For details, see T290706: Parser code for special page transclusion replaces main context.

This task encompasses investigation and rectification of any issues with the communities tab of Special:AllEvents related to these problems.

One such example is that we cannot use OOUI widgets, because the OOUI theme singleton is global. Instead, we would need to either use Codex, or omit the OOUI components.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptMar 26 2025, 5:03 PM

Transclusion is mishandling newlines in mustache templates, in order for this to work currently all used codex templates must be on a single line.

cmelo changed the task status from Open to In Progress.Apr 28 2025, 2:49 AM
cmelo claimed this task.

Change #1139904 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/WikimediaCampaignEvents@master] Make sure there are no transclusion bugs due to global state access when transcluding

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

Change #1139905 had a related patch set uploaded (by Cmelo; author: Cmelo):

[mediawiki/extensions/CampaignEvents@master] Add new css classe for codex edit icon

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

Change #1139905 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add new css classe for codex edit icon

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

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

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: drop last usage of OOUI and clean up

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

Change #1139904 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] Make sure there are no transclusion bugs on Special:AllEvents

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

Change #1140223 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: drop last usage of OOUI and clean up

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

I have confirmed the absence of further bugs due to global state access; all the accesses are from low-level Message code for which we can't do anything. The only thing to test here is that the "edit" button for WikiProjects (which now is now using Codex) is okay, e.g. for what concerns design and a11y.

This is working as expected on local with prod data. Keeping it in QA until it is released to prod.

โœ… lighthouse, โœ… axe, โœ… tabbing logical order, โœ… screen reader

Working as expected in prod also. Sending to product sign off

ifried subscribed.

Users can now transclude the communities tab and it is working as expected. I'm marking this work as done.