r105309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105308‎ | r105309 | r105310 >
Date:16:20, 6 December 2011
Author:rsterbin
Status:ok (Comments)
Tags:
Comment:
Set to ignore by default, and ext.articleFeedbackv5.js to skip the bucketing step entirely if ignore is 100%, as per Roan's request that it be turned off until he gets UDP logging going on the cluster
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.js
@@ -18,10 +18,18 @@
1919
2020 /* Setup for feedback links */
2121
22 -// Only track users who have been assigned to the tracking group
23 -var useClickTracking = 'track' === mw.user.bucket(
24 - 'ext.articleFeedbackv5-tracking', mw.config.get( 'wgArticleFeedbackv5Tracking' )
25 -);
 22+// Only track users who have been assigned to the tracking group; don't bucket
 23+// at all if we're set to always ignore or always track.
 24+var useClickTracking = function () {
 25+ var b = mw.config.get( 'wgArticleFeedbackv5Tracking' );
 26+ if ( b.buckets.ignore == 100 && b.buckets.track == 0 ) {
 27+ return false;
 28+ }
 29+ if ( b.buckets.ignore == 0 && b.buckets.track == 100 ) {
 30+ return true;
 31+ }
 32+ return ( 'track' === mw.user.bucket( 'ext.articleFeedbackv5-tracking', b ) );
 33+}();
2634
2735 // Info about each of the links
2836 var linkInfo = {
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.php
@@ -91,8 +91,8 @@
9292 // this number to ensure the new odds are applied to everyone, not just people who have yet to
9393 // be placed in a bucket.
9494 'buckets' => array(
95 - 'ignore' => 0,
96 - 'track' => 100,
 95+ 'ignore' => 100,
 96+ 'track' => 0,
9797 ),
9898 // This version number is added to all tracking event names, so that changes in the software
9999 // don't corrupt the data being collected. Bump this when you want to start a new "experiment".

Comments

#Comment by Catrope (talk | contribs)   15:19, 12 December 2011

This misses the point (see review notes), but the change itself is sane. Marking OK.

#Comment by Rsterbin (talk | contribs)   15:33, 12 December 2011

I found the point in your notes confusing -- would you mind clarifying?

#Comment by Catrope (talk | contribs)   15:38, 12 December 2011

Oh, I'm sorry, I shouldn't refer to things I haven't submitted yet :D . I've now actually submitted my edit to the review notes page with a reply, please check back there.

Status & tagging log