mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-27 17:10:19 +00:00
Revert "Override mw.experiments.getBucket() via body classes"
This reverts commit b599da4153
.
Change-Id: I977b352ee71faa25c3921205025ba326e05a0f9b
This commit is contained in:
parent
cc570fe280
commit
7c29c5ff03
|
@ -236,8 +236,6 @@ class SkinVector22 extends SkinMustache {
|
|||
* @inheritDoc
|
||||
*/
|
||||
public function getHtmlElementAttributes() {
|
||||
$aBTest = $this->getConfig()->get( 'VectorWebABTestEnrollment' );
|
||||
$zebraEnabled = VectorServices::getFeatureManager()->isFeatureEnabled( Constants::FEATURE_ZEBRA_DESIGN );
|
||||
$original = parent::getHtmlElementAttributes();
|
||||
$featureManager = VectorServices::getFeatureManager();
|
||||
$original['class'] .= ' ' . implode( ' ', $featureManager->getFeatureBodyClass() );
|
||||
|
@ -256,15 +254,6 @@ class SkinVector22 extends SkinMustache {
|
|||
// possibly others). It must instead be applied to the html tag.
|
||||
$original['class'] = implode( ' ', [ $original['class'] ?? '', self::STICKY_HEADER_ENABLED_CLASS ] );
|
||||
}
|
||||
|
||||
if ( $aBTest[ 'enabled' ] ) {
|
||||
if ( $zebraEnabled ) {
|
||||
$original['class'] .= ' ' . $aBTest[ 'name' ] . '-treatment ';
|
||||
} else {
|
||||
$original['class'] .= ' ' . $aBTest[ 'name' ] . '-control ';
|
||||
}
|
||||
}
|
||||
|
||||
$original['class'] = trim( $original['class'] );
|
||||
|
||||
return $original;
|
||||
|
|
|
@ -90,10 +90,7 @@ module.exports = function webABTest( props, token, forceInit ) {
|
|||
*/
|
||||
function getBucketFromHTML() {
|
||||
for ( const bucketName of getBucketNames() ) {
|
||||
if (
|
||||
document.body.classList.contains( `${props.name}-${bucketName}` ) ||
|
||||
document.documentElement.classList.contains( `${props.name}-${bucketName}` )
|
||||
) {
|
||||
if ( document.body.classList.contains( `${props.name}-${bucketName}` ) ) {
|
||||
return bucketName;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue