Until the recent changes concerning the Review page, when you hovered the cursor over an user icon, you could see some data concerning the activity of that user in that specific review queue (when they were active for the last time, how many reviews they had done that day, and so on). That information is now gone. Could you please bring it back? Or, at least, explain why it is gone?


In the review-dashboard.en.js there is this function getUrl to build the url of the form /review/user-info/[review-task]/[userid] which is then used to issue an GET request to the server:

function getUrl(elem) {
    var jElem = $(elem),
        container = jElem.closest(".user-review-hover"),
        userUrl = container.find("a").attr("href"),
        userReg = new RegExp("/users/([^/]+).*$"),
        match = userReg.exec(userUrl);

    var reviewTaskTypeId = jElem.closest(".dashboard-activity").attr("data-review-task");        

    if (!match)
        return null;

    return '/review/user-info/' + reviewTaskTypeId + '/' + match[1];

This line is causing troubles:

var reviewTaskTypeId = jElem.closest(".dashboard-activity").attr("data-review-task");        

because in the rearrangement of the HTML elements the class dashboard-activity is no longer applied to the div that holds the data-review-task.

DOM tree no longer shows class name but does have data-review-task attribute

I think the best fix is to add that class back and if that is not possible for some reason have the code look for one of those classes that exist on that div: ml16 sm:ml0 sm:mt16 ta-right sm:ta-left but not grid--cell as that will find the wrong div.

  • 1
    Thanks btw - this saved me a minute - ended up going with jElem.closest("[data-review-task]").attr("data-review-task") (among other fixes) – Nick Craver Jan 10 at 22:10

As rene noted, this is due to the change in structure: a bit of code was looking for a class that isn't used anymore so that it could pull a data attribute off of it.

The easy solution there is to just... look for the data attribute directly. So that's what we do now. This fix is live everywhere if anyone wants to observe it in action.

Nick jumped in to fix this, adding high-DPI icons in the process, so if you're using a high-DPI screen you can enjoy that as well while verifying the fix!

You must log in to answer this question.

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