Page MenuHomePhabricator

Inform users as to whether Updating is currently allowed or blocked
Closed, InvalidPublic3 Estimated Story Points

Description

Clicking the Update button or downloading any report causes all the reports and onscreen figures to update. This may take some time, so to reduce system load we're planning to lock users out from updating again for a period of 30 minutes from the time the update completes. We will, of course, also lock them out while the update is in progress. We need to provide clear signals to users, so that they understand how this works and why they can't perform an Update. This ticket defines that system of signals.

  • Pages: The Update button and Download menu currently exist on two pages: Event Summary and Edit List

The Three Update States

  • There are three possible update states: "Available", "Updating", and "Lockout"
  • We will signal the current state by four means: the color of the Update button, the color of the Download button/menu (defined in T206576), the hover message of the Update button, and the on-page update message. The sections below specify how each of these elements will behave and appear in each of the three Update States. See designs below.
  • The user initiates update either by 1) pressing the update button or 2) initiating a report download.
    • If the latter, the report-download sequence (T206576) begins.

Available State

In this state, Update is available. This is the default state.

  • Update button: the button is the regular color; clicking will initiate update.
  • Hover message: "Recalculates all reports and onscreen metrics."
  • On-page message: "Last updated 2018-10-29 18:49 (Africa/Accra)" [This is the existing message]
  • Download button/menu: is available.

Updating State

  • When the user initiates update, the Update state commences.
    • The 'Working" indicator shows, as specified in T207776
  • The system is updating. The user is locked out.
    • Update button: the button is grayed out and unavailable (see mockup below).
    • Hover message: "The system is updating. Please stand by."
    • On-page message: "Last updated 2018-10-29 18:49 (Africa/Accra)" [As above. No change]
    • Download button/menu: is unavailable, grayed out, and displays the same hover message as the Update button during this state: "The system is updating. Please stand by."

Lockout State

  • When update completes, the user is in Lockout for 30 minutes.
  • The message inform the user of the lockout duration, as follows:
    • Update button: the button is grayed out and unavailable
    • Hover message: "To reduce system load, updating is permitted only every 30 minutes. Last updated: hh:mm "
    • On-page message:
      • Next update permitted at hh:mm / Last updated 2018-10-29 18:49 (Africa/Accra).
        • [please use boldface as indicated; note that second part of message is the standard, unchanged last updated message format]
    • Download button/menu: is available, with no hover message.
      • During the lockout period, the user will still be able to download any report, including the same report that may have triggered the lockout. Doing so will not trigger an update. T206576. The figures downloaded will be the recently updated figures.

After Lockout...

  • When the lockout state comes to an end, the following things happen:
    • The page refreshes
    • The Update button, hover message and onscreen message return to their Available states.
    • All onscreen metrics on the current page update to show new values.
AvailableUnavailable
normal.png (271×746 px, 47 KB)
next update permitted.png (346×663 px, 70 KB)

Event Timeline

jmatazzoni created this task.
jmatazzoni updated the task description. (Show Details)

