Page MenuHomePhabricator

Add a way for skins and extensions to feed into "Installed client-side libraries" on Special:Version
Closed, ResolvedPublic

Description

Following on from T34892: Special:Version should include version numbers of JS resources like jQuery, we need a way for skins and extensions to add their entries into "Installed client-side libraries" on Special:Version if they implement a foreign-resources.yaml file.

Event Timeline

Reedy renamed this task from Add a way for skins and extensions to feed into "Installed client-side libraries" on Special:Version to Add a way for skins and extensions to feed into "Installed client-side libraries" on Special:Version.Feb 23 2023, 9:53 PM

Is it reasonable to add to the extension schema a field (that takes a string or an array of strings) with links to foreign-resources.yaml files in the extension/skin?

Would an extension/skin potentially have multiple? I guess if we have WMF developed libraries, embedded in a skin/extension which itself embeds many other libraries...

Is it reasonable to add to the extension schema a field (that takes a string or an array of strings) with links to foreign-resources.yaml files in the extension/skin?

Though if we also want to then use this as part of ForeignResourceStructureTest in some way in core (rather than causing duplicated code in extensions/skins), we'd need to pass the path to the lib dir as well as the path to the foreign-resources.yaml file...

rMW5099f79718b5: Add ForeignResourceDirs extension/skin attribute assumes there is exactly one library dir per extension/skin, the foreign-resources.yaml file is always at its root and always called that. We can revisit that if needed (it required some custom logic in ExtensionProcessor anyway, modifying it should be no trouble) but it's good to keep things simple IMO.

I think so. VE and the ve lib it bundles is going to be one special case there…

One step at a time, anyway

Change 912771 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/core@master] Show extension/skin frontend libraries on Special:Version

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

Change 912771 merged by jenkins-bot:

[mediawiki/core@master] Show extension/skin frontend libraries on Special:Version

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

Reedy assigned this task to Tgr.

There's potential future improvements to this... Whether allowing for multiple foreign-resources.yaml files (from sub libraries), or how we display them (naming the skin/extension/library/core) etc... But that is future followups and improvements