Page MenuHomePhabricator

Implement frontend for metrics calculation for events
Closed, ResolvedPublic3 Estimated Story Points

Description

Mocks

  • For one wiki: Link
  • For multiple wikis: Link
  • When calculation in progress: link
  • Timestamp when the metrics were last calculated: link

Things to note:

  1. Instead of "Recalculate totals", the button would say "Update data". There was several people confused about the "Recalculate" language in the research doc Sati published.
  2. The button text will change to "Updating..." when the user clicks it.

Event Timeline

kaldari set the point value for this task to 3.Jan 9 2018, 11:59 PM
DannyH triaged this task as Medium priority.Jan 17 2018, 12:59 AM
DannyH edited projects, added Community-Tech-Sprint; removed Community-Tech.
MusikAnimal moved this task from Ready to In Development on the Community-Tech-Sprint board.
MusikAnimal moved this task from Backlog to In progress on the Grant-Metrics board.

@Niharika Regarding this mock: https://meta.wikimedia.org/wiki/Community_Tech/Grant_metrics_tool#/media/File:New_Grant_metrics_3_w_breakout.png

Participants, new editors, and retention pertain to all wikis, so should we just put a - in the cells for each individual wiki?

@MusikAnimal I'd just put the same number in those instead of -.

@MusikAnimal I'd just put the same number in those instead of -.

That could be a little misleading, no? Say it indicates a user was retained on one wiki when in actuality they had not edited there at all. For retention, we can actually compute this per-wiki, if we want to, especially with the new revised backend. Even for "new editors", to see when the account was attached there. "Participants" I suppose would always be the same number, unless want that to mean they have an account on that wiki, and at least one edit in the time period (because if they didn't, they did not participate, in a literal sense).

@MusikAnimal I'd just put the same number in those instead of -.

That could be a little misleading, no? Say it indicates a user was retained on one wiki when in actuality they had not edited there at all. For retention, we can actually compute this per-wiki, if we want to, especially with the new revised backend. Even for "new editors", to see when the account was attached there. "Participants" I suppose would always be the same number, unless want that to mean they have an account on that wiki, and at least one edit in the time period (because if they didn't, they did not participate, in a literal sense).

The definition for retention has been defined that way by Danny and Sati. I'll talk to Sati in our next meeting with her and we'll see if we should do it differently. I don't think we should compute Retention, New editors and Participants any differently for now though. I'll make a point to discuss that in our next meeting.

I don't think we should compute Retention, New editors and Participants any differently for now though. I'll make a point to discuss that in our next meeting.

Sure. To be clear, I was suggesting adding some of these stats on a per-wiki basis in addition to across all wikis. So the "Totals" row will still show the overall stats as it does now.

I think this is done, as described. Relevant commit at https://github.com/wikimedia/grantmetrics/commit/073ab39fdd3eb3d04c9041a20bd141f883eb22ee

The events index page (/program/program_name) should show the correct stats for each individual event. Viewing programs as a whole (/programs) just shows blank values. I will add the stats there next.

Other unrelated issues popped up, such as the JavaScript i18n library not loading the messages. This means when you click on the "Calculate totals" button you see message keys. I'll fix this soon.

Also, I should mention the way it works now is once stats have been computed, the page is refreshed. At some point I'd like to move the stats area to a Twig partial, and have the statistics endpoint render that, so we can show the data without refreshing. Low priority, methinks.

Yeah, refreshing is totally fine. I took a quick look at this on Toolforge and for one of the events I created, I get -

Screen Shot 2018-02-09 at 9.51.00 AM.png (434×2 px, 63 KB)

which can't be right. Look at pages created and improved stats.

I added you as an organizer for the event so you can test.

Screen Shot 2018-02-09 at 9.51.00 AM.png (434×2 px, 63 KB)

which can't be right.

Yeah... that's definitely wrong =p This is why we really need to make the test suite work for multiple wikis. I've created T186917.

Fixed with 82641e6. One of those careless errors that tests could have prevented!

Niharika moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.

Works nice and fast.