Last modified: 2014-08-08 19:44:22 UTC
Created attachment 9097 [details] Patch adding a new gadget attribute: hidden Before ResourceLoader was created Gadgets extension offered nice way to reuse common (library) code in gadgets - it is possible that two gadgets use a same js/css page. Such page is loaded only once. New implementation based on ResourceLoader duplicates code for every gadget. So the same library will be downloaded and executed many times. I would like to request a new attribute 'hidden' for gadgets, which should not be displayed in preferences. This attribute allows creating ResourceLoader modules which can be referenced by dependecies parameter. Example use case: * awesomeLibrary [ResourceLoader | hidden] | fileA.js | fileB.js | thisLibraryHasStyle.css * awesomeGadget-1 [ResourceLoader | dependencies=ext.gadget.awesomeLibrary ] | awesomeGadget-1.js * awesomeGadget-2 [ResourceLoader | dependencies=ext.gadget.awesomeLibrary ] | awesomeGadget-2.js
This is already implemented in /branches/RL2
I am aware of that, but I was hoping that it would get deployed on WMF wikis before MW 1.19...
No, not going to happen. Too many changes. Gadgets/ResourceLoader 2.0, among many new features, introduces the gadget setting "hidden". (In reply to comment #0) > Before ResourceLoader was created Gadgets extension offered nice way to reuse > common (library) code in gadgets This is still possible. the same way as it used to be, nothing changed. Ofcourse after ResourceLoader it is recommended to use a hidden module to avoid loading the same code twice, but what you describe here is still perfectly possible. Marking INVALID as this was already done.
Well, it could be done without all the new changes, in the old extension. I don't have time to review and deploy, but if Roan sees fit, we could do this in advance.
If it is too much effort I can always use a workaround "rights=abusefilter-view-private". I don't like such solutions, however as no one is supposed to have this right, it will work...
You can even use nonexistent rights for that purpose.
I am using rights=hidden in gadget definition as a workaround. I am closing this request as WONTFIX.