jenkins-bot has submitted this change and it was merged.
Change subject: Separate experimental features out into a new module
......................................................................
Separate experimental features out into a new module
Currently some issues, probably with loading nodes
after factories.
Toggled by global $wgVisualEditorEnableExperimentalCode.
Change-Id: Idab3dd68572c037289c6742d03fd327285110f67
---
M VisualEditor.hooks.php
M VisualEditor.php
M modules/ve/init/mw/ve.init.mw.Target.js
3 files changed, 22 insertions(+), 6 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 7835332..9f4e2f8 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -60,13 +60,14 @@
*/
public static function onMakeGlobalVariablesScript( array &$vars,
OutputPage $out ) {
global $wgVisualEditorEnableSectionEditLinks,
$wgVisualEditorParsoidProblemReportURL,
- $wgVisualEditorParsoidURL;
+ $wgVisualEditorParsoidURL,
$wgVisualEditorEnableExperimentalCode;
$vars['wgVisualEditor'] = array(
'isPageWatched' => $out->getUser()->isWatched(
$out->getTitle() ),
'enableSectionEditLinks' =>
$wgVisualEditorEnableSectionEditLinks,
'reportProblemURL' =>
$wgVisualEditorParsoidProblemReportURL !== null ?
$wgVisualEditorParsoidProblemReportURL :
"$wgVisualEditorParsoidURL/_bugs/",
+ 'enableExperimentalCode' =>
$wgVisualEditorEnableExperimentalCode,
);
return true;
@@ -122,6 +123,7 @@
),
'dependencies' => array(
'ext.visualEditor.core',
+ 'ext.visualEditor.experimental',
'ext.visualEditor.viewPageTarget',
),
'localBasePath' => dirname( __FILE__ ) .
'/modules/ve/test',
diff --git a/VisualEditor.php b/VisualEditor.php
index 628db44..a3f5a96 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -25,6 +25,8 @@
$wgVisualEditorNamespaces = array( NS_MAIN );
// Whether to use change tagging for VisualEditor edits
$wgVisualEditorUseChangeTagging = true;
+// Whether to enable incomplete experimental code
+$wgVisualEditorEnableExperimentalCode = false;
/* Setup */
@@ -276,9 +278,7 @@
've/dm/nodes/ve.dm.MWEntityNode.js',
've/dm/nodes/ve.dm.MWHeadingNode.js',
- 've/dm/nodes/ve.dm.MWImageNode.js',
've/dm/nodes/ve.dm.MWPreformattedNode.js',
- 've/dm/nodes/ve.dm.MWTemplateNode.js',
've/dm/annotations/ve.dm.LinkAnnotation.js',
've/dm/annotations/ve.dm.MWExternalLinkAnnotation.js',
@@ -327,9 +327,7 @@
've/ce/nodes/ve.ce.MWEntityNode.js',
've/ce/nodes/ve.ce.MWHeadingNode.js',
- 've/ce/nodes/ve.ce.MWImageNode.js',
've/ce/nodes/ve.ce.MWPreformattedNode.js',
- 've/ce/nodes/ve.ce.MWTemplateNode.js',
've/ce/annotations/ve.ce.LinkAnnotation.js',
've/ce/annotations/ve.ce.MWExternalLinkAnnotation.js',
@@ -481,6 +479,18 @@
'visualeditor-dialog-action-close',
),
),
+ 'ext.visualEditor.experimental' => $wgVisualEditorResourceTemplate +
array(
+ 'scripts' => array(
+ 've/dm/nodes/ve.dm.MWImageNode.js',
+ 've/dm/nodes/ve.dm.MWTemplateNode.js',
+
+ 've/ce/nodes/ve.ce.MWImageNode.js',
+ 've/ce/nodes/ve.ce.MWTemplateNode.js',
+ ),
+ 'dependencies' => array(
+ 'ext.visualEditor.core',
+ )
+ ),
'ext.visualEditor.icons-raster' => $wgVisualEditorResourceTemplate +
array(
'styles' => array(
've/ui/styles/ve.ui.Icons-raster.css',
diff --git a/modules/ve/init/mw/ve.init.mw.Target.js
b/modules/ve/init/mw/ve.init.mw.Target.js
index d3847c4..f4e7f93 100644
--- a/modules/ve/init/mw/ve.init.mw.Target.js
+++ b/modules/ve/init/mw/ve.init.mw.Target.js
@@ -30,7 +30,11 @@
this.apiUrl = mw.util.wikiScript( 'api' );
this.submitUrl = ( new mw.Uri( mw.util.wikiGetlink( this.pageName ) ) )
.extend( { 'action': 'submit' } );
- this.modules = ['ext.visualEditor.core',
'ext.visualEditor.specialMessages']
+ this.modules = [
+ mw.config.get( 'wgVisualEditor'
).enableExperimentalCode ?
+ 'ext.visualEditor.experimental' :
'ext.visualEditor.core',
+ 'ext.visualEditor.specialMessages'
+ ]
.concat(
window.devicePixelRatio > 1 ?
['ext.visualEditor.viewPageTarget.icons-vector',
'ext.visualEditor.icons-vector'] :
--
To view, visit https://gerrit.wikimedia.org/r/59429
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idab3dd68572c037289c6742d03fd327285110f67
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits