Merge "Create feature flag for VectorTitleAboveTabs feature"

This commit is contained in:
jenkins-bot 2022-05-11 19:53:11 +00:00 committed by Gerrit Code Review
commit ef42ef7e66
4 changed files with 48 additions and 0 deletions

View file

@ -264,6 +264,26 @@ final class Constants {
*/
public const WEB_AB_TEST_ARTICLE_ID_FACTORY_SERVICE = 'WikimediaEvents.WebABTestArticleIdFactory';
/**
* @var string
*/
public const REQUIREMENT_TITLE_ABOVE_TABS = 'TitleAboveTabs';
/**
* @var string
*/
public const CONFIG_TITLE_ABOVE_TABS = 'VectorTitleAboveTabs';
/**
* @var string
*/
public const QUERY_PARAM_TITLE_ABOVE_TABS = 'titleabovetabs';
/**
* @var string
*/
public const FEATURE_TITLE_ABOVE_TABS = 'TitleAboveTabs';
/**
* This class is for namespacing constants only. Forbid construction.
* @throws FatalError

View file

@ -217,6 +217,29 @@ return [
]
);
// Feature: Title above tabs
// ================================
$featureManager->registerRequirement(
new OverridableConfigRequirement(
$services->getMainConfig(),
$context->getUser(),
$context->getRequest(),
null,
Constants::CONFIG_TITLE_ABOVE_TABS,
Constants::REQUIREMENT_TITLE_ABOVE_TABS,
Constants::QUERY_PARAM_TITLE_ABOVE_TABS,
null
)
);
$featureManager->registerFeature(
Constants::FEATURE_TITLE_ABOVE_TABS,
[
Constants::REQUIREMENT_FULLY_INITIALISED,
Constants::REQUIREMENT_TITLE_ABOVE_TABS,
]
);
return $featureManager;
}
];

View file

@ -167,6 +167,7 @@ class SkinVector22 extends SkinVector {
Constants::FEATURE_STICKY_HEADER_EDIT
)
) : false,
'is-title-above-tabs' => $featureManager->isFeatureEnabled( Constants::FEATURE_TITLE_ABOVE_TABS )
];
}
}

View file

@ -511,6 +511,10 @@
"VectorTableOfContentsCollapseAtCount": {
"value": 20,
"description": "@var When `VectorTableOfContents` is enabled, the minimum number of headings required to collapse all headings in the sticky table of contents by default."
},
"VectorTitleAboveTabs": {
"value": false,
"description": "@var boolean `VectorTitleAboveTabs` places the tittle of the page above the tabs that link to history/talk etc."
}
},
"ServiceWiringFiles": [