Load styles in 'oojs-ui-widgets' again rather than a separate module
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Aug 2018 21:46:21 +0000 (23:46 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 16 Aug 2018 21:48:02 +0000 (23:48 +0200)
commitbebcceb742c6481fec883fa826a40096b5b917b4
tree83125561537957800dbefd1aa0252012dc553917
parentb7a0bafb4b64a02bb209853b37b3d8939ee9ffdc
Load styles in 'oojs-ui-widgets' again rather than a separate module

OOUI's 'widgets' style module must be loaded after its 'core' style
module, because the styles need the rules to be in this order to work.

We can't enforce a dependency from 'oojs-ui-widgets.styles' on
'oojs-ui-core.styles', because it is a style-only module (it can't
have dependencies).

When both of these modules are loaded as style-only modules (using
addModuleStyles() in PHP), everything works fine, because they are
loaded in alphabetical order. But when they are loaded as dependencies
from JS code, the order is unspecified.

Move OOUI 'widgets' styles back into the 'oojs-ui-widgets' module
(partially reverting fc65ff17d9f132aa332c99f7da44b92f6a372826) to
avoid the problem.

When 'oojs-ui-widgets.styles' is loaded on a page that also includes
'oojs-ui-widgets' (e.g. Special:Preferences), unfortunately the styles
will be loaded twice. I don't see a way to avoid this problem.

Bug: T195544
Change-Id: Ia07189f96b423b218ecbc52acffdedca517d2b01
resources/Resources.php