https://bugzilla.wikimedia.org/show_bug.cgi?id=47134
Web browser: --- Bug ID: 47134 Summary: special pages inconsistently load mediawiki.special's JS or CSS Product: MediaWiki Version: 1.22-git Hardware: All OS: All Status: NEW Severity: minor Priority: Unprioritized Component: ResourceLoader Assignee: wikibugs-l@lists.wikimedia.org Reporter: sp...@wikimedia.org CC: krinklem...@gmail.com, roan.katt...@gmail.com, tpars...@wikimedia.org Classification: Unclassified Mobile Platform: --- The 'mediawiki.special' module defines 'scripts' => 'resources/mediawiki.special/mediawiki.special.js', 'styles' => 'resources/mediawiki.special/mediawiki.special.css', but several special pages call only $out->addModuleStyles( 'mediawiki.special' ); ignoring the JS. mediawiki.special.js currently only defines an mediaWiki.special namespace, so this is not causing any harm. Conversely, Special:RecentChanges does not addModuleStyles( 'mediawiki.special' ) and instead mentions it as a dependency of its script module, so it does not load mediawiki.special.css if JS is disabled; RecentPages doesn't seem to use any of the styles in mediawiki.special.css so again no harm. I noticed this while researching how code handles addModule{s,Scripts,Styles}. Roan suggested that if code has CSS that should load when JS is disabled then it should be in a separate module to avoid this confusion, I don't see a naming convention for this (a '_nojs' suffix perhaps?). -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l