Esanders has uploaded a new change for review.

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

Change subject: Remove 'remove' button from comment inspector
......................................................................

Remove 'remove' button from comment inspector

The comment inspector is for a node, not an annotation, so
a remove button is not required (like the MW extension inspector).

You can already remove the using backspace/delete or by blanking
the text. We don't, for comparison, have a remove button on the
MW image dialog.

Change-Id: I8d9fedb7d77dbfc4b3f2d7419d881e2101462a86
---
M modules/ve/ui/inspectors/ve.ui.CommentInspector.js
1 file changed, 2 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/94/150194/1

diff --git a/modules/ve/ui/inspectors/ve.ui.CommentInspector.js 
b/modules/ve/ui/inspectors/ve.ui.CommentInspector.js
index 18a7430..c85cf7b 100644
--- a/modules/ve/ui/inspectors/ve.ui.CommentInspector.js
+++ b/modules/ve/ui/inspectors/ve.ui.CommentInspector.js
@@ -49,12 +49,6 @@
                label: OO.ui.deferMsg( 'visualeditor-commentinspector-insert' ),
                flags: [ 'constructive', 'primary' ],
                modes: 'insert'
-       },
-       {
-               action: 'remove',
-               label: OO.ui.deferMsg( 'visualeditor-inspector-remove-tooltip' 
),
-               flags: 'destructive',
-               modes: 'edit'
        }
 ];
 
@@ -81,7 +75,7 @@
  * @inheritdoc
  */
 ve.ui.CommentInspector.prototype.getActionProcess = function ( action ) {
-       if ( action === 'remove' || action === 'insert' ) {
+       if ( action === 'insert' ) {
                return new OO.ui.Process( function () {
                        this.close( { action: action } );
                }, this );
@@ -145,7 +139,7 @@
                                rawNewValue = this.whitespace[0] + newValue + 
this.whitespace[1];
 
                        if ( this.commentNode ) {
-                               if ( data.action === 'remove' || newValue === 
'' ) {
+                               if ( newValue === '' ) {
                                        // Remove comment node
                                        this.fragment = 
this.getFragment().clone( this.commentNode.getOuterRange() );
                                        this.fragment.removeContent();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d9fedb7d77dbfc4b3f2d7419d881e2101462a86
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <esand...@wikimedia.org>

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

Reply via email to