Page MenuHomePhabricator

Investigation: how many wikis have the ReferenceTooltip Gadget enabled by default?
Closed, ResolvedPublic3 Estimated Story Points


Before we deploy as a default feature, we should be sure that we aren't causing a huge conflict on wikis where the ReferenceTooltips gadget is enabled by default. For beta deployments, we aren't as concerned since users will specifically enable our feature and can read the help text mentioning the gadget conflict.

To do:

  • Check all (?) MediaWiki:Gadgets-definition pages.
  • The Gadget extension provides an API that might be helpful.
  • Search for ReferenceTooltips. Warning, the gadget might have different names on different wikis.
  • See if it is enabled by default.

Event Timeline

Tobi_WMDE_SW set the point value for this task to 3.Sep 30 2019, 11:47 AM

There is an API available, which we might be able to use to efficiently discover gadgets. I'm unsure whether the "enabled by default" information is here:

Whether it is on by default or not, we should probably turn one off if we turn the other on. I just had the confusing experience of turning on reference previews and seeing both versions appear. It is ugly. I started writing up a bug report before I figured out what was going on.

popglitch.gif (536×1 px, 2 MB)

We had a similar experience with the navpops gadget when we started rolling out page previews in 2016:

And we ended up with the conservative approach of saying that if you're using navpops you wont get hovers unless you turn navpops off first. This was a choice we made because navpops have advanced features, but you might rightly be able to say that this gadget is superceded by this functionality.

I modify line 53 as:

if ( || mw.config.get("wgPopupsReferencePreviews") ) {

Whether it is on by default or not, we should probably turn one off if we turn the other on. I just had the confusing experience of turning on reference previews and seeing both versions appear. It is ugly. I started writing up a bug report before I figured out what was going on.

+1, I get hit by this also, on English Wikipedia. @Lena_WMDE, for background there's probably a one-line change which will prevent this nasty overlap, and it's probably easier to just make the change than to do the investigation described in this task.

Change 593340 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Popups@master] Disable ReferencePreviews when gadgets conflict

The above patch detects both Navigation-popups and ReferenceTooltips by querying ResourceLoader. This approach feels solid when locally smoke-testing the various ways of loading gadgets, but it would be nice if we could include a browser test.

awight triaged this task as Medium priority.Jun 19 2020, 8:15 PM

I allow myself to see this glitch every day as a reminder of the bug, and can report that it's a really bad experience.

Are we asking the right question with this investigation? IMO a count of wikis doesn't give us any idea of how many people are impacted. Tallying the wikis and their user counts might be more useful. Even better, we might be able to count the number of users who actually experience the conflict.

But all that aside, if this a really bad experience for even a small number of people, we normally prioritize a fix regardless. The fix is simply to make one of the systems discoverable by the other, and suppress the system able to see this extra information (likely, ours).

This task is not to decide if we are going to do something about this. We just want to know how many wikis have this particular gadget enabled by default, as the title of this task literally says. What we might or might not conclude from this information is not to be discussed here.

IIRC, we would also like to know which wikis have it enabled - not just a plain count of how many (title might be misleading here). I think this was to then decide whether we want to only enable the feature on wikis that don't have the gadget enabled by default as a first step.
If this is still relevant and a route we want to go is up to product management to decide.
IMO a solution that detects the gadget and then provides the user with the option to turn the one or the other on/off might be what we really want in the end.

I have written a simple bot that searches regex


on every url like


with all valid language codes from interwiki map

Result was:


P.S.: updated with IgnoreCase regex option.

P.P.S. + kowiktionary. In other non-wikis doesn't found.

@MBH, that's amazing! Thanks a lot! The only bit I would love to have in addition to that is if there is a copy of this gadget with a different name somewhere? Maybe it's called "Reference tooltips" or "Reference-Tooltips" or "Reference something else" in other wikis?

Just comparing @MBH's list against the top ten, the gadget is enabled on English, Japanese, Dutch, Italian, Portuguese, and Russian, or 6 out of the top 10. I think that's enough granularity for this investigation.

In the event we decide to edit the gadget to make it detectable by ReferencePreviews, then we'll have to compile the exact list of where the gadget appears and what it's called, in a later task. We can't do anything useful with a more thorough but still inexact list, for example it's not safe to configure ReferencePreviews based on a rough guess about which wikis have the gadget.

Search with regexes Tooltips.*\|default\| and Reference.*\|default\| gave me exactly the same result.

awight moved this task from Proposed to Done on the WMDE-TechWish board.

Ready for demo, in other words.

Nice, thanks a lot everybody!

There are several ways to proceed here, I believe:

  • Make our Reference Previews auto-disable when the gadget is detected (probably based on it's name, same as already done with Navigation-Popups-Gadget, see T234204#5604893).
  • Update all gadgets to auto-disable.
  • Show a dialog asking the user what they prefer.
  • Somehow "stack" the two different popups or make it possible to "toggle" between the two.

But this is for the next ticket.

I had attached a proof-of-concept to expand the name-based exclusion: (for a later ticket :-)

Change 593340 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/extensions/Popups@master] Disable ReferencePreviews when gadgets conflict

I think this became obsolete with I5f43270. Please reopen if that's not correct.

@thiemowmde not sure I understand this correctly, but I5f43270 references only ReferenceTooltips. references yielding to both ReferenceTooltips and Navigation Popups, which is the desired behaviour. Can you make sure that reference previews is disabled when either one of these is enabled? Thanks!

I believe we did this via T265872 already. The code already contains two setting PopupsConflictingNavPopupsGadgetName and PopupsConflictingRefTooltipsGadgetName for the two gadgets. Navigation-Popups-Gadget replaces both Page-Previews as well as our new Reference Previews popup type. Navigation-Popups-Gadget even kills the Reference Tooltips gadget. Reference Tooltips alone replaces only Reference Previews.

I tested all combinations on enwiki again. Works as expected, as far as I can see.

I think it's a mistake that this investigation ticket here is still open.

Lena_WMDE claimed this task.

Great, thanks for checking @thiemowmde ! I will close this ticket.