Last modified: 2012-07-31 19:18:23 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 T39803, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37803 - Write a step-by-step tutorial on how to use ResourceLoader in a (new) extension
Write a step-by-step tutorial on how to use ResourceLoader in a (new) extension
Status: VERIFIED FIXED
Product: MediaWiki
Classification: Unclassified
Documentation (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Krinkle
:
Depends on:
Blocks: documentation
  Show dependency treegraph
 
Reported: 2012-06-21 20:21 UTC by Antoine "hashar" Musso (WMF)
Modified: 2012-07-31 19:18 UTC (History)
4 users (show)

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


Attachments

Description Antoine "hashar" Musso (WMF) 2012-06-21 20:21:02 UTC
We have lot of documentation starting from https://www.mediawiki.org/wiki/ResourceLoader 

One thing which is lacking, would be a step by step tutorial to build an extension from scratch that will just load a css and a js.
Comment 1 Antoine "hashar" Musso (WMF) 2012-06-21 20:22:10 UTC
This is a documentation bug blocking bug 1.

Maybe Danielle Benoit could help?
Comment 2 Krinkle 2012-06-21 20:34:07 UTC
I'm not sure it is really lacking.

These two are both pretty well documented. ResourceLoader takes a lot of maintenance and set-up steps out of the developers hands.

Especially for a new extension all it is is this:

1. Registering in wgResourceModules
2. Loading with OutputPage::addModules

Both of which are described on on mediawiki.org. Just now I've rephrased some of that and moved it here: [[mw:ResourceLoader/Developing_with_ResourceLoader]] (#Registering and #Loading_module respectively).

The other things (debugging features, special CSS anotations etc.) are optional, and were already documented under /Features and Developing_with_ResourceLoader.
Comment 3 Antoine "hashar" Musso (WMF) 2012-06-21 20:40:30 UTC
We definitely have a lot of documentation about RL. What this bug is about is really writing an introduction to the resource loader for newcomers / newbies. We have recurring requests on #mediawiki about how to add a JavaScript file to an extension, I usually end up pointing people to the WikiLove extension as an example.  A tutorial would let them start up their extension more easily.
Comment 4 Antoine "hashar" Musso (WMF) 2012-06-21 20:41:35 UTC
See also bug 37805 which is about writing an example extension in mediawiki/extensions/examples
Comment 5 Krinkle 2012-07-31 18:02:37 UTC
* bug 37805 has been fixed
* https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader has been improved during Wikimania 2012
Comment 6 Antoine "hashar" Musso (WMF) 2012-07-31 19:18:23 UTC
Indeed, thanks a lot! :-]

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


Navigation
Links