mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Merge "Create feature flag for VectorTitleAboveTabs feature"
This commit is contained in:
commit
ef42ef7e66
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
];
|
||||
|
|
|
@ -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 )
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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": [
|
||||
|
|
Loading…
Reference in a new issue