The ext.uls.interlanguage module is a small style module that is added conditionally to all pages but is not used on the Minerva skin. It accounts for the majority of warnings in T235712. Fixing this should be relatively straightforward for someone who understands the code and will lead to a more performant site on the long term.
Acceptance criteria
- The module should set "targets": [ "desktop", "mobile" ], so that it does not throw the warning described in T235712
- The module is not loaded on the Minerva skin or ships an empty stylesheet (and since the stylesheet already contains a rule .skin-vector that can be offloaded to Vector specific)
Developer notes
It is added in includes/UniversalLanguageSelectorHooks.php.
if ( $wgULSPosition === 'personal' ) { $out->addModuleStyles( 'ext.uls.pt' ); } else { $out->addModuleStyles( 'ext.uls.interlanguage' ); }
Two possible solutions
- The check above should do one of one take into account the skin (which is provided by the addModule hook)
if ( ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) && MediaWikiServices::getInstance()->getService( 'MobileFrontend.Context' )->shouldDisplayMobileView() ) { // add mobile modules or do nothing } else { $out->addModuleStyles( 'ext.uls.interlanguage' ); }
- The module should use skinStyles and set Minerva to blank.
"ext.uls.interlanguage": { "targets": [ "desktop", "mobile" ], "skinStyles": { "default": ["css/ext.uls.interlanguage.less"], "minerva: [] }, "localBasePath": "resources", "remoteExtPath": "UniversalLanguageSelector/resources" },
(ULS maintainers should decide which is appropriate)