"Liangent" posted a comment on MediaWiki.r106007. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/106007#c27503
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. Liangent's comment: Number of modules per gadget can be reduced to two by merging meta and scripts (call them main and styles then) but having three seems more natural... anyway in case there is another type of component that we have to do something special for it in the future (will there be?). _______________________________________________ MediaWiki-CodeReview mailing list mediawiki-coderev...@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview