mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 17:10:19 +00:00
Create feature flag for Zebra#9 design update
- Create a feature flag that will enable/disable the upcoming zebra design - This feature flag will add a class on the `body` html element that will enable & disable the new design. - class names: -- enabled: vector-feature-vector-zebra-design-enabled -- disabled: vector-feature-vector-zebra-design-disabled Bug: T332448 Change-Id: I264f2a338130e95543c20b592addf954a119b56a
This commit is contained in:
parent
6ad3ad889e
commit
47b82f6034
|
@ -280,6 +280,21 @@ final class Constants {
|
|||
*/
|
||||
public const CONFIG_DEFAULT_LIMITED_WIDTH = 1;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const FEATURE_ZEBRA_DESIGN = 'ZebraDesign';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const REQUIREMENT_ZEBRA_DESIGN = 'ZebraDesign';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const CONFIG_ZEBRA_DESIGN = 'VectorZebraDesign';
|
||||
|
||||
/**
|
||||
* This class is for namespacing constants only. Forbid construction.
|
||||
* @throws FatalError
|
||||
|
|
|
@ -295,6 +295,26 @@ return [
|
|||
]
|
||||
);
|
||||
|
||||
// Feature: T332448: feature Zebra#9 design update
|
||||
// ================================
|
||||
$featureManager->registerRequirement(
|
||||
new OverridableConfigRequirement(
|
||||
$services->getMainConfig(),
|
||||
$context->getUser(),
|
||||
$context->getRequest(),
|
||||
null,
|
||||
Constants::CONFIG_ZEBRA_DESIGN,
|
||||
Constants::REQUIREMENT_ZEBRA_DESIGN
|
||||
)
|
||||
);
|
||||
$featureManager->registerFeature(
|
||||
Constants::FEATURE_ZEBRA_DESIGN,
|
||||
[
|
||||
Constants::REQUIREMENT_FULLY_INITIALISED,
|
||||
Constants::REQUIREMENT_ZEBRA_DESIGN,
|
||||
]
|
||||
);
|
||||
|
||||
return $featureManager;
|
||||
}
|
||||
];
|
||||
|
|
|
@ -623,6 +623,10 @@
|
|||
"logged_out": true
|
||||
},
|
||||
"description": "@var array Moves the tools links from the main menu into a new menu in the page toolbar"
|
||||
},
|
||||
"VectorZebraDesign": {
|
||||
"value": false,
|
||||
"description": "@var boolean Temporary feature flag that enables the zebra design for the Vector skin."
|
||||
}
|
||||
},
|
||||
"ServiceWiringFiles": [
|
||||
|
|
Loading…
Reference in a new issue