From fa77ef25bd687bf6ae5c809f626ef9caa766bd18 Mon Sep 17 00:00:00 2001 From: thiemowmde Date: Tue, 12 Mar 2024 16:03:23 +0100 Subject: [PATCH] Remove broken CSS for ve.ui.MWReferenceGroupInputWidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CSS exists since I2ab47e7 from August 2014. The original idea was to dim the default "General references" when you edit a or list in VisualEditor. Steps to reproduce: * Start VisualEditor. * Edit a or list. * Edit the group. * You will see the dimmed text "General references". This is not the CSS in this patch, but the default styling for OOUI placeholders. * Open the dropdown. The list will show a "General references" item. It's not dimmed. This is where the CSS was meant to be. The CSS class name in the OOUI mixin was actually changed from "oo-ui-flaggableElement-…" to "oo-ui-flaggedElement-…" via I1abecd8, just a few days later. In addition the selector wouldn't work anyway for other reasons. The dropdown is not inside the `.ve-ui-mwReferenceGroupInputWidget` container any more but placed outside by the OOUI window manager. And the selector's specifity is to low, at least since Ic57b3ff. I argue it's not worth fixing it. Nobody missed it for 10 years. Light gray text would be illegible anyway on the light gray/light blue backgrounds used in the dropdown menu. Let's consider it dead code and just remove it. The class name doesn't appear anywhere else (any more): https://codesearch.wmcloud.org/search/?q=flaggableElement Change-Id: Ia802303737ba35cd4b14fae924b7227472f905fd --- extension.json | 1 - modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js | 3 +-- modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.less | 10 ---------- 3 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.less diff --git a/extension.json b/extension.json index bec54db72..fbbe71f55 100644 --- a/extension.json +++ b/extension.json @@ -116,7 +116,6 @@ "styles": [ "ve.ui.MWReferenceDialog.less", "ve.ui.MWReferenceContextItem.less", - "ve.ui.MWReferenceGroupInputWidget.less", "ve.ui.MWReferenceResultWidget.less", "ve.ui.MWReferenceSearchWidget.less", "ve.ui.MWCitationDialogTool.less" diff --git a/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js b/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js index 201d67ba8..33adebbf5 100644 --- a/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js +++ b/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.js @@ -43,8 +43,7 @@ OO.inheritClass( ve.ui.MWReferenceGroupInputWidget, OO.ui.ComboBoxInputWidget ); ve.ui.MWReferenceGroupInputWidget.prototype.populateMenu = function ( internalList ) { const items = [ new OO.ui.MenuOptionWidget( { data: '', - label: this.emptyGroupName, - flags: 'emptyGroupPlaceholder' + label: this.emptyGroupName } ) ]; for ( const groupName in internalList.getNodeGroups() ) { const match = groupName.match( /^mwReference\/(.+)/ ); diff --git a/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.less b/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.less deleted file mode 100644 index 227f7f012..000000000 --- a/modules/ve-cite/ve.ui.MWReferenceGroupInputWidget.less +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * VisualEditor MediaWiki UserInterface MWReferenceGroupInputWidget styles. - * - * @copyright 2011-2018 VisualEditor Team's Cite sub-team and others; see AUTHORS.txt - * @license MIT - */ - -.ve-ui-mwReferenceGroupInputWidget .oo-ui-flaggableElement-emptyGroupPlaceholder { - color: #72777d; -}