43

Once you already have a gold badge for a queue, the number of total reviews is hard to keep track of where you're at. I'd like to see how many reviews I've done so far today in the queue. For example, if I've already done 16 out of my 20 possible, show that.

I don't care whether it's a bar graph, just text, tally marks, etc.

It'd be nice to show this info, so it can maybe motivate people to complete all their reviews for the day, and give the user a status of where they are at for the day. I suggest implementing this in all queues, for all users, whether gold badge or not in the queue.

enter image description here

  • There's a workaround by looking below the button under the "Vote to Close" button in the "reasons" modal: it tells you how many you have left for the day. But I do agree, having it built into the system with a nice graph would be way better. – TylerH Mar 4 '15 at 16:51
  • @TylerH If you can provide an html-mock up of a graph I'm happy to try and integrate that in my script. I lookde at how thre progressbar works but didn't find the time to work out how that should work for me. – rene Mar 4 '15 at 18:19
  • @rene I'll mull it over, but I meant progress bar, not graph! – TylerH Mar 4 '15 at 19:21
  • 1
    I also meant progressbar, I should have typed graphical representation of a number in relation to a total but I stopped after the first 5 characters... – rene Mar 5 '15 at 9:57
18

I agree that this would be a good addition to that screen. Until this gets implemented the following userscript achieves the same and this works for all queues, even the new Help and Improvement queue:

// ==UserScript==
// @name         Stats
// @namespace    http://stackoverflow.com/users/578411/rene
// @version      0.3
// @description  Adds the current stat count in front of your total reviews on the review tab
// @author       rene
// @match        *://*stackoverflow.com/review/*
// @grant        none
// ==/UserScript==

(function($, window) {

    var parts,
        statsurl,
        currenthref = window.location.href,
        // here we put our stat
        stat = $('<div></div>')
        .html('...&nbsp;/&nbsp;')
        .css('float','left')
        .css('padding-top','13px');

    function buildUrl() {
        // build the stats url
        parts = window.location.pathname.split('/');
        if (parts.length>3) {
           parts[parts.length-1] = 'stats';
        } else {
            parts.push('stats');
        }
        return parts.join('/');
    }

    statsurl = buildUrl();

    // integate in the review page
    $('#badge-progress').prepend(stat);

    // get the (fullblown) stats page and find your own stat
    function refreshstat() {
        $.get(statsurl, function (data) {
            var html = $(data),
                td = html.find('td.review-stats-count-current-user:first'),
                atot = html.find('a.review-stats-count[href^="/review/"]'),
                tot = Number.parseInt(atot.text().replace(',',''),10),
                allowed, 
                current = Number.parseInt(td.text(),10);
            //console.log(tot);
            // http://meta.stackexchange.com/a/223917/158100
            if (tot > 1000) {
                allowed = 40; // was 40, temporary larger in march 2016
            }  else {
                allowed = 20;
            }
            // replace our current stat wit the just loaded one
            stat.html(current.toString() + '&nbsp;(' + (allowed - current).toString() + ')&nbsp;/&nbsp;');
        }).fail(function(prom, error, msg) {
            if (msg === 'Not Found') {
                // the url is not correct, try a new one
                statsurl = buildUrl();
            }
        });
    }

    // check regularly (every 5 seconds) if we done a review yet
    window.setInterval(function () {
        // if the url changed, lets get the new stat
        if (window.location.href !== currenthref) {
            currenthref = window.location.href;
            refreshstat();
        }
    }, 5000); // now 5 seconds because we hardly ever review quicker than that
    refreshstat(); // run once for an initial value

}($ || unsafeWindow.$, window || unsafeWindow));

The comments in the code should explain what this does. Here is a partial screenshot of what it looks like in action:

current daily stat count

Tested on Google chrome with Tamper Monkey but should work on Firefox with GreaseMonkey as well.

You can find the source on github as part of the scripts used by the regulars in the SO Close Voters room.

11
+50

Here is a user script to do it. Adds another progress bar which reflects your reviews for today.

Download from greasy fork!

// ==UserScript==
// @name         Review progress for today
// @version      1.01
// @description  Adds your review progress for today
// @author       nicael
// @include        *://*.stackexchange.com/review/*
// @include        *://*stackoverflow.com/review/*
// @include        *://*serverfault.com/review/*
// @include        *://*superuser.com/review/*
// @include        *://*askubuntu.com/review/*
// @include        *://*stackapps.com/review/*
// @grant        none
// @namespace https://greasyfork.org/users/9713
// ==/UserScript==

setInterval(function(){
    if($("smp").length===0){$("#badge-progress-count").prepend("<tm style='display:none'></tm><smp>...</smp> <div class='meter' style='display:inline-block;width:100px;height:9px;margin-top:1.3px;margin-right:5px;margin-left:5px;'><div style='background-color:#8fc77e;width:0%;' class='prg'></div></div> | ");}
    var sz = 0;$("tm").load(location.href.replace(location.href.split("/")[5], "") + "/stats .review-stats-count:first", function () {
    sz = parseInt($("tm > a").text().replace(/,/, ""));
    sz = sz > 1000 ? 40 : 20;
    $("tm").remove();
    $("smp").load(location.href.replace(location.href.split("/")[5], "") + "/stats .review-stats-count-current-user:first", function() {
        $("smp > td").removeClass("review-stats-count-current-user");
        $("smp > td").css({
            "display": "inline"
        });
        $(".prg").css({
            "width": parseInt($("smp").text())/sz*100 + "%"
        });
        $("smp").text($("smp").text()+" / "+sz);

    });
});
},500)
  • 1
    @Roo thanks, fixed :) – nicael Mar 14 '15 at 6:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .