Page MenuHomePhabricator

Allow the transclusion of the Communities tab of Special:AllEvents
Closed, ResolvedPublic

Description

Background: Some editors may want to transclude the communities tab on a wiki page. For example, they may want to add it to a wiki homepage so that people can easily discover WikiProjects on the wiki. They may want to add it to a WikiProject page to promote other WikiProjects on the wiki. We should allow them to do this. We also want to learn how we can improve the Communities tab, and by making it more accessible and useful in different contexts, we can diversify who can use it and therefore potentially provide feedback on it.

Acceptance Criteria:

  • An editor can transclude the communities tab on a wiki page
  • There should there be a parameter for the limit
  • There should there be a link to the full Collaboration List page, using the same text as when transcluding events
  • The transclusion should not change the transcluding page's displayed title

Event Timeline

Daimona renamed this task from Investigation: How can we allow the transclusion of the Communities tab? to Allow the transclusion of the Communities tab of Special:AllEvents.Mar 26 2025, 5:23 PM
Daimona updated the task description. (Show Details)

Change #1132147 had a related patch set uploaded (by Josefanthony; author: Josefanthony):

[labs/tools/Isa@main] Add Instruction for Linux requirement for mysqlclient requirement in README Bug:T389892

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

Change #1132147 merged by jenkins-bot:

[labs/tools/Isa@main] Add Instruction for Linux requirement for mysqlclient requirement in README Bug:T389892

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

Whoever will work on this, mind T391109. Reindenting the Codex templates should be sufficient for the time being.

@ifried can you confirm the undecided AC when you are able please? ty

@Daimona / @cmelo the syntax

{{Special:AllEvents/communities}}

doesn't align with current behaviour, we're using

{{Special:AllEvents?tab=communities}}

right?

VPuffetMichel renamed this task from Allow the transclusion of the Communities tab of Special:AllEvents to #OKR-Work.Apr 17 2025, 1:25 PM
VPuffetMichel renamed this task from #OKR-Work to Allow the transclusion of the Communities tab of Special:AllEvents.Apr 17 2025, 1:26 PM
VPuffetMichel added a project: OKR-Work.

@ifried can you confirm the undecided AC when you are able please? ty

@Daimona / @cmelo the syntax

{{Special:AllEvents/communities}}

doesn't align with current behaviour, we're using

{{Special:AllEvents?tab=communities}}

right?

Hi @MHorsey-WMF I think this is related to what we discussed in Gerrit here:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CampaignEvents/+/1134166/2..16/src/Special/SpecialAllEvents.php#b254

For now, we are using the ID, but if possible, it would be preferable to use subpage syntax. Please correct me if I'm wrong, @Daimona.

For now, we are using the ID, but if possible, it would be preferable to use subpage syntax. Please correct me if I'm wrong, @Daimona.

That is correct. The subpage syntax would be easier to understand when transcluding. It would also make sense that it's not a query parameter, because the rest of the query parameters can only affect the individual tab. But I'm not sure how hard it would be to use the subpage syntax.

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

[mediawiki/extensions/WikimediaCampaignEvents@master] Format and allow transclusion of projects tab of special:allevents

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

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

[mediawiki/extensions/CampaignEvents@master] Enable transclusion of projects tab on special:allevents

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

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

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: Workaround for transclusion bug

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

Change #1140483 abandoned by Daimona Eaytoy:

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: Workaround for transclusion bug

Reason:

Dupe of I33f33f6dea8e49ad7256da23dbf4942c3e4b5911 which has CR comments and is referenced in a Depends-On.

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

Change #1140202 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: Workaround for transclusion bug

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

For AC clarity, the syntax for the tab will remain the same and we will create a new task to implement the "/tab" syntax

For AC clarity, the syntax for the tab will remain the same and we will create a new task to implement the "/tab" syntax

Will this be behind a feature flag then? If we release this first and then change the syntax, we would break pages using transclusion.

For AC clarity, the syntax for the tab will remain the same and we will create a new task to implement the "/tab" syntax

Will this be behind a feature flag then? If we release this first and then change the syntax, we would break pages using transclusion.

This is a good point. I think we need to decide whether to use one or the other. If we choose to try the '/tab' syntax, I think we should add a feature flag. But if we decide to stick with the current one and have no plans to change it, then it's fine as is. Another option could be to support both, so we don't need to worry about adding a feature flag right now.

What do you think @ifried , @Daimona, @MHorsey-WMF, @VPuffetMichel

