mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Remove DiscussionToolsEnableMobile
This existed to do a staged rollout to WMF wikis. Bug: T322497 Change-Id: I4562c166f3f07bce972f9d599de211147d2dc631
This commit is contained in:
parent
99f132f05e
commit
0672f4c74a
|
@ -544,10 +544,6 @@
|
||||||
"value": false,
|
"value": false,
|
||||||
"description": "A/B test DiscussionTools features for logged in users. false, any valid feature string for an option below, or an array thereof"
|
"description": "A/B test DiscussionTools features for logged in users. false, any valid feature string for an option below, or an array thereof"
|
||||||
},
|
},
|
||||||
"DiscussionToolsEnableMobile": {
|
|
||||||
"value": true,
|
|
||||||
"description": "Enable DiscussionTools on mobile talk pages. Currently this automatically enables 'replytool', 'newtopictool' & 'sourcemodetoolbar' on those pages and disables topic subscriptions on those pages."
|
|
||||||
},
|
|
||||||
"DiscussionTools_visualenhancements": {
|
"DiscussionTools_visualenhancements": {
|
||||||
"value": "default",
|
"value": "default",
|
||||||
"description": "Override availability of DiscussionTools visual enhancements. 'default', 'available', or 'unavailable'."
|
"description": "Override availability of DiscussionTools visual enhancements. 'default', 'available', or 'unavailable'."
|
||||||
|
|
|
@ -450,12 +450,7 @@ class HookUtils {
|
||||||
$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' );
|
$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' );
|
||||||
|
|
||||||
if ( $isMobile ) {
|
if ( $isMobile ) {
|
||||||
// DiscussionToolsEnableMobile controls all features on mobile
|
return $feature === null ||
|
||||||
return (
|
|
||||||
$dtConfig->get( 'DiscussionToolsEnableMobile' ) ||
|
|
||||||
static::determineUserABTestBucket( $output->getUser(), 'mobile' ) === 'test'
|
|
||||||
) && (
|
|
||||||
$feature === null ||
|
|
||||||
$feature === static::REPLYTOOL ||
|
$feature === static::REPLYTOOL ||
|
||||||
$feature === static::NEWTOPICTOOL ||
|
$feature === static::NEWTOPICTOOL ||
|
||||||
$feature === static::SOURCEMODETOOLBAR ||
|
$feature === static::SOURCEMODETOOLBAR ||
|
||||||
|
@ -464,8 +459,7 @@ class HookUtils {
|
||||||
( $feature === static::TOPICSUBSCRIPTION && $output->getUser()->isRegistered() ) ||
|
( $feature === static::TOPICSUBSCRIPTION && $output->getUser()->isRegistered() ) ||
|
||||||
$feature === static::VISUALENHANCEMENTS ||
|
$feature === static::VISUALENHANCEMENTS ||
|
||||||
$feature === static::VISUALENHANCEMENTS_REPLY ||
|
$feature === static::VISUALENHANCEMENTS_REPLY ||
|
||||||
$feature === static::VISUALENHANCEMENTS_PAGEFRAME
|
$feature === static::VISUALENHANCEMENTS_PAGEFRAME;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return static::isFeatureEnabledForUser( $output->getUser(), $feature );
|
return static::isFeatureEnabledForUser( $output->getUser(), $feature );
|
||||||
|
|
|
@ -709,7 +709,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DiscussionToolsEnableMobile enables multiple features, including the reply tool.
|
// DiscussionTools automatically enables most features on mobile.
|
||||||
// When we detect that it's enabled, hide the lede section, and show a "Read as wiki page" button
|
// When we detect that it's enabled, hide the lede section, and show a "Read as wiki page" button
|
||||||
// to reveal it.
|
// to reveal it.
|
||||||
// The button will disable all DT features by removing feature CSS classes.
|
// The button will disable all DT features by removing feature CSS classes.
|
||||||
|
|
Loading…
Reference in a new issue