@Prtksxna, I talked to Moriel and she says that when the button is in unavailable state, it can't pop a dialog. So we have a new plan (sorry about that). We'll gray out the button and just change the text of the on-screen message, as described above. Please use that message but show on page for clarity. (I've requested boldface to help people see it but maybe you have a better idea?) Thanks.

From the description above:

Next update permitted at hh:mm (timezone/location notation). Last updated hh:mm.

Last updated 2018-10-29 18:49 (Africa/Accra).

I would strongly advocate for using ago times and show the exact times on hover (as I have been showing in some other mockups). They are much easier to read and make sense of:

  • Next update permitted in 22 minutes. Last update 8 minutes ago.
  • Last updated 3 days ago.
jmatazzoni removed the point value for this task.
jmatazzoni moved this task from In Design to Needs Discussion on the Community-Tech board.

@Mooeypoo @Niharika @aezell I rewrote this ticket. I had to revise it a bit after estimation. Until then, I didn't realize that we wouldn't start the 30-minute Lockout period until after the update had completed. That's fine, but it necessitates a new state for the communication system described in this ticket: the "Updating State". That's the state the system is in during the update process. So that forced me to reorganize this ticket to fully define the three stats, as above (a masterpiece of clarity in my opinion). But the only thing really added is the Update state .Do we need to re-estimate this or does 3 still cover it?

@Prtksxna I revised this ticket as described immediately above. I don't actually think this new state requires any new design elements—though no mockup is shown for the Updating State alone. Add one only if you think necessary.

jmatazzoni updated the task description. (Show Details)
jmatazzoni updated the task description. (Show Details)
From the description:

The user will need to refresh the page to use the Update button again.

@Mooeypoo and @MusikAnimal confirmed during the standup (1/2 Nov) that they'll be able to refresh the page automatically. Let's do this.

From the description above:

Next update permitted at hh:mm (timezone/location notation). Last updated hh:mm.

I would strongly advocate for using ago times and show the exact times on hover (as I have been showing in some other mockups). They are much easier to read and make sense of.

Confirmed in the standup that we can use ago times and have them periodically updated. @jmatazzoni should I update the ticket with new text labels (per my previous comment)?


@Prtksxna I revised this ticket as described immediately above. I don't actually think this new state requires any new design elements—though no mockup is shown for the Updating State alone. Add one only if you think necessary.

In the same meeting we found out that we don't need to block the users' actions while they wait for a new report. This means that we might not need a separate waiting indicator (T207776) and can use this button to do the job for us.

updating.gif (109×400 px, 38 KB)

Would something like this (with or without the animation) might eliminate the need for T207776? If so, I'll make designs for the error states too.


From the *description*:

…when the user requests a download, the system checks to see if the update is allowed. If it is, the system goes into Update State.

We discussed that it might not always be helpful to trigger an update whenever possible. We have two options instead:

  1. Let the users download reports without updating until a certain time threshold, say 1 day, and after that fore updates.
  2. Always let the user download reports without updating, but let them know clearly that the data might be old, with a call to action to update it now.

I am not sure if we reached a consensus during the meeting about which approach we'd like to go with. I'd pick option 2 because it keeps the user informed, and in control. What do you think @jmatazzoni @MusikAnimal @Mooeypoo?

@Prtksxna asks:

Confirmed in the standup that we can use ago times and have them periodically updated. @jmatazzoni should I update the ticket with new text labels (per my previous comment)?

I see that the "ago" format provides some measure of ease of use. But I am informed that changing to this would be work, particularly as it requires us to keep doing dynamic updates for short times. And since I am further informed that core features of this project (like the remaining four reports) are in some doubt, I can't approve that at this stage. So a) please leave date formats in the existing format and b) go ahead and write a ticket to change the date formats for this ticket and on T206576 to the "ago" format. If we can get to that I'll be happy to do so.

(You may need to define some rules around that unless they already exist. E.g., do we say "last updated 748 days ago," or is there some cutoff where the actual date becomes more useful again? Conversely, what is the phrasing for less than one minute? And how often do you keep updating if you are showing "10 minutes ago," etc. )

And since I am further informed that core features of this project (like the remaining four reports) are in some doubt, I can't approve that at this stage.

That makes sense.

So a) please leave date formats in the existing format

Done, not changing those, and update the other ticket (T206576)

b) go ahead and write a ticket to change the date formats for this ticket and on T206576 to the "ago" format. If we can get to that I'll be happy to do so.

T209910: Use relative time lengths instead of absolute time + timezone when informing the user about last updates

(You may need to define some rules around that unless they already exist. E.g., do we say "last updated 748 days ago," or is there some cutoff where the actual date becomes more useful again? Conversely, what is the phrasing for less than one minute? And how often do you keep updating if you are showing "10 minutes ago," etc. )

moment.js has sensible defaults here. Updating every minute should be fine, but I'd leave this up to the engineers.

jmatazzoni renamed this task from Inform users that Updating metrics is blocked for x minutes to Inform users as to whether Updating is allowed or blocked.Nov 20 2018, 11:06 PM
jmatazzoni renamed this task from Inform users as to whether Updating is allowed or blocked to Inform users as to whether Updating is currently allowed or blocked.Dec 18 2018, 11:34 PM

Just a friendly note -- the "lockout" restriction in particular should probably be deprioritized, as it's really just a solution to one of those "good problems" that we might have further down the road. Ideally we'll continue to let people try to get the data they want, on-demand. After all, most events (judging by # of pages improved) should have fast-running queries that won't cause problems for other users.

The lockout functionality is a good idea but maybe not sprint-worthy until we add all the other metrics, and discover the "Update Data" queries are in fact a significant burden on our system. The job queue, after all, means everyone gets their data on a first-come first-serve basis, and right now that's a competition between about 10 or so people that make up our userbase. Clashes are unlikely in the near-term.

Sorry for not bringing this up sooner!

Without the Lockout state requirement, this ticket is no longer necessary so I've closed it. I've updated T206576 and T207776 to reflect this closing and cover any loose ends.