From 77734b1597d3f256041606afc5329564d5286bc1 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Fri, 24 Feb 2023 13:48:29 +0000 Subject: [PATCH] Add feature flag to "promote add topic" feature Will be used to control rollout to WMF wikis but can default to true here. Bug: T267444 Change-Id: I716563efffc2401fbf5f8b53876a8b58706b1cda --- includes/SkinVector22.php | 3 ++- skin.json | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/SkinVector22.php b/includes/SkinVector22.php index 7aef6a1a3..334c52f27 100644 --- a/includes/SkinVector22.php +++ b/includes/SkinVector22.php @@ -331,7 +331,8 @@ class SkinVector22 extends SkinMustache { self::extractPageToolsFromSidebar( $sidebar, $pageToolsMenu ); } - $hasAddTopicButton = $this->removeAddTopicButton( $parentData ); + $hasAddTopicButton = $config->get( 'VectorPromoteAddTopic' ) && + $this->removeAddTopicButton( $parentData ); $langButtonClass = $langData['class'] ?? ''; $ulsLabels = $this->getULSLabels(); diff --git a/skin.json b/skin.json index f1a37f2a4..78b23d99c 100644 --- a/skin.json +++ b/skin.json @@ -598,6 +598,10 @@ }, "description": "An associative array of A/B test configs keyed by parameters noted in mediawiki.experiments.js. There must be an `unsampled` bucket that represents a population excluded from the experiment. Additionally, the treatment bucket(s) must include a case-insensitive `treatment` substring in their name (e.g. `treatment`, `stickyHeaderTreatment`, `sticky-header-treatment`)" }, + "VectorPromoteAddTopic": { + "value": true, + "description": "@var boolean Temporary feature flag that promotes the 'Add topic' link in the views menu, to a button in the page title bar." + }, "VectorDisableSidebarPersistence": { "value": false, "description": "@var boolean Temporary feature flag that disables saving the sidebar expanded/collapsed state as a user-preference (triggered via clicking the main menu icon). This is intended as a temporary kill-switch in the event that the DB is overloaded with writes to the user_options table."