Remove Zebra A/B test code

Additional change:
* Remove duplicate A/B test requirement for language in header

Bug: T339957
Change-Id: I0258e71ac0e270682ec1f3bcb0f10198892f058d
This commit is contained in:
Jon Robson 2023-11-13 13:18:06 -08:00 committed by Jdlrobson
parent 332678a991
commit 0a33ffffac
4 changed files with 2 additions and 49 deletions

View file

@ -243,13 +243,6 @@ final class Constants {
*/
public const CONFIG_ZEBRA_DESIGN = 'VectorZebraDesign';
/**
* Requirement that checks the value of ABTestEnrollment.
*
* @var string
*/
public const REQUIREMENT_ZEBRA_AB_TEST = 'VectorZebraDesign';
/**
* @var string
*/

View file

@ -25,7 +25,6 @@
use MediaWiki\MediaWikiServices;
use MediaWiki\Skins\Vector\Constants;
use MediaWiki\Skins\Vector\FeatureManagement\FeatureManager;
use MediaWiki\Skins\Vector\FeatureManagement\Requirements\ABRequirement;
use MediaWiki\Skins\Vector\FeatureManagement\Requirements\DynamicConfigRequirement;
use MediaWiki\Skins\Vector\FeatureManagement\Requirements\LimitedWidthContentRequirement;
use MediaWiki\Skins\Vector\FeatureManagement\Requirements\LoggedInRequirement;
@ -66,38 +65,6 @@ return [
// ---
// Temporary T286932 - remove after languages A/B test is finished.
$requirementName = 'T286932';
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys.
$config = new MultiConfig( [
new HashConfig( [
Constants::REQUIREMENT_ZEBRA_AB_TEST => true,
] ),
$services->getMainConfig(),
] );
$featureManager->registerRequirement(
new ABRequirement(
$services->getMainConfig(),
$context->getUser(),
'skin-vector-zebra-experiment',
Constants::REQUIREMENT_ZEBRA_AB_TEST
)
);
$featureManager->registerRequirement(
new OverridableConfigRequirement(
$config,
$context->getUser(),
$request,
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
$requirementName
)
);
// ---
$featureManager->registerFeature(
Constants::FEATURE_LANGUAGE_IN_HEADER,
[
@ -277,8 +244,7 @@ return [
Constants::FEATURE_ZEBRA_DESIGN,
[
Constants::REQUIREMENT_FULLY_INITIALISED,
Constants::REQUIREMENT_ZEBRA_DESIGN,
Constants::REQUIREMENT_ZEBRA_AB_TEST
Constants::REQUIREMENT_ZEBRA_DESIGN
]
);

View file

@ -94,12 +94,6 @@ module.exports = function webABTest( props, token, forceInit ) {
return bucketName;
}
}
if ( props.name === 'skin-vector-zebra-experiment' ) {
return document.documentElement.classList.contains(
'vector-feature-zebra-design-enabled'
) ? 'treatment' : 'control';
}
return null;
}

View file

@ -631,7 +631,7 @@
},
"VectorWebABTestEnrollment": {
"value": {
"name": "skin-vector-zebra-experiment",
"name": "skin-vector-unnamed",
"enabled": false,
"buckets": {
"unsampled": {