Page MenuHomePhabricator

Load all gadgets via ResourceLoader regardless of definition
Closed, DeclinedPublic

Description

Since T75810, gadgets are not loaded at all when they're not defined as using ResourceLoader. Given there is no possible worse outcome, they should instead use ResourceLoader by default, as if the ResourceLoader option had been specified. Then users can identify issues with any.

Performing hundreds such edits doesn't strike me as a particularly useful use of user/sysop/dev time. We can spare the effort on the several hundreds wikis which have not been so fast as to update their gadget definitions yet.

The original question, for which an answer could not be found:

For many Gadgets, migrating to ResourceLoader will be as easy as adding [ResourceLoader]" to its definition on MediaWiki:Gadgets-definition.

What's the point of requiring an explicit [ResourceLoader] if gadgets can't work without it? Shouldn't it be implied now?

Event Timeline

Nemo_bis assigned this task to Krinkle.
Nemo_bis raised the priority of this task from to Medium.
Nemo_bis updated the task description. (Show Details)
Nemo_bis added subscribers: Nemo_bis, Dineshkumar, Aklapper and 9 others.

CSS-only gadgets don't need [ResourceLoader].

We could make it implied, but that might make it harder to find gadgets that need to be updated/fixed?

Krinkle closed this task as Declined.Aug 29 2015, 12:44 AM

Per Lego, this was done intentionally as to require attention from a maintainer. Too many scripts are lingering unattended causing unnecessary load and slowdown in user's browsers. Anything still not using ResourceLoader (first deployed 5 years ago, in 2010) was disabled by default. Thus requiring that someone who's responsible for the gadget (or willing to take on new responsibility) has to give it a quick look. Someone who would migrate it if necessary, and re-evaluate its existence (e.g. whether the gadget still makes sense in today's environment, that it works in general with current conventions on the wiki, etc.).

It's disappointing that some admins have gone around simply setting the ResourceLoader option on everything, regardless of whether it works or not.

If a gadget doesn't work and other scripts are affected, I'm sure such admins will be taken to task pretty quick.

Nemo_bis added a comment.EditedAug 29 2015, 9:18 AM

It's disappointing that some admins have gone around simply setting the ResourceLoader option on everything, regardless of whether it works or not.

It's the most reasonable option now. Between having gadgets 100 % broken and x % broken with unknown x < 100, it's clearly better to do the second.