Users of Event Metrics will be able to download a variety of reports in both Wikitext and csv format. To enable this, we will put a 'Download reports' menu on select pages. See below.
{F26448689}
Once the user selects the desired report, she will next be presented with a popup that invites her to select her preferred format, Wikitext or csv. See below:
{F27266910}
- **[[ https://prtksxna.github.io/wmf-prototype-gm/event.html | Here is a prototype ]]** that shows these tools in action: to see the (correct) popup select __Pages Improved__
=Availability of downloading
- T207911 defines three states related to whether the system is currently updating metrics: "Available", "Updating", and "Lockout." Downloading is available in the "Available" and "Lockout" states, but not in the "Updating" state.
- Users will always get the metrics that are available as of the last completed update at the time download is initiated.
- Since Lockout doesn't begin until the Updating state ends, a user who downloads during Lockout still gets the most recent update.
=Download button and menu labeling and behavior
- **Pages: **Report downloading will be available from the Event Summary data page (currently simply the main event page) and the Event Edit List page (currently called "Event Data"),
- **Download button: **is labeled as follows: Download reports [with a downward-facing menu triangle]
- "Active" and "Lockout states": When download is available (see above and T207911) the button is blue and turns a darker shade of blue on hover.
- "Updating state" During updating, the Download Button is not available: the button is grayed and presents the following hover message: "The system is updating. Please stand by."
- **Download menu**
- **Menu hover state** When the user hovers over menu items, they highlight with a darker shade of gray (use the available Bootstrap style).
- **Menu items** The menu will eventually contain 6 or 7 reports. To begin with it will contain three reports, as follows:
- Event summary
- Pages created [defined at T205502 and T206058]
- Edit list [this is the existing "all data" report]
=Popup labeling and behavior
- **Title: **the popup has a title in the following format: 'Reportname' report (e.g., 'Pages improved' report) [yes, please include the single quotes]
- **Instruction text:** Instruction text in the middle area reads: Please select a format for the report
- **Button labels: **
- Get Wikitext
- Download CSV
- **Timestamp** in same format as on the page, Last updated //yyyy-mm-dd hh:mm//
- If the date is within the same calendar day as the download, omit the date, as follows: Last updated //hh:mm//
- **Button hover:** Buttons turn a darker shade of gray
=Getting the files
When the user makes her selection, behavior is the same as for the existing Grant Metrics reports. Which is to say
- **Get Wikitext:** pops open a new tab that presents the wikitext of the table--defined in T205502
- **Download CSV** commences download of the comma-delimited file, as defined in T205363 and T206058