Page MenuHomePhabricator

Specify all source pages in a single array in gadget definitions
Closed, ResolvedPublic

Description

In gadget definition pages, we can currently specify scripts, styles and datas. The first two are reasonable. The third datas, which is not even a word (as data itself is plural), is used for JSON pages. With T340460, we'll probably have another one with no better name than vues.

Instead of all that, we should consider having just a single field pages. This is more similar to MediaWiki:Gadgets-definition where all pages are specified together. The page name suffix and content model can be used to decide if it's a JS/CSS/JSON/Vue page.

Event Timeline

Change 982772 had a related patch set uploaded (by SD0001; author: SD0001):

[mediawiki/extensions/Gadgets@master] Specify all source pages in a single array in JSON definitions

https://gerrit.wikimedia.org/r/982772

Change 982772 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Specify all source pages in a single array in JSON definitions

https://gerrit.wikimedia.org/r/982772

Just noting that after this was implemented, on the definition page HTML comments after file name are treated as a part of the name contrary to what happened before (and they make the validation to fail). Thus I've had to "fix" two gadgets on plwiki by moving the comment: https://pl.wikipedia.org/w/index.php?title=MediaWiki:Gadgets-definition&diff=prev&oldid=72407946

I'm not sure if it's a bug or feature.