Last modified: 2014-08-27 16:15:46 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 T32956, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 30956 - Make ResourceLoader a standalone library
Make ResourceLoader a standalone library
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: Future release
Assigned To: Krinkle
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-17 20:13 UTC by Krinkle
Modified: 2014-08-27 16:15 UTC (History)
3 users (show)

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


Attachments

Description Krinkle 2011-09-17 20:13:48 UTC
Just like the backend, the front-end should be less tied into MediaWiki base as well.

It sounds more complicated than it really is though. All we need to do is move mw.loader into a separate file and create an instance of it in mw.loader. 

It's already an object constructor, except that right now it is instantly-instantiating an anonymous object constructor (this.loader = new (function(){ ... }));
Comment 1 Krinkle 2011-09-27 00:32:05 UTC
Setting status to NEW. Not a priority right now.
Comment 2 Krinkle 2012-01-02 15:39:28 UTC
Issues:
* Loader uses mw.log, mw.html, mw.messages, mw.config (skin, wgUserLanguage, debug, wgResourceLoaderMaxQueryLength)
Comment 3 Krinkle 2012-05-12 01:20:58 UTC
mw.html.escape is easily re-created.

The ResourceLoader object constructor would take an option object:
mw.loader = new ResourceLoader({
    log: mw.log,
    msgStore = mw.messages.values
    ..
});

Last year that sounded do-able, but today we also have custom load sources and callback queue. So it gets a little more complicates. Though using $.Callbacks() might make some of that easier (if we want to depend on jQuery for the core loader framework).
Comment 4 Krinkle 2014-08-27 16:15:46 UTC
Both in the design and implementation we've done pretty well in keeping ResourceLoader independent from MediaWiki, but it has been integrated a little bit here and there.

I hope to have some time next quarter to separate the last bits out and move it to its own project with a documented API and release/version policy.

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


Navigation
Links