I’ve also posted on the wiki talk page but what does everyone think of adding tooltips to the wiki? I think it would be useful for definitions, context, tangential, or other matters. What are your thoughts?
I see no reason not to do it, but I must say at first I misunderstood what you were asking for.
The extension you linked allows editors to manually add tooltip text in an article. As you said, it’s useful for definitions and the like.
In my opinion a more important feature, and what I first thought you were suggesting, would be preview when hovering over a link, like on Wikipedia. If an article mentions and links to highway=tertiary for example, I would prefer if mousing over it showed a tooltip with the first sentences of the page:
The highway=tertiary tag is used for roads connecting smaller settlements, and within large settlements for roads connecting local centres. In terms of the transportation network, OpenStreetMap “tertiary” roads commonly also connect minor streets to more major roads.
I realize this is off-topic as it’s not what you were asking, but I figured I might not be the only one to misinterpret your post, so I thought I’d mention it.
For slow readers like Moi (not native engelish), smallprint in particular, tooltips disappear too quick. If the mouse stays on the keyword, continue to show. If moved on and hovers then let it sit for a little. Whole first sentence like the sampled above. Set the sand clock.
I quite like this idea as well and think they can both exist. I am not sure of an extension for this, but can do some sleuthing.
I don’t think this extension has an auto-disappear unless your mouse veers away from the tooltipped text.
To address @Minh_Nguyen from the wiki, perhaps I don’t understand extensions well but are you suggesting this stable long-term extension is difficult to maintain? And instead suggesting multiple other extensions? I am not quite following. You typically have great insight so I am weary to question your feedback but I simply don’t understand how this is a huge maintenance burden.
I just did that:
I support adding both tooltips and page previews, hope you’re okay with semi-hijacking this thread for this purpose
By all means! I agree completely with both.
How would any proposed additions work on mobile?
Popups I am not sure, I imagine just as wikipedia does, just not show them. As far as tooltips, most on mobile allow you to tap the word/phrase and the overlay appears.
For completeness, here was my response on the wiki:
This looks like a fancier version of {{Abbr}} or a w:Template:Tooltip that we could import – or the built-in
<ref>
footnote syntax. At a glance, I don’t see a strong reason for an extension, which would have some maintenance overhead. We could pull in the same Tooltipster library using a gadget and a template that invokes it. (Feel free to prototype one as a personal user script.) More broadly, footnotes would be a lot more usable with the Popups extension or the Navigation Popups or Reference Tooltips user script.
Taking a step back, I understand that you’d like more convenient access to more information than what’s in the article body. Traditionally, we provide more information about a term by linking to an article about the term; more information about an abbreviation by specifying a tooltip with the {{abbr}}
template or <abbr>
tag;[1] and supplemental information that doesn’t fit in the running text of an article by inserting a footnote with the <ref>
tag. The links to other articles and the footnotes both require you to click on a link, which is inconvenient. It would be nice to simply hover over a link and see what’s behind it.
SimpleTooltip is a wrapper around Tooltipster, a JavaScript library. Administrators on the wiki can install most JavaScript libraries without fussing with MediaWiki extensions. For example, we have the ability to embed vector maps into articles thanks to a gadget that installs MapLibre GL JS. By contrast, extensions can only be installed by the operations team. They’re hesitant to install more because they tend to break in complicated ways every time we need to upgrade MediaWiki.
Nonetheless, there are several outstanding requests for extensions that enable functionality we can’t get any other way. For example, DynamicPageListEngine would help the community keep track of the tagging proposal process and other changes to the tagging scheme. WikibaseCirrusSearch would make it easier to search for data items and would enable iD to add presets, documentation, and validation rules for relation roles. In my opinion, these would be a better tradeoff and a higher priority than a tooltip extension.
I don’t think we’d end up using SimpleTooltip for anything besides expanding abbreviations, because it makes you repeat the tooltip’s contents inline every time you want a tooltip. We can’t realistically inline the first paragraph of the “Tag:highway=tertiary” article every time we refer to highway=tertiary
in another article. For abbreviations, we already have the {{abbr}}
template, and I suppose we could install Tooltipster to make the tooltips prettier than the browser default.
By contrast, the Popups extension dynamically fetches the first paragraph and image of an article using the MediaWiki API when you hover over the link, so we won’t need to change the contents of any article. It also supports popping up the contents of a footnote. Popups requires the TextExtracts and PageImages extensions, which come with MediaWiki but need to be configured. These extensions have the side benefit of adding images and better snippets to search results and social media previews (such as Discourse’s “oneboxes”).
If we can’t get the Popups extension installed, administrators could in the meantime install the Navigation Popups script as a gadget, or you could install it for yourself as a user script. This is the gadget that many Wikipedians relied on before the Wikimedia Foundation developed Popups. It’s functional but a little slower. Alternatively, if all you want is popups for footnotes, then Reference Tooltips is simpler. I suppose you could make it prettier by installing Tooltipster as a user script and hooking into it somehow.
Which also works here on the OSM Community Forum. ↩︎