Commit graph

3 commits

Author SHA1 Message Date
Ed Sanders
c1d97fe834 ESLint: Manually enforce prefer-const
Change-Id: Id35fb62915e8067deaa1eb412ab3cb9d9353b9e8
2024-11-15 19:58:16 +00:00
Ed Sanders
c125751148 ESLint: Use ES6 and autofix
Change-Id: Ib61a852545f10544da2dd9cbba5fc526b3f46d6f
2024-11-15 12:54:03 +00:00
jdlrobson
c1ca90ce4b Reduce ResourceLoader modules used by Monobook
MonoBook supports two modes - one that is responsive and one that
is not. To do this it adds 3 modules. These can be reduced to 1
module by loading all the code and adding client side checks to
determine whether to use it.

The skin--responsive class is added by core for responsive skins so
can be used to make that check.

This does lead to additional download for all users (particularly
the addition of oojs-ui.styles.icons-alerts) but given the default
behaviour is to load these, and non-responsive skin requires an opt
in I don't see this as a problem.

Thanks to gzip the increase in render blocking styles is minimal:

Before:
skins.monobook.styles: 15.21KB
skins.monobook.responsive: 16.14KB

After:
skins.monobook.styles: 16.63KB

See bug for QA plan.

Bug: T285492
Change-Id: I76bb644145539c8ec0220704c8fe9a78a4819c03
2021-08-03 12:45:59 -07:00
Renamed from resources/mobile.js (Browse further)