mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-23 10:21:40 +00:00
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:
parent
332678a991
commit
0a33ffffac
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue