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:
Moh'd Khier Abualruz 2023-03-28 21:59:27 +02:00
parent 6ad3ad889e
commit 47b82f6034
3 changed files with 39 additions and 0 deletions

View file

@ -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

View file

@ -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;
}
];

View file

@ -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": [