Page MenuHomePhabricator

Help pages and hovercards
Closed, DeclinedPublic

Description

At several projects I have stumbled across the same problem; some word or phrase needs an explanation. It already have a central explanation, or should have, but I can't use that explanation locally – I must rephrase it again and again. The reason is that the explanation I want (ie. the entry in the glossary) reside on another wiki and in a format I can't include or use.

Now imagine that I could use hovercards as a shortcut to explain those words or phrases. I could perhaps write something like {{#help:some_page}} and the hovercard pops up for either a help page at the local project, a help page at Meta, or a help page at Mediawiki. What the parser funcion would do is to tell the hovercard not only what to look for, but also the fallback chain.

This has a slight problem as it isn't quite obvious how to specify the page. A help page must have a canonical name and it is that name the parser function must provide to the hovercard. The translation into that name, and propagating that name to the local wiki, is not an easy task. A simplification could be to provide the canonical name in the parser function itself, but using a parser function is already cumbersome. The best could be to just write the help link and then leave all the rest to the hovercard, but the hovercard does not work outside the main space at all as it is now.

If a glossary like mw:Special:MyLanguage/Help:Flow/Nomenclature is split up in single pages instead of the long page with several entries, note the even longer one at d:Special:MyLanguage/Wikidata:Glossary, then hovercards are very close to an actual solution as they would have single pages. The only thing we need is rewrite rules from our local URL and into something we can use for our external site.

Rethinking how we specify the link we could say that [[mw:Help:some_page]] is a valid help link, but then we don't have a fallback chain. That url would be rewritten as https://www.mediawiki.org/wiki/Help:some_page on nowiki. Thinking further, if we say that we have a one-level fallback chain then we could use our previous function and write {{#help:some_page}} getting a local page https://no.wikipedia.org/wiki/Help:some_page if the link is "blue", but https://www.mediawiki.org/wiki/Help:some_page if it is "red". Ie. we really do nothing more than replace the site url if the page does not exist locally.

If we use the parser function one additional thing should happen. The link should be marked as a help link and the hovercard should show them.

Screendump example help 2016-06-06.png (246×449 px, 25 KB)

This is an example of what I want. I have a text with some weird prose, but there are no similar local explanation of it. It is although at Mediawiki. (It is really an article in this case - it is an example!) To get to that help page we must link out of our home wiki. Because it is a help link it is marked as such. We could mark it as such because we use the help parser function.

Event Timeline

bmansurov added a subscriber: dr0ptp4kt.

This idea needs to be fleshed out a little more as we're not quite clear on how it would work.

I'll try to write a better explanation tomorrow. :)

A function like #helpshould probably redirect all translated pages through Special:MyLanguage.

Although we may need to enable the Help namespace and pages in namespace 12 (help) as well.

Page previews does not support previews of the help namespace as usually the lead description of a help page doesn't actually provide the level of help needed. For example https://www.mediawiki.org/wiki/Help:Tables would show "Tables may be created in wiki pages. As a general rule, it is best to avoid using a table unless you need one. Table markup often complicates page editing." which is not particularly helpful.

Since we've had 3 years of inactivity, I'm going to decline this. If someone still cares about this please open a new ticket which focuses on the problem rather than proposing a solution.

If anyone is interested you can also create an extension that extends page previews to provide this functionality: https://www.mediawiki.org/w/index.php?title=Extension%3APopups&section=7#Extensibility