"Krinkle" posted a comment on MediaWiki.r106007. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106007#c29117
Commit summary for MediaWiki.r106007: Followup r100497, r101827: use another way which doesn't look that hacky to load styles in gadgets before documents. Also avoid double loading of the same stylesheet. Now a gadget generates up to three modules: * The first is known as meta module which still use its original name to keep B/C. It contains no contents, with dependencies of ones specified by user, scripts module, and styles module. See below. * The second is known as scripts module whose name ends with ".scripts". It contains all scripts in this gadgets, with dependencies specified by user * The third is known as styles module whose name ends with ".styles". It contains all styles in this gadgets and loaded before documents. After its load it's instantly marked as ready without dependencies resolved (which is the same as dependencies of .scripts but may not be used at all) The meta module is loaded as if there's only one module under that name, and it's safe for users to reuse that name. The styles module is loaded and marked as ready in <head>, as described above. Normally the scripts and styles modules shouldn't be used by users. A possible bug that dependency-only gadgets (ie. no scripts or styles) may not be loaded is fixed. Krinkle's comment: The gadgets extension has been pretty much rewritten from scratch in the RL2 branch, primary focus on three features in there: Gadget repositories, Full ResourceLoader integration and a Gadget manager that allows easy modification and tracking of individual gadgets. I'd recommend not adding new features or changing behavior of this extension without prior discussion in a bug ticket. So far the RL2 branch is trying to keep everything backwards compatible, it also has a maintenance script migration. It would be great if that would not have to be redone. See also [[RL/V2SPEC]] _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
