Page MenuHomePhabricator

Help pages and hovercards
Open, LowPublic

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.

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

jeblad created this task.May 28 2016, 2:21 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 28 2016, 2:21 PM
bmansurov triaged this task as Low priority.May 30 2016, 5:12 PM
bmansurov added a project: Readers-Web-Backlog.
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. :)

jeblad updated the task description. (Show Details)Jun 6 2016, 3:47 PM
jeblad updated the task description. (Show Details)Jun 6 2016, 7:50 PM
jeblad updated the task description. (Show Details)Jan 23 2017, 6:35 PM

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

Unless I'm mistaken this will be fixed by T145541 ?

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

Restricted Application added a subscriber: Danmichaelo. · View Herald TranscriptFeb 15 2018, 12:44 AM