From 1ca92611510bf6948cd9c6c0a974f3c6e89137ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 18 Apr 2023 22:28:51 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20the=20"Report=20incorrect=E2=80=A6"=20?= =?UTF-8?q?button=20on=20visual=20diffs=20in=20save=20dialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: T282268 Change-Id: Ia6e0978fb43a7ffccaa8245728c86bc3a433a2c1 --- extension.json | 1 - i18n/ve-mw/en.json | 1 - i18n/ve-mw/qqq.json | 1 - .../ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js | 26 ------------------- .../dialogs/ve.ui.MWMobileSaveDialog.css | 6 ----- .../ui/styles/dialogs/ve.ui.MWSaveDialog.css | 4 --- 6 files changed, 39 deletions(-) diff --git a/extension.json b/extension.json index 1b61635b2f..8f90956a29 100644 --- a/extension.json +++ b/extension.json @@ -729,7 +729,6 @@ "visualeditor-savedialog-label-review-good", "visualeditor-savedialog-label-save-short", "visualeditor-savedialog-label-save-short-start", - "visualeditor-savedialog-label-visual-diff-report", "visualeditor-savedialog-review-nosummary", "visualeditor-savedialog-review-visual", "visualeditor-savedialog-review-wikitext", diff --git a/i18n/ve-mw/en.json b/i18n/ve-mw/en.json index f2f06398e3..98a959a802 100644 --- a/i18n/ve-mw/en.json +++ b/i18n/ve-mw/en.json @@ -357,7 +357,6 @@ "visualeditor-savedialog-label-review-good": "Return to save form", "visualeditor-savedialog-label-save-short": "Save", "visualeditor-savedialog-label-save-short-start": "Save…", - "visualeditor-savedialog-label-visual-diff-report": "Report incorrect display for this change", "visualeditor-savedialog-review-nosummary": "No edit summary", "visualeditor-savedialog-review-visual": "Visual", "visualeditor-savedialog-review-wikitext": "Wikitext", diff --git a/i18n/ve-mw/qqq.json b/i18n/ve-mw/qqq.json index 510a387c1d..1211ebb111 100644 --- a/i18n/ve-mw/qqq.json +++ b/i18n/ve-mw/qqq.json @@ -378,7 +378,6 @@ "visualeditor-savedialog-label-review-good": "Label for button to go back to a page in order to save form", "visualeditor-savedialog-label-save-short": "Short label text for save button on private wikis for use on width-restricted devices like mobile phones. This should be as short as possible.\n{{Identical|Save}}", "visualeditor-savedialog-label-save-short-start": "Short label text for button to start save process. Usually just {{msg-mw|visualeditor-savedialog-label-save-short}} with an ellipsis (…).\n{{Identical|Save}}", - "visualeditor-savedialog-label-visual-diff-report": "Label for button to report a problem with the visual diff", "visualeditor-savedialog-review-nosummary": "Message shown when no edit summary was provided.", "visualeditor-savedialog-review-visual": "Label for button to select visual diff mode.", "visualeditor-savedialog-review-wikitext": "Label for button to select wikitext diff mode.\n{{Identical|Wikitext}}", diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js index 4756e33891..0259620b16 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js @@ -50,8 +50,6 @@ ve.ui.MWSaveDialog.static.name = 'mwSave'; ve.ui.MWSaveDialog.static.title = OO.ui.deferMsg( 'visualeditor-savedialog-title-save' ); -ve.ui.MWSaveDialog.static.feedbackUrl = 'https://www.mediawiki.org/wiki/Talk:VisualEditor/Diffs'; - ve.ui.MWSaveDialog.static.actions = [ { action: 'save', @@ -85,16 +83,6 @@ ve.ui.MWSaveDialog.static.actions = [ label: OO.ui.deferMsg( 'visualeditor-savedialog-label-resolve-conflict' ), flags: [ 'primary', 'progressive' ], modes: 'conflict' - }, - { - action: 'report', - label: OO.ui.deferMsg( 'visualeditor-savedialog-label-visual-diff-report' ), - flags: [ 'progressive' ], - modes: 'review', - framed: false, - icon: 'feedback', - classes: [ 've-ui-mwSaveDialog-visualDiffFeedback' ], - href: ve.ui.MWSaveDialog.static.feedbackUrl } ]; @@ -714,15 +702,9 @@ ve.ui.MWSaveDialog.prototype.updateReviewMode = function () { // * visualeditor-diffmode-source ve.userConfig( 'visualeditor-diffmode-' + surfaceMode, diffMode ); - // Hack: cache report action so it is getable even when hidden (see T174497) - if ( !this.report ) { - this.report = this.getActions().get( { actions: 'report' } )[ 0 ]; - } - this.$reviewVisualDiff.toggleClass( 'oo-ui-element-hidden', !isVisual ); this.$reviewWikitextDiff.toggleClass( 'oo-ui-element-hidden', isVisual ); if ( isVisual ) { - this.report.toggle( true ); if ( !this.diffElement ) { if ( !this.diffElementPromise ) { this.diffElementPromise = this.getDiffElementPromise().then( function ( diffElement ) { @@ -734,8 +716,6 @@ ve.ui.MWSaveDialog.prototype.updateReviewMode = function () { return; } this.positionDiffElement(); - } else { - this.report.toggle( false ); } // Support: iOS @@ -890,7 +870,6 @@ ve.ui.MWSaveDialog.prototype.getTeardownProcess = function ( data ) { return ve.ui.MWSaveDialog.super.prototype.getTeardownProcess.call( this, data ) .next( function () { this.emit( 'close' ); - this.report = null; }, this ); }; @@ -918,11 +897,6 @@ ve.ui.MWSaveDialog.prototype.getActionProcess = function ( action ) { this.swapPanel( 'save' ); }, this ); } - if ( action === 'report' ) { - return new OO.ui.Process( function () { - window.open( this.constructor.static.feedbackUrl ); - }, this ); - } return ve.ui.MWSaveDialog.super.prototype.getActionProcess.call( this, action ); }; diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMobileSaveDialog.css b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMobileSaveDialog.css index d5de947515..de5a3da527 100644 --- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMobileSaveDialog.css +++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWMobileSaveDialog.css @@ -9,9 +9,3 @@ .ve-ui-mwMobileSaveDialog .content { margin: 0; } - -.ve-ui-mwSaveDialog-visualDiffFeedback { - max-width: 50%; - overflow: hidden; - text-overflow: ellipsis; -} diff --git a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css index e2a48167d0..0ba20f3b0a 100644 --- a/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css +++ b/modules/ve-mw/ui/styles/dialogs/ve.ui.MWSaveDialog.css @@ -110,10 +110,6 @@ font-style: italic; } -.ve-ui-mwSaveDialog-visualDiffFeedback { - float: right; -} - .ve-ui-mwSaveDialog-preview .mw-body { /* We use mw-body for realistic padding, but we don't need border/margin */ border: 0;