Page MenuHomePhabricator

Require all gadgets to load via ResourceLoader
Closed, ResolvedPublic

Description

Gadgets that don't load via ResourceLoader require discrete requests to the server to fetch, which is awful for performance. Non-ResourceLoader loading of Gadgets should be sunsetted. The top priority should be fixing Gadgets that are turned on by default and which do not use ResourceLoader.

Event Timeline

ori raised the priority of this task from to Needs Triage.
ori updated the task description. (Show Details)
ori changed Security from none to None.
ori subscribed.

I'm in favor, but what about disallowing it first for gadgets that are enabled by default ?

A ton of gadgets stuff is only used by very few users, in those cases it probably matters significantly less. For default gadgets however, it is KEY to do this properly and it would probably achieve 80% of the same goal.

With https://gerrit.wikimedia.org/r/217987 non-RL gadgets could be easily spotted through simple API queries.

With https://gerrit.wikimedia.org/r/217987 non-RL gadgets could be easily spotted through simple API queries.

It's working.
Just look for "legacyscripts": true in https://en.wikipedia.org/w/api.php?action=query&list=gadgets&gaprop=id%7Cmetadata&formatversion=2

Ricordisamoa assigned this task to Krinkle.

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?