Improve the logic for collapsing any entry with a review.
Review Request #9281 — Created Oct. 18, 2017 and submitted — Latest diff uploaded
The logic for computing the collapse state for reviews (and anything
containing reviews by way of status updates) has been updated to better
show off the entries that users most likely want to see.The new logic will expand review entries (or anything containing
reviews) if:
- The review is being seen by the user for the first time
- There's open issues (including those in verifying states)
- There's a new published reply
- There's a pending draft replying to a body field or a comment
Much of this is the same as before, but there are some notable changes:
Previously, only draft replies to comments were considered when
determining the collapsing state. Draft replies to body top/bottom
fields were not included.Review entries are no longer automatically expanded if newer than the
latest change description, or automatically collapsed if older than
it. The change description is no longer consider for review entries
at all, providing more focus on the updates to the entries
themselves.For the Initial Status Updates entry and Change entries containing
status updates, only draft replies to comments were previously
considered. Now, the collapsing logic for reviews apply to these
as well when there are status updates with reviews.Thanks to Connor Yoshimoto for prototyping the new collapsing logic for
the page.
Unit tests pass.
Tested with a very comprehensive review request I have that has entries
of all kinds in all states needed for testing. Checked each entry and
saw that the collapsed states all made sense with regards to the new logic.