Page MenuHomePhabricator

Investigation: Short-term solutions for global gadgets
Closed, ResolvedPublic5 Estimated Story Points


Global gadgets was the #1 wish on the 2016 Community Wishlist Survey.

This ticket is to investigate the problem, and determine what's feasible to do this year.

The gadgets on 30 or more wikis are as follows:

gadgetwikisdefaulttotal usersactive userscomments
HotCat354551023828971could be its own extension; see T104394: Clean up and Graduate HotCat via Beta Features
UTCLiveClock17717800492597add to the Purge extension; see GH#16
edittop12123524821818add to core, but it's complicated; see T2156: Add section edit link for 0th section of a page/article
purgetab10628265101261is the Purge extension
contribsrange7710263281515will be mostly replaced by T145912: Create new Special:RangeContributions page to support viewing contributions across an IP range
exlinks779491361063add to core?
DotsSyntaxHighlighter557193781044replaced by MediaWiki-extensions-CodeMirror?
markAdmins343211602712see T180555: Turn the markAdmins gadget into an extension

Event Timeline

See also: T153332: Investigation: Global gadgets

Maybe a gadget-copying tool would be the simplest to get up and running in a short time? Basically a glorified copy-and-paste thing combined with some sort of out-of-date notification.

kaldari renamed this task from Investigation: Global gadgets to Investigation: Short-term global gadgets.Oct 17 2017, 11:16 PM
kaldari renamed this task from Investigation: Short-term global gadgets to Investigation: Short-term solutions for global gadgets.
kaldari triaged this task as Medium priority.Oct 17 2017, 11:19 PM
kaldari set the point value for this task to 5.

There is a discussion on French Wikipedia about moving gadget code into Git and having a bot copy it out to all the required wikis. Google Translate mangles @Seb35's words thus:

it was proposed to request a Git repository from the Foundation for French-speaking gadgets with a bot that would copy from that Git repository to the French-speaking projects (and not elsewhere) that have the gadget, this would be a first step to centralize the gadgets. In the idea, push rights to this Git repository would be widely distributed, at least to regular JavaScript speakers.

Perhaps we could look at helping with this bot?

Of course there are some issues to be figured out, such as the dangers of running a bot as an admin user (so it could edit in the MediaWiki namespace); and how updates would work. Perhaps a simple first-run approach would be that the bot would rather just give notifications to admins on the destination wikis, telling them of a pending update and a quick means to perform that update (i.e. the admins would log in to a tool and run the updates from there, as themselves).

Also, T159334: Discussion: Create a Central Gadget Taskforce mentions the benefits to having code in an extension, which I must admit does sound good in lots of ways. There is T104394: Clean up and Graduate HotCat via Beta Features for example. Maybe a different simple thing we could do before the end of the year is to take one well-used gadget and beta-feature-ize it? Some might be quite easy, for example purgetab already exists as an extension. Maybe the [[MediaWiki:Gadget-metadata.js | metadata]] gadget could be incorporated into PageAssessments?

One of the ideas that emerged during the 2017 hackathon in Vienna (T159334) was to create an Extension with most used gadgets. Same thing for templates or anything that can be used in common.

So there seem to be able 2244 gadgets (or gadget names, rather, because it looks like they sometimes get renamed when being copied between wikis).

Gadgets that seem to be on 40 or more wikis are as follows:

  • HotCat 354 — could be its own extension; see T104394: Clean up and Graduate HotCat via Beta Features
  • UTCLiveClock 177 — add to Purge extension
  • wikEd 155
  • edittop 121 — add to core, but it's complicated; see T2156: Add section edit link for 0th section of a page/article
  • Navigation_popups 121
  • ReferenceTooltips 110
  • purgetab 106 — is the Purge extension
  • refToolbar 82
  • contribsrange 77
  • exlinks 77
  • Twinkle 67
  • CleanDeleteReasons 57
  • DotsSyntaxHighlighter 55 — replaced by CodeMirror now?
  • popups 54
  • charinsert 49
  • removeAccessKeys 48
  • RTRC 45
  • ProveIt 44
  • Cat-a-lot 41
  • GoogleTrans 40
  • HideFundraisingNotice 40
  • searchFocus 40

This data comes from a rather hacky little script I just bodged together, so if it's of interest I'll clean it up and check that it's doing its thing properly (It also provides the total and active user counts, and counts of defaultiness). It might be good to look at the differences between gadget code on the different wikis.

Here's the summary data of gadgets with wiki count, the number of wikis they're default on, and the total/active user counts: F10785334. The active user count isn't enabled on all wikis, so that's not necessarily right.

I see some possible duplicates, like Cat-a-lot and Hot-cats, or Navigation-popups and popups (which are basically covered by Hovercards now IIRC).

I'm not sure what should happen next with this ticket. I think we've missed the boat for "end of 2017" but perhaps some of the above gadgets can still be worked on?

Since HotCat is far and away the most globally used gadget and it would be relatively straight-forward to make into an extension (using mw.widgets.CategoryMultiselectWidget), I think the most bang-for-the buck we could get would be to extensionize HotCat. I might try pitching this idea to some folks and see what people think.