Page MenuHomePhabricator

RL manifest for OOjs UI icon packs should be better
Closed, ResolvedPublic8 Estimated Story Points


  • Generated from a JSON file in the theme
  • Use ResourceLoaderImageModule
  • Map to .mw-icon-<whatever> classes in addition to .oo-ui-icon-<whatever>

Event Timeline

Jdforrester-WMF assigned this task to matmarex.
Jdforrester-WMF raised the priority of this task from to Medium.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF subscribed.
Legoktm set Security to None.
matmarex raised the priority of this task from Medium to High.Mar 22 2015, 10:13 PM

I'm going to do this after we upgrade MediaWiki to use OOjs UI v0.9.6 (in a separate commit).

Change 202430 had a related patch set uploaded (by Bartosz Dziewoński):
Use ResourceLoaderImageModule to serve icons for OOjs UI

matmarex lowered the priority of this task from High to Medium.Apr 14 2015, 4:58 PM

(Updating priority to reflect reality.)

Idea dump:

We want to use ResourceLoaderImageModule to serve icons for OOjs UI in MediaWiki since it gives us better per-language icons support and brings us ever-so-slightly closer to being able to master the MediaWiki theme for OOUI in the mediawiki/core repository, which AIUI we also want to do at some point.

Possible solutions:

  • Keep using what we have. No ResourceLoaderImageModule, lots of silly duplicated code in Resources.php, annoying update process if we add/remove icon packs. This is now in master.
  • Use the original JSON files from OOUI source and teach ResourceLoaderImageModule to pull data directly from them. I think that's pretty gnarly. That is what the proposed patch does now.

Hopefully better idea: generate the ResourceLoader module data for MediaWiki directly. This would be a separate file that we'd load in ResourceLoader.php near "// Register core modules" code. (We already have such a thing in LocalisationCache for OOUI localisation.)

  • We could make this PHP code blob like in Resources.php or a JSON file with similar structure. JSON would probably require some custom caching in order not to affect page load times, Legoktm says it's possible. PHP code would be nasty, that's not a portable format, but possibly easier to use in this scenario.
  • We could generate this from OOUI build process (which would shatter the illusion of OOUI being independent from MediaWiki) or from a MediaWiki maintenance script ran during update, from (would make the update process somewhat nastier?).

I am not very happy with the current state of the patch, but I'm also not sure if putting more work into it is worth it.

Change 202430 merged by jenkins-bot:
Use ResourceLoaderImageModule to serve icons for OOjs UI