Page MenuHomePhabricator

Gadgets definition should contain list of maintainers
Open, Needs TriagePublicBUG REPORT

Description

When gadgets break or are going to break it is important for Wikimedia developers to know who to contact. Right now there is no easy way to check who maintains a gadget - many gadgets are built and then the maintainers go away.

As a starting point I think anything defined in https://en.wikipedia.org/wiki/MediaWiki:Gadgets-definition should require a maintainers field which includes at least one valid username.

Any "default" gadget (code ran for anonymous users) with no maintainer shouldn't be permitted - we shouldn't be running code for everyone where there is no maintainer. That would be irresponsible.

Knowing gadgets have maintainers would be a reassuring requirement going forward as we evolve our front end code.

e.g.

* edittop[ResourceLoader|dependencies=user.options,mediawiki.util|type=general|maintainer=jdlrobson]|edittop.js|edittop.css

Event Timeline

Throwing in questions, not expecting simple answers:

  • Given that afaik no work is going on in T121470: Central Global Repository for Templates, Lua modules, and Gadgets, would that imply that as an interface-admin, I could add any username as a maintainer, whether that user considers themselves actually to be the maintainer of that gadget (or not)?
  • It also raises the (usual) question how to keep data up-to-date - if I was a gadget maintainer, and my gadget code got copied and pasted into other wikis (the instructions how to keep gadgets central isn't easy to find and might not be feasible when it comes to translation of user-visible strings), and I retired from maintaining that gadget in the meantime, would I be expected to find my copied code across all wikis myself to remove my username myself (and leave that...empty)?

I believe that code is more likely to have a valid maintainer name. The same applies to documentation within code, as you might have noticed. This has been my experience at least. Documentation in comments tends to be more up-to-date in general, not just in the context of Wikipedia scripts.

Perhaps you could consider encouraging the addition of a maintainer by including a template for an initial comment in a new JavaScript script. You know like a preload parameter, but automatic.

You could also design some extension to show edit stats for gadgets. Something like articleinfo (or just use articleinfo). This doesn't always show you the actual maintainer as admins sometimes just copy&paste code from actual dev. But top3 editors should at least give you a starting point.
https://xtools.wmcloud.org/articleinfo/pl.wikipedia.org/MediaWiki:Gadget-sk.js

Gadgets should be maintained by the interface admins of a wiki collectively. Even when certain users are especially associated with a gadget, I don’t think it would be right to contact only them. So to me this whole task seems ill-founded, to be honest.

I also don’t see how the proposed solution addresses the issue stated in the task description – if a maintainer is going away, an entry in a maintainer= field won’t stop that. And I agree with @Nux that anything in MediaWiki:Gadgets-definition is less likely to be kept up-to-date than a comment in the gadget code itself.

To me this task sounds like an attempt to find a technical solution for a social problem, and I don’t think it’s a good idea. Especially the part about enforcing a maintainer for default gadgets – if that actually gets implemented, I predict some wikis will work around it fairly quickly.