Last modified: 2014-08-08 19:44:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33150, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31150 - Make it possible to register RL modules using Gadgets extension (aka "hidden gadgets")
Make it possible to register RL modules using Gadgets extension (aka "hidden ...
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
Gadgets (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-25 09:39 UTC by Beau
Modified: 2014-08-08 19:44 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch adding a new gadget attribute: hidden (3.04 KB, patch)
2011-09-25 09:39 UTC, Beau
Details

Description Beau 2011-09-25 09:39:33 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
Comment 1 Roan Kattouw 2011-09-25 09:41:20 UTC
This is already implemented in /branches/RL2
Comment 2 Beau 2011-09-25 09:44:36 UTC
I am aware of that, but I was hoping that it would get deployed on WMF wikis before MW 1.19...
Comment 3 Krinkle 2011-09-25 23:28:21 UTC
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.
Comment 4 Krinkle 2011-09-25 23:29:51 UTC
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.
Comment 5 Beau 2011-09-26 17:43:07 UTC
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...
Comment 6 Max Semenik 2011-09-26 17:45:37 UTC
You can even use nonexistent rights for that purpose.
Comment 7 Beau 2011-10-23 18:00:50 UTC
I am using rights=hidden in gadget definition as a workaround. I am closing this request as WONTFIX.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links