Page MenuHomePhabricator

In Special:EventDetails, update URL as the user switches tabs
Closed, ResolvedPublic2 Estimated Story Points

Description

Special:EventDetails uses a tabbed layout implemented in JavaScript. When switching tabs, the transition happens entirely in JavaScript, and there is no trace of it in the URL or elsewhere. The only way to get a direct link to the tab you're on is to right click on the tab header and copy its link. I think it would be nice to automatically update the URL with the tab currently open. A couple things to keep in mind/consider:

  • This would likely append to the history, not replace, so that users can navigate to the previous tab with the "back" arrow
  • If there's already a tab parameter in the URL, we would obviously update that instead of adding a duplicate
  • If there is no tab parameter and the "event details" tab is currently open (i.e., default state when visiting the page), do not add a tab parameter.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptMay 2 2025, 6:07 PM
Daimona set the point value for this task to 2.May 7 2025, 4:21 PM
Daimona moved this task from Backlog to Estimated/Ready for work on the Connection-Team board.
Daimona added a project: Essential-Work.

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

[mediawiki/extensions/CampaignEvents@master] Append tab to history on Special:EventDetails

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

ifried changed the task status from In Progress to Stalled.Sep 8 2025, 4:19 PM
ifried subscribed.

Moved to blocked because we're not sure how doable this is and it is not a priority for this sprint. We will re-assess next sprint or soon.

@MHorsey-WMF: Hello! We have deprioritized this work for the moment, but in the meantime, I think it would be good to document what we have learned so far. So, when you get a chance, could you add some notes about the challenges you experienced/why this may not be doable? Thanks in advance!

I am moving this out of blocked, but there may need to be an engineering discussion on the next steps of this ticket before it was ready to be taken on.

ifried added a subscriber: MHorsey-WMF.

Change #1175866 abandoned by Mhorsey:

[mediawiki/extensions/CampaignEvents@master] Append tab to history on Special:EventDetails

Reason:

this requires a lot more work

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

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

[mediawiki/extensions/CampaignEvents@master] Store tabURL when navigating

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

Change #1329520 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] EventDetails: Store tab URLs when navigating tabs

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

Merged & tested. One thing worth noting is that while I tested this last time I seemed to find a bug where the tab from the URL parameter would not be opened while first loading the page. However, I have since been unable to reproduce, so it was perhaps something to do with my local tests. For the notes in the task description:

  • This would likely append to the history, not replace, so that users can navigate to the previous tab with the "back" arrow

Tabs can be navigated using back and forward arrows.

  • If there's already a tab parameter in the URL, we would obviously update that instead of adding a duplicate

The parameter value is replaced, no duplicates are added.

  • If there is no tab parameter and the "event details" tab is currently open (i.e., default state when visiting the page), do not add a tab parameter.

No parameter is added by default, only when navigating tabs (including when going back to the main tab).