Page MenuHomePhabricator

Add sections on Special:WhatLinksHere
Open, Needs TriagePublic

Description

The special page for what links here are a very useful tool (and used by many) on Wikidata to find related items. But any mature item has lots of links. The item has usually been mentioned in discussions, have links from database reports as well as the usual links from other items and/or properties. Looking through these can be a kind of a mess. On Wikidata in particular, but possibly on other wikis as well it would be a timesaver to have the links in sections by namespace. That would make it much easier to find the kind of links that one are looking for.

A bonus (but not essential) feature would be, that if there are more links than fit on the page, it would be awesome with an index so that one could jump directly to the section one is looking for.

Another feature (that should not be seen as a blocker for the sections) that would be helpful would be the possibility to group the links coming from the main namespace by the property that is linking it. Usually when one are looking at this page there is something special that you are looking for and not having to click through to find out why this item is linked from another would save a lot of time in those use cases.

Event Timeline

One big question I have is how this should behave when there are more backlinks than fit on a page? I see two main options:

  • Each section has independent, separate pagination (next 50, previous 50, etc.). Instead of one database query, the page actually shows the result of n queries, where n is the number of namespaces configured on the wiki, and each has an independent offset (and limit). On Wikidata, that would be 33 queries.
  • Pagination still goes over the whole result list. The database query is exactly the same, and backlinks are found in the same order as currently (by page ID); results are only grouped into sections afterwards. The sum of entries across all sections on each page would be ≤ the limit (50 by default), and the number of entries per section could vary wildly between pages.

The second option doesn’t seem especially useful to me, but I’m very skeptical of the performance implications of the first option.