Page MenuHomePhabricator

ResourceLoaderImageModule always gets loaded in head
Closed, InvalidPublic

Description

Despite skins.minervas.icons.images and ext.gather.menu.icon both specifying 'position' => 'bottom' in RL definition it seems to be ignored and these get loaded in the head.

Event Timeline

Jdlrobson created this task.May 6 2015, 7:55 PM
Jdlrobson assigned this task to Gilles.
Jdlrobson raised the priority of this task from to Normal.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: bmansurov, Jdlrobson, gerritbot and 3 others.
matmarex renamed this task from ResourceLoaderImage module always gets loaded in head to ResourceLoaderImageModule always gets loaded in head.May 6 2015, 7:57 PM
matmarex set Security to None.
matmarex added a subscriber: matmarex.
Jdlrobson removed Gilles as the assignee of this task.May 6 2015, 8:52 PM
matmarex closed this task as Invalid.May 6 2015, 10:09 PM
matmarex claimed this task.

This is the expected behavior, because you load these modules with addModuleStyles. If you loaded them with addModules, they would be at the bottom (and they'd only load on browsers with JavaScript enabled). @Gilles is apparently doing some work to make this not so (T97410?), but I wasn't following it.

(ResourceLoaderImageModule, in fact, ignores the 'position' option entirely and always uses 'bottom'.)

Gilles added a comment.May 7 2015, 8:48 AM

Indeed, this is what I'm trying to fix in T97410

Hmm.. Why am I seeing this module load in a style tag in the top of the page? Am I missing a commit in core?

Hmm.. Why am I seeing this module load in a link tag in the top of the page? Am I missing a commit in core?

Just saw your comment.. Doesn't add modules force them to load via JavaScript though?

Yes, it does. It is a pretty major shortcoming of ResourceLoader.

Mm.. Of course we can't inline styles at bottom and ensure cache validation can we... :-/