Unified Review Banner Base Shell

Review Request #10196 — Created Oct. 5, 2018 and updated — Latest diff uploaded

shoven
Review Board
master
d628caa...
reviewboard, students

The Unified Review Banner Base Shell sets the foundation for the Unified
Review Banner, which will eventually take over for the three banners
currently used for draft review requests, reviews, and review replies.

The banner tracks the draft state of review requests, reviews, and
review replies so it can be put into a draft mode where the banner
appears green when at least one draft exists. The banner makes use of
RB.FloatingBannerView to allow the banner to float to the top of the
screen when the user scrolls down. The new RB.Registry model allows
views like dropdowns, buttons, and Backbone views to be registered in
different locations on the banner. There are placeholders registered to
the different banner sections right now which will later be removed or
replaced when the functionality of the Unified Review Banner is fleshed
out further.

Currently, the Unified Review Banner is only shown when the Unified
Banner feature flag is enabled, by appending the following code to
settings_local.py:

ENABLED_FEATURES = {
    'reviews.unified_banner': True
}

Added new JS tests to test functionality added. All JS tests pass.

Manual test cases:
1. Review request draft by modifying description, testing done,
information -> banner should turn green
2. Review request draft by adding a file (through drag-and-drop and
Update > Add File) -> banner should turn green
3. Discard review request draft with button on unified banner -> banner
should turn brown, review request discarded
4. New review by adding comment in diff viewer -> banner should turn
green
5. Discard review with button on unified banner -> banner should turn
brown, review discarded
6. New review with header, general comment in review dialog -> banner
should turn green
7. Discard review in review dialog -> banner should turn brown, review
discarded
8. Review reply draft by adding review replies on one review -> banner
should turn green
9. Remove all text of review reply draft (empty string) -> review reply
should be removed, banner should turn brown
10. Review reply draft by adding review replies on multiple/all reviews
-> banner should turn green
11. Discard review reply drafts with button on unified banner -> banner
should turn brown, all review replies discarded
12. New review/review request and review replies added -> banner should
turn green
13. Discard with button on unified banner -> banner should turn brown,
review and review replies discarded

*reload case (where on reload the correct banner state persists) tested
on all non-discard test cases

Loading file attachments...

Loading...