Page MenuHomePhabricator

Style of the gadget has been loaded double.
Closed, ResolvedPublic

Description

I was confirmed in the gadget of the English Wikipedia.
The name of the gadget is OldDiff.
Browser is Chrome.

Procedure is as follows.

  • Open the tab "gadgets" of personal settings, check the item of "Display diffs with the old yellow / green colors and design.", Then save it.
  • To display the screen of any difference.
  • Open the developer tools, to check the status of the style applied.
  • Select the style elements of the gadget has been applied. Make sure that the style of the gadget has been applied twice by the script and CSS.

After that, I was also confirmed in the Japanese version.


Version: unspecified
Severity: minor

Details

Reference
bz36302
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Add two more flavors, g4.cores4.ram16.disk20 and g4.cores4.ram32.disk20repos/cloud/cloud-vps/tofu-infra!151andrewmoreflavorsmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:27 AM
bzimport set Reference to bz36302.
bzimport added a subscriber: Unknown Object (MLST).

This is not a ResourceLoader bug but a bug in the Gadgets extension. It does this on purpose, although you are correct that it should not be needed.

This line is where it adds it twice, once the styles (on top) and once as a regular module:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Gadgets.git;a=blob;f=Gadgets_body.php;h=4869d8c25e4728e25c6cf0b1c87bc951dddce05a;hb=HEAD#l149

It does that because gadgets are always in the <body> load queue, so styles intended for elements of the core mediawiki skin should be loaded in the <head> so that there is no flash.

In Gadgets 2.0 this has been fixed:

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Gadgets.git;a=blob;f=Gadgets.hooks.php;h=8d899dc48d730dca334c8a702936f20db349d315;hb=RL2#l359

And in Gadgets 2.0 there is a new definition property to choose which queue the module should be loaded from.