I think we need to decide whether to use one or the other.

That's it.

If we choose to try the '/tab' syntax, I think we should add a feature flag.

I wanted to avoid a feature flag for such a tiny change if possible. On second thought, I also don't really see any difference between:

  • "make tab transcludable but disabled via feature flag -> figure out transclusion syntax -> enable feature flag -> remove feature flag", and
  • "figure out transclusion syntax -> make tab transcludable and roll-out with the next train"

If not that the latter takes two extra step and a couple deployment windows.

But if we decide to stick with the current one and have no plans to change it, then it's fine as is.

As long as it's a decision we made, and a conscious one, it'll work for me.

Another option could be to support both, so we don't need to worry about adding a feature flag right now.

Also doable but introduces legacy code. At that point, I would prefer performing a global search of special page transclusions, and update usages so we only need to support a single syntax.

@ifried Also one more question from gerrit: the WikiProject list has an introductory paragraph ("Discover WikiProjects—groups ..."). Do we need to include that in the transcluded version?

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

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: fix workaround for transclusion bug

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

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

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: temporarily widen handler param

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

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

[mediawiki/extensions/CampaignEvents@master] Make CampaignEventsGetAllEventsTabsHook pass SpecialPage instance

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

@Daimona - No, we don't need to include the 'Discover Wikiprojects' text. I like the idea of allowing people to describe the list in their own terms/ways.

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

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: update hook signature

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

@ifried can you confirm the undecided AC when you are able please? ty

@Daimona / @cmelo the syntax

{{Special:AllEvents/communities}}

doesn't align with current behaviour, we're using

{{Special:AllEvents?tab=communities}}

@MHorsey-WMF: We can do this second option (see above) with the question mark before "tab." It is both easier to implement and the current general standard for transcluding a tab. Also, I don't think that it is terribly complex for a user to do the second option.

Change #1141929 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: fix workaround for transclusion bug

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

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

[mediawiki/extensions/WikimediaCampaignEvents@master] Do not display header text for transcluded page content

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

Change #1141936 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: temporarily widen handler param

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

Change #1141937 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Make CampaignEventsGetAllEventsTabsHook pass SpecialPage instance

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

Change #1141938 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] CollaborationListHandler: update hook signature

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

Change #1142620 merged by jenkins-bot:

[mediawiki/extensions/WikimediaCampaignEvents@master] Do not display header text or navigation for transcluded page content

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

Change #1140204 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Enable transclusion of WikiProjects tab on Special:AllEvents

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

✅ An editor can transclude the communities tab on a wiki page

Screenshot 2025-05-12 at 4.02.08 PM.png (1×2 px, 340 KB)

✅ There should there be a parameter for the limit
{{Special:AllEvents|tab=communities|limit=5|}}

✅ There should there be a link to the full Collaboration List page, using the same text as when transcluding events

Screenshot 2025-05-12 at 4.02.48 PM.png (130×694 px, 14 KB)

✅ The transclusion should not change the transcluding page's displayed title

without tranclusionwith transclusion
Screenshot 2025-05-12 at 4.05.42 PM.png (1×2 px, 250 KB)
Screenshot 2025-05-12 at 4.05.23 PM.png (1×2 px, 358 KB)

All AC is met and working as expected on local env. Will recheck on prod after release.

✅ An editor can transclude the communities tab on a wiki page

Screenshot 2025-05-12 at 4.02.08 PM.png (1×2 px, 340 KB)

✅ There should there be a parameter for the limit
{{Special:AllEvents|tab=communities|limit=5|}}

✅ There should there be a link to the full Collaboration List page, using the same text as when transcluding events

Screenshot 2025-05-12 at 4.02.48 PM.png (130×694 px, 14 KB)

✅ The transclusion should not change the transcluding page's displayed title

without tranclusionwith transclusion
Screenshot 2025-05-12 at 4.05.42 PM.png (1×2 px, 250 KB)
Screenshot 2025-05-12 at 4.05.23 PM.png (1×2 px, 358 KB)

All AC is met and working as expected on local env. Will recheck on prod after release.

Everything working as expected in prod also. Sending to design sign off.

arwikienwikikowiki
Screenshot 2025-05-15 at 4.07.52 PM.png (1×2 px, 325 KB)
Screenshot 2025-05-15 at 4.09.18 PM.png (1×2 px, 436 KB)
Screenshot 2025-05-15 at 4.10.54 PM.png (1×2 px, 389 KB)

This has been deployed and it is working as expected, so I am marking it as done.