Commit graph

8 commits

Author SHA1 Message Date
Jdlrobson
13b72d0f7e "Enable 'site' and 'site.styles' modules on mobile target (take 2)
Will be used by MobileFrontend in I26644f49dff5.

Bug: T237050
Bug: T127268
Change-Id: I5166797d9b02346eda09ea86ad4056e466a891d3
2020-03-11 21:54:52 +00:00
Jdlrobson
7dc898a93b Revert "Enable 'site' and 'site.styles' modules on mobile target"
This reverts commit 34db191681. The dependencies are the wrong way round and I26644f49dff57249ebd7eb20818add8a7110de6b
should have been merged first. Right now mobile.site AND site are loading on mobile leading to a huge spike in CSS and JS (https://grafana.wikimedia.org/d/000000205/mobile-2g?orgId=1&fullscreen&panelId=69)

Change-Id: I034429932966ab844b7dae94a97c2bcc24952cb6
2020-01-13 23:12:27 +00:00
jdlrobson
34db191681 Enable 'site' and 'site.styles' modules on mobile target
Will be used by MobileFrontend in I26644f49dff5.

Bug: T237050
Bug: T127268
Depends-On: I329415b787136fcf9422a9deebfcd34f83b40f12
Change-Id: I7fd9abb672d80df273ffa067fa9d5c04230687ca
2020-01-11 00:18:38 +00:00
jdlrobson
5b044bb928 resourceloader: Introduce hooks in ResourceLoaderSiteModule
This will allow extensions/skins to alter the wiki pages that editors
can use to control styles

Bug: T237050
Change-Id: I329415b787136fcf9422a9deebfcd34f83b40f12
2020-01-06 22:52:27 +00:00
Timo Tijhof
a5ce1d7792 resourceloader: Add Doxygen group and improve overall docs
* Add license header where missing.
* Add missing `@since` (1.17 for most classes), except
  ResourceLoaderLessVarFileModule since 1.32 (1bc62c548c).

* Remove duplicate file-level description for class-only files,
  merge with the class description instead.

* Remove my own `@author` annotation from one file.

* Mark core's own FileModule subclasses as `@internal`, except
  for the following which we support use of in extensions:
  ResourceLoaderLessVarFileModule,
  ResourceLoaderOOUIIconPackModule, and
  ResourceLoaderWikiModule.

Change-Id: I336af2e4ccdbe2512594e8861b72628d24194e41
2019-09-14 18:37:36 +00:00
Timo Tijhof
471adc7ef9 resourceloader: Make 'site.styles' actually in group 'site'
Before 93ed259cf and 7bb7315d4, 'site' and 'site.styles' module were one module
loaded in two parts. One part via the general queue (not in a separate request),
and the other part in the stylesheet queue (in a separate request).

This was achieved by hacking the stylesheet queue handler to hardcode the group
to be 'site' for a module named 'site' (later 'site.styles' in c20a76ee)
eventhough the module as a whole was not actually in that group.

Now that these modules are separated, this hack is no longer needed
and the module can be registered as being in group 'site' properly.

Change-Id: If193f556be211749b115f3808ee46536b578fb22
2016-08-25 13:39:01 -07:00
Timo Tijhof
a464d1d41d resourceloader: Track state of page-style modules
This allows dynamically loaded modules to depend on page-style modules
without it causing the page-style module to be loaded a second time.

* New method Module::getType() indicates whether a module is
  a page-style module or supposed to be dynamically loaded.

* Emit warning from addModuleStyles() when given a module that is
  not a page-style module (to be enforced later)

Bug: T92459
Bug: T87871
Change-Id: I8b6c6a10d965e73965f877c42e995d04202524f3
2016-07-14 20:28:40 +01:00
Timo Tijhof
93ed259cf3 resourceloader: Create 'site.styles' module
First step in migration for 'site' module per T92459.

Bug: T92459
Change-Id: Ic137cb494ba238facba4033f9c68a35e64f4916c
2016-06-15 23:06:50 -07:00