Page MenuHomePhabricator

Bad interaction between RevisionSlider and CollapsibleVector extension
Open, LowPublic


Revision-Slider currently undoes all effects of the MediaWiki-extensions-CollapsibleVector.

CollapsibleVector is a JavaScript extension that re-adds a collapse feature to the left navigation bar. This was once a core feature, but got removed a few years ago. Note the arrow:

RevisionSlider contains a feature where it replaces the diff view below the slider on-the-fly, without reloading the entire page. The code for this feature is in the file ext.RevisionSlider.DiffPage.js. In one line it replaces the contents of the #mw-panel (this is the left navigation bar) with an entirely new version as provided by the server. This is done because there are links in this navigation bar that reference the currently displayed revision, e.g. "Permanent link" and "Printable version". These would point to the wrong revision and must be replaced because of this. To make this easier, the code replaces the entire navigation bar.

This also kills all effect any JavaScript had on the navigation bar before!

Unfortunately the CollapsibleVector code currently does not use any hook, but initializes via $( function () { … } );. This can not be called again after RevisionSlider replaced the #mw-panel contents.


  • Try to rewrite CollapsibleVector to use the wikipage.content hook.
  • Rewrite the line of code that replaces the entire #mw-panel in one step, and instead iterate the two DOM fragments and only replace href attributes (and possibly others, e.g. title or data-…).

Reported here:

Event Timeline

daniel added a subscriber: daniel.Dec 11 2018, 3:23 PM

Why is this tagged as an MCR issue?

thiemowmde removed a subscriber: daniel.

Just a mistake, sorry, @daniel. The one I wanted to point you at is T211473.

thiemowmde triaged this task as Low priority.Jan 16 2019, 3:18 PM
thiemowmde added a project: User-thiemowmde.
thiemowmde moved this task from Incoming to Revision Slider on the TCB-Team board.