Make the Review Dialog use inlineEditors.

Review Request #6239 — Created Aug. 17, 2014 and submitted — Latest diff uploaded

Information

Review Board
master
211db77...

Reviewers

Traditionally, the Review Dialog (created either via the "Review" action or
"Edit Review" in the draft review header) had a text box for the body top and
body bottom headers, and a text box for each comment.

This made a lot more sense when the comments were plain text, and the contents
of the text inputs was the same as what the user would see. One thing that
always bothered me about the addition of markdown formatting for comments was
that it was impossible to truly know what you'd get after a review was
published, since we never showed the comments in rendered form. It also meant
that we were potentially creating a huge number of CodeMirror instances, which
made the Review Dialog pretty slow.

This change replaces all the text boxes with rendered text. This makes it more
or less resemble what the user would see after publishing the review. Headers
and footers can be added via the relevant links (either "Add header", "Add
footer", or "Add text" depending on the number of comments), which works a lot
like "Add comment" in the review replies.

The individual comments and other states (whether an issue is open, ship it)
are now all "instant apply". The dialog therefore no longer has "Save" and
"Cancel" buttons, but just a "Close" button. Changes to each individual comment
can still be cancelled.

  • Clicked "Review" without a pending draft review. Saw the ship-it checkbox and
    an open/focused inline editor.
  • Checked that checking or unchecking "Ship it" would send a request to the
    server, editing the review.
  • Clicked "Review" without a pending draft review. Clicked "Ship it" and
    published. Saw a review with "Ship it".
  • Edited draft reviews, changing comment text and issue state.
  • Added and removed headers and footers, checking that everything was saved
    correctly, and that when the relevant text was empty/null, that the "Add ..."
    links were shown.
  • Installed the severity extension and verified that changes to the severity
    fields were saved when clicking "Close" and "Publish".