Trevor Parscal has uploaded a new change for review.

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


Change subject: Remove feedback tool and alpha notice (Don't merge until "beta")
......................................................................

Remove feedback tool and alpha notice (Don't merge until "beta")

Objectives:

* Get rid of the feedback link on the toolbar
* Stop showing a warning that this is alpha software

Changes:

ve.init.mw.ViewPageTarget.js
* Remove feedback tool element and events

VisualEditor.i18n.php
* Remove feedback and alpha warning messages

VisualEditor.php
* Don't include visualeditor-alphawarning in the edit notices
* Remove mediawiki.feedback module from dependencies
* Remove feedback tool message

VisualEditorMessagesModule.php
* Remove feedback link message
* Whitespace cleanup (line too long)

Change-Id: Ie289c39b963072e8a20aa29926dee1d199b6e4e8
---
M VisualEditor.i18n.php
M VisualEditor.php
M VisualEditorMessagesModule.php
M modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
4 files changed, 5 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/70/65770/1

diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index b0211fc..efe133c 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -48,7 +48,6 @@
        'visualeditor-savedialog-label-save' => 'Save page',
        'visualeditor-savedialog-label-restore' => 'Restore page',
        'visualeditor-editnotices-tool' => '$1 {{PLURAL:$1|notice|notices}}',
-       'visualeditor-feedback-tool' => 'Leave feedback',
        'visualeditor-window-title' => 'Inspect',
        'visualeditor-linkinspector-title' => 'Hyperlink',
        'visualeditor-linkinspector-suggest-matching-page' => 'Matching page',
@@ -100,7 +99,6 @@
        'visualeditor-problem' => 'Describe what went wrong',
        'visualeditor-aliennode-tooltip' => 'Sorry, this element cannot be 
edited using the VisualEditor',
        'visualeditor-descriptionpagelink' => 'Project:VisualEditor',
-       'visualeditor-alphawarning' => 'You are using an alpha version of the 
[[{{MediaWiki:Visualeditor-descriptionpagelink}}|VisualEditor]]. It may be slow 
and make erroneous changes—please check each edit that you make.',
        'visualeditor-report-notice' => 'I understand that by clicking "Report 
problem" I will transmit my changes and my feedback, which will be stored for 
analysis. I agree to provide feedback in accordance with the 
[[{{MediaWiki:Visualeditor-report-link}}|Terms of Use]].',
        'visualeditor-report-link' => 'foundation:Terms of Use',
        'visualeditor-feedback-link' => 'Project:VisualEditor/Feedback',
diff --git a/VisualEditor.php b/VisualEditor.php
index 8e931d3..785d3f9 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -59,7 +59,7 @@
        'group' => 'ext.visualEditor',
 );
 
-$wgVisualEditorEditNotices = array( 'visualeditor-alphawarning' );
+$wgVisualEditorEditNotices = array();
 
 $wgVisualEditorEnableSectionEditLinks = false;
 
@@ -135,7 +135,6 @@
                        'mediawiki.user',
                        'mediawiki.util',
                        'mediawiki.notify',
-                       'mediawiki.feedback',
                        'user.options',
                        'user.tokens',
                ),
@@ -161,7 +160,6 @@
                        'visualeditor-editsummary',
                        'visualeditor-problem',
                        'visualeditor-editnotices-tool',
-                       'visualeditor-feedback-tool',
                        'visualeditor-restore-page',
                        'visualeditor-create-page',
                        'visualeditor-save-title',
diff --git a/VisualEditorMessagesModule.php b/VisualEditorMessagesModule.php
index 6821be6..de24a19 100644
--- a/VisualEditorMessagesModule.php
+++ b/VisualEditorMessagesModule.php
@@ -50,7 +50,7 @@
 
                // Override message value
                $msgVals = array(
-                       'visualeditor-feedback-link' => wfMessage( 
'visualeditor-feedback-link' )->inContentLanguage()->text(),
+                       /* 'message key' => 'message value' */
                );
 
                // Copyright warning (based on EditPage::getCopyrightWarning)
