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.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Show extension/skin frontend libraries on Special:Version | mediawiki/core | master | +7 -2 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T330508 Expand running of ForeignResourceStructureTest against skins and extensions that have foreign-resources.yaml files | |||
Resolved | Tgr | T330427 Add a way for skins and extensions to feed into "Installed client-side libraries" on Special:Version | |||
Resolved | simon04 | T34892 Special:Version should include version numbers of JS resources like jQuery |
Event Timeline
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...
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
Change 912771 merged by jenkins-bot:
[mediawiki/core@master] Show extension/skin frontend libraries on Special:Version
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