Open main menu

Topic on Talk:ResourceLoader/Architecture

Mattflaschen (talkcontribs)

I removed the {{fixme}} in the styles section. Based on my testing locally and in prod (English Wikipedia), the docs mentioned are entirely correct. Even in production, in debug mode the CSS is loaded directly from the original static file(s). I also tested with uselang=he, and CSSJanus is not applied (there's no derivative file for debug mode that has been flipped).

This post was posted by Mattflaschen, but signed as Superm401.

Matma Rex (talkcontribs)
Mattflaschen (talkcontribs)

Good point. It turns out some CSS is loaded through ResourceLoader, and some is not. Your example demonstrates that, and I can also confirm that e.g. the GuidedTour CSS is not processed in debug mode even with uselang=he.

I'll update the fixme accordingly.

This post was posted by Mattflaschen, but signed as Superm401.

Krinkle (talkcontribs)

The distinction is that styles loaded by file modules from mw.loader trigger separate load.php requests that load each stylesheet from the direct file reference (not through load.php) which means that (as documented) no minification, embedding or flipping applies.

However there is one exception, and that is the Skin stylesheet. That stylesheet isn't loaded from mw.loader but from a hardcoded <link>-tag, which (obviously) has no javascript execution and as such goes through load.php and gets all the flipping applied.

Matma Rex (talkcontribs)

Is this expected behaviour? It seems pretty counterintuitive to me.

Krinkle (talkcontribs)

It is an unintended side-effect. It is known by design, but not really something we like.

This way simplifies the code a lot, but feel free to file a bug. It is certainly not desired behavior, but it was tolerable at the time (we were aware of it while implementing it).

The code has changed a lot since, maybe it is easier to fix now.

This post was hidden by 42.104.208.101 (history)
Reply to "Removed fixme"