Jhernandez has uploaded a new change for review. https://gerrit.wikimedia.org/r/311397
Change subject: Skip experiment condition for logged in users ...................................................................... Skip experiment condition for logged in users Logged in users won't be bucketed for the experiment and Hovercards will remain disabled for them when the experiment is active except if they explicitly opt-in via hovercards beta features or the 'Enable previews' link at the bottom of the page. Bug: T146017 Change-Id: I7a93d225476e12b41c334577baec502134c1ae0b --- M resources/ext.popups.experiment.js 1 file changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups refs/changes/97/311397/1 diff --git a/resources/ext.popups.experiment.js b/resources/ext.popups.experiment.js index 809fb02..92a9cc7 100644 --- a/resources/ext.popups.experiment.js +++ b/resources/ext.popups.experiment.js @@ -51,12 +51,14 @@ * condition. * * The user is in the experiment condition if: - * * they've enabled Popups by click "Enable previews" in the footer menu, or - * * they've enabled Popups as a beta feature, or - * * they aren't in the control bucket of the experiment + * * They've enabled Popups by click "Enable previews" in the footer menu, or + * * They've enabled Popups as a beta feature, or + * * They aren't in the control bucket of the experiment * - * N.B. that the user isn't entered into the experiment, i.e. they aren't assigned or a bucket, - * if the experiment isn't configured. + * N.B. that the user isn't entered into the experiment if: + * * If the experiment isn't configured, or + * * If they are logged in users (without the popups beta feature), or + * * They aren't assigned to a bucket (not control group) * * @return {boolean} */ @@ -78,7 +80,8 @@ return true; } - if ( !config ) { + // Disable if experiment is disabled or user is logged in + if ( !config || !mw.user.isAnon() ) { return false; } -- To view, visit https://gerrit.wikimedia.org/r/311397 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7a93d225476e12b41c334577baec502134c1ae0b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Popups Gerrit-Branch: master Gerrit-Owner: Jhernandez <jhernan...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits