From d1ffdc2b95926526e3377206498c18c022d9e26c Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Mon, 27 Jun 2022 12:11:31 +0200 Subject: [PATCH] Remove $wgTemplateDataSuggestedValues feature flag Feature is always enabled now. Bug: T307188 Bug: T310684 Change-Id: Ic99c594ceec0020a6c9d20f0a4f10285b74ea9a8 --- extension.json | 8 +------- includes/Hooks.php | 14 -------------- .../Dialog.js | 1 - 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/extension.json b/extension.json index fb91e4c5..8b99289c 100644 --- a/extension.json +++ b/extension.json @@ -29,8 +29,7 @@ "MultiContentSave": "MediaWiki\\Extension\\TemplateData\\Hooks::onMultiContentSave", "ResourceLoaderRegisterModules": "MediaWiki\\Extension\\TemplateData\\Hooks::onResourceLoaderRegisterModules", "EditPage::showEditForm:initial": "MediaWiki\\Extension\\TemplateData\\Hooks::onEditPage", - "ParserFetchTemplateData": "MediaWiki\\Extension\\TemplateData\\Hooks::onParserFetchTemplateData", - "MakeGlobalVariablesScript": "MediaWiki\\Extension\\TemplateData\\Hooks::onMakeGlobalVariablesScript" + "ParserFetchTemplateData": "MediaWiki\\Extension\\TemplateData\\Hooks::onParserFetchTemplateData" }, "MessagesDirs": { "TemplateData": [ @@ -237,11 +236,6 @@ "config": { "TemplateDataUseGUI": { "value": true - }, - "TemplateDataSuggestedValuesEditor": { - "description": "Temporary feature flag to enable the \"suggested values\" UI", - "value": false, - "public": true } }, "manifest_version": 2 diff --git a/includes/Hooks.php b/includes/Hooks.php index 02f1d26a..2ca2a0cf 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -172,20 +172,6 @@ class Hooks { } } - /** - * Include config when appropriate. - * - * @param array &$vars - * @param OutputPage $output - * @see https://www.mediawiki.org/wiki/Manual:Hooks/MakeGlobalVariablesScript - */ - public static function onMakeGlobalVariablesScript( array &$vars, OutputPage $output ) { - if ( $output->getTitle()->inNamespace( NS_TEMPLATE ) ) { - $vars['wgTemplateDataSuggestedValuesEditor'] = - $output->getConfig()->get( 'TemplateDataSuggestedValuesEditor' ); - } - } - /** * Parser hook for . * If there is any JSON provided, render the template documentation on the page. diff --git a/modules/ext.templateDataGenerator.editTemplatePage/Dialog.js b/modules/ext.templateDataGenerator.editTemplatePage/Dialog.js index d249d175..918a17c3 100644 --- a/modules/ext.templateDataGenerator.editTemplatePage/Dialog.js +++ b/modules/ext.templateDataGenerator.editTemplatePage/Dialog.js @@ -955,7 +955,6 @@ Dialog.prototype.toggleSuggestedValues = function ( type ) { // Don't show the suggested values field when the feature flag is // disabled, or for inapplicable types. this.propFieldLayout.suggestedvalues.toggle( - mw.config.get( 'wgTemplateDataSuggestedValuesEditor' ) && suggestedValuesAllowedTypes.indexOf( type ) !== -1 ); };