@@ -74,7 +74,9 @@
                // Normalise to 'copyrightwarning' so we have a consistent key 
in the front-end.
                $msgArgs[ 'copyrightwarning' ] = $copywarnMsg;
 
-               $msgKeys = array_values( array_unique( array_merge( $msgKeys, 
array_keys( $msgArgs ), array_keys( $msgVals ) ) ) );
+               $msgKeys = array_values(
+                       array_unique( array_merge( $msgKeys, array_keys( 
$msgArgs ), array_keys( $msgVals ) ) )
+               );
 
                return array(
                        'keys' => $msgKeys,
diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js 
b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
index dc259fe..883ad6b 100644
--- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
+++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js
@@ -39,9 +39,6 @@
        this.$toolbarEditNoticesTool = $( '<div>' ).addClass(
                've-init-mw-viewPageTarget-tool'
        );
-       this.$toolbarFeedbackTool = $( '<div>' ).addClass(
-               've-init-mw-viewPageTarget-tool'
-       );
        this.$saveDialog = $( '<div>' ).addClass( 
've-init-mw-viewPageTarget-saveDialog' );
        this.onBeforeUnloadFallback = null;
        this.onBeforeUnloadHandler = null;
@@ -589,25 +586,6 @@
 };
 
 /**
- * Handle clicks on the feedback tool in the toolbar.
- *
- * @method
- * @param {jQuery.Event} e Mouse click event
- */
-ve.init.mw.ViewPageTarget.prototype.onToolbarFeedbackToolClick = function () {
-       this.$toolbarEditNotices.fadeOut( 'fast' );
-       if ( !this.feedback ) {
-               // This can't be constructed until the editor has loaded as it 
uses special messages
-               this.feedback = new mw.Feedback( {
-                       'title': new mw.Title( ve.msg( 
'visualeditor-feedback-link' ) ),
-                       'bugsLink': new mw.Uri( 
'https://bugzilla.wikimedia.org/enter_bug.cgi?product=VisualEditor&component=General'
 ),
-                       'bugsListLink': new mw.Uri( 
'https://bugzilla.wikimedia.org/buglist.cgi?query_format=advanced&resolution=---&resolution=LATER&resolution=DUPLICATE&product=VisualEditor&list_id=166234'
 )
-               } );
-       }
-       this.feedback.launch();
-};
-
-/**
  * Handle the first transaction in the surface model.
  *
  * This handler is removed the first time it's used, but added each time the 
surface is set up.
@@ -965,14 +943,6 @@
                        .click( ve.bind( this.onToolbarEditNoticesToolClick, 
this ) );
                this.$toolbarEditNotices.fadeIn( 'fast' );
        }
-       this.$toolbarFeedbackTool
-               .addClass( 've-ui-icon-comment' )
-               .append(
-                       $( '<span>' )
-                               .addClass( 
've-init-mw-viewPageTarget-tool-label' )
-                               .text( ve.msg( 'visualeditor-feedback-tool' ) )
-               )
-               .click( ve.bind( this.onToolbarFeedbackToolClick, this ) );
 };
 
 /**
@@ -984,7 +954,6 @@
        this.toolbarCancelButton.disconnect( this );
        this.toolbarSaveButton.disconnect( this );
        this.$toolbarEditNoticesTool.empty().off( 'click' );
-       this.$toolbarFeedbackTool.empty().off( 'click' );
 };
 
 /**
@@ -994,7 +963,6 @@
  */
 ve.init.mw.ViewPageTarget.prototype.attachToolbarButtons = function () {
        var $target = this.toolbar.$actions;
-       $target.append( this.$toolbarFeedbackTool );
        if ( !ve.isEmptyObject( this.editNotices ) ) {
                $target.append( this.$toolbarEditNoticesTool );
        }
@@ -1010,7 +978,6 @@
        this.toolbarCancelButton.$.detach();
        this.toolbarSaveButton.$.detach();
        this.$toolbarEditNoticesTool.detach();
-       this.$toolbarFeedbackTool.detach();
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie289c39b963072e8a20aa29926dee1d199b6e4e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal <tpars...@wikimedia.org>

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

Reply via email to