[MediaWiki-commits] [Gerrit] Fix FOUC: Make graph styles load ahead of HTML - change (mediawiki...Graph)

2015-12-07 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix FOUC: Make graph styles load ahead of HTML
..


Fix FOUC: Make graph styles load ahead of HTML

Thanks @maxsem

Change-Id: I13579697d7672f001d7f02b4e5e599955b34f47e
---
M Graph.body.php
M extension.json
2 files changed, 13 insertions(+), 18 deletions(-)

Approvals:
  TheDJ: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Graph.body.php b/Graph.body.php
index 8964b4c..0de41a7 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -73,6 +73,7 @@
$output->addJsConfigVars( 
'wgGraphUrlBlacklist', $wgGraphUrlBlacklist );
$output->addJsConfigVars( 'wgGraphIsTrusted', 
$wgGraphIsTrusted );
 
+   $output->addModuleStyles( 'ext.graph' );
$vegaVer = $output->getExtensionData( 
'graph_vega2' ) ? 2 : 1;
if ( $liveSpecs ) {
$output->addModules( 'ext.graph.vega' . 
$vegaVer );
diff --git a/extension.json b/extension.json
index cdd01a4..867e410 100644
--- a/extension.json
+++ b/extension.json
@@ -24,31 +24,25 @@
"graph": "Graph\\ApiGraph"
},
"ResourceModules": {
-   "ext.graph.loader": {
-   "scripts": [
-   "modules/graph-loader.js"
-   ],
+   "ext.graph": {
"styles": [
- "styles/common.less"
-   ],
-   "messages": [
-   "graph-loading",
-   "graph-loading-done"
-   ],
-   "dependencies": [
-   "mediawiki.Uri"
+   "styles/common.less"
],
"targets": [
"mobile",
"desktop"
]
},
-   "ext.graph": {
-   "styles": [
-   "styles/common.less"
+   "ext.graph.loader": {
+   "scripts": [
+   "modules/graph-loader.js"
+   ],
+   "messages": [
+   "graph-loading",
+   "graph-loading-done"
],
"dependencies": [
-   "mediawiki.Uri"
+   "mediawiki.api"
],
"targets": [
"mobile",
@@ -63,7 +57,7 @@
"modules/graph1.js"
],
"dependencies": [
-   "ext.graph"
+   "mediawiki.Uri"
],
"targets": [
"mobile",
@@ -78,7 +72,7 @@
"modules/graph2.js"
],
"dependencies": [
-   "ext.graph"
+   "mediawiki.Uri"
],
"targets": [
"mobile",

-- 
To view, visit https://gerrit.wikimedia.org/r/257201
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I13579697d7672f001d7f02b4e5e599955b34f47e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: JGirault 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix FOUC: Make graph styles load ahead of HTML - change (mediawiki...Graph)

2015-12-06 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/257201

Change subject: Fix FOUC: Make graph styles load ahead of HTML
..

Fix FOUC: Make graph styles load ahead of HTML

Thanks @maxsem

Change-Id: I13579697d7672f001d7f02b4e5e599955b34f47e
---
M Graph.body.php
M extension.json
2 files changed, 10 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/01/257201/1

diff --git a/Graph.body.php b/Graph.body.php
index 8964b4c..0de41a7 100644
--- a/Graph.body.php
+++ b/Graph.body.php
@@ -73,6 +73,7 @@
$output->addJsConfigVars( 
'wgGraphUrlBlacklist', $wgGraphUrlBlacklist );
$output->addJsConfigVars( 'wgGraphIsTrusted', 
$wgGraphIsTrusted );
 
+   $output->addModuleStyles( 'ext.graph' );
$vegaVer = $output->getExtensionData( 
'graph_vega2' ) ? 2 : 1;
if ( $liveSpecs ) {
$output->addModules( 'ext.graph.vega' . 
$vegaVer );
diff --git a/extension.json b/extension.json
index cdd01a4..3682d35 100644
--- a/extension.json
+++ b/extension.json
@@ -24,28 +24,22 @@
"graph": "Graph\\ApiGraph"
},
"ResourceModules": {
-   "ext.graph.loader": {
-   "scripts": [
-   "modules/graph-loader.js"
-   ],
+   "ext.graph": {
"styles": [
- "styles/common.less"
-   ],
-   "messages": [
-   "graph-loading",
-   "graph-loading-done"
-   ],
-   "dependencies": [
-   "mediawiki.Uri"
+   "styles/common.less"
],
"targets": [
"mobile",
"desktop"
]
},
-   "ext.graph": {
-   "styles": [
-   "styles/common.less"
+   "ext.graph.loader": {
+   "scripts": [
+   "modules/graph-loader.js"
+   ],
+   "messages": [
+   "graph-loading",
+   "graph-loading-done"
],
"dependencies": [
"mediawiki.Uri"

-- 
To view, visit https://gerrit.wikimedia.org/r/257201
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13579697d7672f001d7f02b4e5e599955b34f47e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Graph
Gerrit-Branch: master
Gerrit-Owner: Yurik 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits