Last modified: 2014-08-28 22:25:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 26901 - ResourceLoader: Implement per module configuration
ResourceLoader: Implement per module configuration
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-24 14:45 UTC by Michael Dale
Modified: 2014-08-28 22:25 UTC (History)
3 users (show)

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


Attachments

Description Michael Dale 2011-01-24 14:45:37 UTC
Presently javascript based configuration is global. In the context of many extensions with many dynamic loading javascript modules with lots of configuration it would be ideal to have the option to package configuration per module. Like adding a 'config' parameter to the ResourceLoaderModule register array. ( similar to messages ) 

If an extension or module wanted the configuration available globally it could use the existing 'ResourceLoaderGetConfigVars' hook or associate it with the loaderScripts register. Otherwise configuration would just be delivered per module registration array. 

Part of this patch of course checks localSettings.php modified time as part of "resources with configuration" max timestamp checks.
Comment 1 Bugmeister Bot 2011-08-19 19:12:56 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 2 Michael Dale 2011-09-07 21:04:56 UTC
Krinkle this would be a nice feature for RL2 efforts. So that if you have lots of modules with lots of configuration your startup module does not get overloaded with configuration. 

Perhaps within the module definition you include a way to designate some configuration as global, with the default setting only packaging in the resource configuration once the module is loaded.
Comment 3 Krinkle 2011-09-14 10:27:59 UTC
GSoC 2011 features per-gadget preferences. Once that is reviewed and merged back into trunk we should look at this for RL3 (too late imho for RL2, lots of stuff already).

Possible use cases:
* Ability to change configuration options that are for one module only.
* That ability for the site admin (from php) and (if module allows it) per-user as well from the preferences somewhere (ie. a sub pref-pane per module)
* ResourceLoader passes this to the front-end just like it does for other things (either as a 4th component (next to scripts/styles/messages), or as a separete module implementation (like is done for mw.config and mw.user.options)
* Moduel get can it's stuff via mw.loader.getConfig( 'modulename' ).someThing
Comment 4 Helder 2011-10-27 00:14:10 UTC
(In reply to comment #3)
> too late imho for RL2, lots of stuff already

What a pity... =(

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


Navigation
Links