Show new discussions, reviews, and updates to review requests.

Review Request #9182 — Created Sept. 7, 2017 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
c683452...

Reviewers

When viewing a review request that you've seen before, it can be hard to
really see what's been said since you've last looked at it, especially
if it's been a while. This change aims to address that by visually
highlighting new replies and new reviews, changes, etc. entries on the
page.

New replies on reviews are indicated by a blue border on the left-hand
side of the reply, and a "new updates" blue dot beside the author's name
(using the same imagery as the dashboard now uses). New page entries
(like reviews) use a blue border around the entire box, and a blue dot
beside the title. These provide a subtle, non-intrusive visual
indication of what's new.

Implementation-wise, entries now have a new is_entry_new method, which
defaults to comparing a last visited timestamp to the timestamp on the
entry. The change and review entries override this to factor in whether
the user created the entry in the first place (in which case it's not
"new" to the user). New entries provided by extensions just need to
supply a timestamp and optionally override the method in order to take
advantage of the new updates visuals.

A big thanks to Simon Zhang, a former UCOSP student working on Review
Board, for the initial work on this change. In the end, the change was
entirely rewritten to support the new page entry classes and to use
different visuals, and there really isn't any code in common, but that
work was important in figuring out how we wanted to ultimately approach
this feature.

Unit tests pass.

Tested creating new changes, new reviews (with and without comments), and
replying to the body fields and comments, using one user in one browser.
Then reloaded the page in another browser and saw the new visuals. Reloaded
again and the indicators went away.

Verified that new replies on new entries don't themselves show up as new
(instead piggybacking on the entire entry being new).


    Loading...