Page MenuHomePhabricator

Module user.groups styles should not be loaded on startup on all pages
Closed, ResolvedPublic

Description

https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&lang=en&modules=user.groups&only=styles&skin=minerva&target=mobile&user=Jdlrobson&version=20150219T160030Z&*
None of the CSS in this module needs to be loaded on startup

Rules:
.mw-textarea-protected,.mw-textarea-protected + .ui-resizable .ace_content
div.templateeditor-show,p.templateeditor-show
span.templateeditor-show,small.templateeditor-show
table.templateeditor-show
li.templateeditor-show
div.autoconfirmed-show,p.autoconfirmed-show
span.autoconfirmed-show,small.autoconfirmed-show
table.autoconfirmed-show
li.autoconfirmed-show

Event Timeline

Jdlrobson assigned this task to Gilles.
Jdlrobson raised the priority of this task from to Medium.
Jdlrobson updated the task description. (Show Details)

This should only happen for logged-in users. In which case it's quite likely that the css will apply to hidden content in headers, infoboxes and other visible interface elements shown for certain users. It'd be annoying to have that flash after the page loads.

Krinkle changed the task status from Open to Stalled.Jul 13 2015, 3:04 PM

Not related to ResourceLoader framework. Which and where modules are loaded is in OutputPage.

Making as Stalled. Per my previous comment, it may be undesirable to defer this module. It's hard to combine with other requests due to it depending on the current user group. The need to combine is is also very small because since the switch to HTTPS, our servers and users can now make full use of SPDY/HTTP2 which means combing two requests or having two requests alongside each other is effectively the same. So this gives us the best of both already.

Your right - this is only logged in users so probably not as big a concern as I first thought.

Krinkle claimed this task.

For wikis that have one or more user-group specific MediaWiki JS page (e.g. MediaWiki:Group-user.js or MediaWiki:Group-sysop.js) and if the user is in one of those groups, then this module will be loaded. That is intended functionality.

Is has been made asynchronous after T107399.
It was also merged into user to reduce request overhead as of rMW06ab9c0942f6: resourceloader: Merge 'user.groups' into 'user' module.