Introduce ResourceLoaderLessVarFileModule
authorjdlrobson <jdlrobson@gmail.com>
Fri, 20 Apr 2018 18:42:41 +0000 (11:42 -0700)
committerjdlrobson <jdlrobson@gmail.com>
Wed, 25 Apr 2018 18:27:11 +0000 (11:27 -0700)
commit1bc62c548c120d79f6a3ff9c14c19037aee40122
treecc12c21a3d07e59eec7202e93cc7b81c8fad67cc
parentda5da8bbd69ce7d3c46b7de72a5a4da1a1a9c6ef
Introduce ResourceLoaderLessVarFileModule

This ResourceLoader module provides a way to ship
messages to CSS variables.

We will need this going forward to deal with flash of
unstyled content in various JavaScript based UIs that
are subject to i18n such as table sorting and
collapsible elements.

To avoid overhead of hitting the database to fetch and
transform localisation messages we make use of the MessageBlobStore
making use of `messages` definition already inside
ResourceLoaderFileModule. Given this resource is only intended
for render blocking styles without JavaScript this should be okay
(although if requested in JavaScript will also ship associated
messages)

Bug: T42812
Change-Id: I2bf12cdc848478889acbe9a7a970e46f8aefa287
autoload.php
includes/resourceloader/ResourceLoaderLessVarFileModule.php [new file with mode: 0644]
tests/phpunit/includes/resourceloader/ResourceLoaderLessVarFileModuleTest.php [new file with mode: 0644]