ABtest for mobile, logged in users

Bug: T320993
Change-Id: I46597f2846811c52cbaba1a1db31bff575a41246
This commit is contained in:
David Lynch 2022-10-31 14:02:32 -05:00
parent cf3bf1bb4f
commit 2b0d2deb4a
2 changed files with 5 additions and 2 deletions

View file

@ -485,7 +485,7 @@
},
"DiscussionToolsABTest": {
"value": false,
"description": "A/B test DiscussionTools features for logged in users. false, 'replytool', or 'newtopictool'"
"description": "A/B test DiscussionTools features for logged in users. false, 'replytool', 'newtopictool', or 'mobile'"
},
"DiscussionToolsEnableMobile": {
"value": true,

View file

@ -427,7 +427,10 @@ class HookUtils {
if ( $isMobile ) {
// Enabling mobile removes MobileFrontend's reply and new topic tools, so always
// enable these tools as a replacement.
return $dtConfig->get( 'DiscussionToolsEnableMobile' ) && (
return (
$dtConfig->get( 'DiscussionToolsEnableMobile' ) ||
static::determineUserABTestBucket( $output->getUser(), 'mobile' ) === 'test'
) && (
$feature === null ||
$feature === static::REPLYTOOL ||
$feature === static::NEWTOPICTOOL ||