Automatically update entries for pending status updates.

Review Request #9171 - Created Sept. 4, 2017 and submitted

Christian Hammond
Review Board
release-3.0.x
82cfc24...
reviewboard

This introduces new machinery for automatically updating parts of the
review request page in response to updates from the server. It
specifically targets the new status updates feature, but is built to
eventually allow most or all of the page to periodically update as
needed.

Entries can now tell the page that they want to watch for updates, and
supply a polling frequency. The lowest frequency wins, and at each poll
interval, the server will provide metadata and HTML for each requested
entry being polled. If the data is newer than what the page has, it will
update the model attributes and view's HTML appropriately. This can
continue indefinitely or be turned off when needed.

The entries supporting status updates will watch for updates if any
status update is in the pending state, and will stop polling once that's
no longer the case.

Going forward, we'll be able to start moving to this and away from the
last-updated checks, handling dynamic updating of conversations and of
the review request itself in response to changes made in other tabs.
This is a larger project and does not target 3.0, but the foundation is
there for the future.

Unit tests pass.

Created status updates in pending mode. Saw that the page periodically
checked for updates. Switched the status update to a different mode and
saw that, after only a short wait, that the entry updated to reflect the
new mode.

Checked that the issue summary table updated appropriately based on issues
filed on the status update.

  • 0
  • 0
  • 7
  • 6
  • 13
Description From Last Updated
Checks run (2 failed)
flake8 failed.
JSHint failed.

flake8

JSHint

Christian Hammond
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

David Trowbridge
  1. 
      
  2. This is only assigned once so it can be const (const doesn't imply immutable, just un-reassignable).

  3. This is an excellent candidate for a fat arrow function.

  4. 
      
Christian Hammond
Review request changed

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

David Trowbridge
  1. Ship It!
  2. 
      
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (fd009cf)
Loading...