Page MenuHomePhabricator

Extension:Popups could allow for enabling/disabling on arbitrary namespaces
Closed, DeclinedPublic

Description

Summary
It should be able to use Page previews on pages in (and from) other namespaces than the main namespace.

Description
Extension:Popups can be used by other MediaWiki users (and perhaps within other Wikimedia projects) that could benefit from having a configurable option to allow content from other namespaces to be included in a popup.

This could be a site-wide configuration option - allowing wiki administrators to enable/disable on a set of namespaces.

It could also be user-configurable as a power-user setting for contributors (see NavPopups as an example) allowing for a more advanced interface to previewing wiki content across namespaces.

As discussed: https://www.mediawiki.org/wiki/Topic:Ufna3qrxehzhcud1

Developer notes
We already provide a certain level of configuration via $wgContentNamespaces.

The summary endpoints do not work on most namespaces and many namespaces would need special treatment, which would add a high amount of code complexity.
e.g.

Event Timeline

Note: Page previews is enabled on all namespaces, however, page previews will only show for articles that are defined as content namespace e.g. wgContentNamespaces

For example if you add the following to your user js you will start seeing page previews for namespaces the main namespace as well as the user namespace.

mw.config.set('wgContentNamespaces', [0,2]);

The problem with namespaces other than main is that they usually cannot be summarised and the algorithm defined in https://www.mediawiki.org/wiki/Page_Content_Service#Summary will not work on the majority of namespaces. For 3rd parties using TextExtracts, I'm not sure if the summaries will be of any use.

Unfortunately, I think it would be far too complicated to get this working in a supported way. I hope the wgContentNamespaces approach can help here.

Jdlrobson renamed this task from Extension:Popups should allow for enabling/disabling on arbitrary namespaces to Extension:Popups could allow for enabling/disabling on arbitrary namespaces.Jul 3 2018, 12:28 AM
ovasileva moved this task from Backlog to Hovercards Pt2 on the Page-Previews board.
LGoto subscribed.

This task was closed as part of backlog upkeep. If you believe it was closed in error, please respond on the ticket.