Allow comments to be deleted from review dialog
Review Request #7744 — Created Oct. 28, 2015 and submitted — Latest diff uploaded
The review dialog now displays a delete icon next to all deletable
comments (diff comments and attachment comments, currently). Previously,
the only way to delete a comment was to delete it from the review UI
where it was created. However, with general comments coming soon, there
was no review UI to manage them and delete them. Hence, it makes sense
for all deletable comments to be deletable from within the review
dialog.JS Unit tests have been added for deletion of diff comments, attachment
comments, and screenshot comments.This patch also contains some minor JS cleanups:
-RB.BaseResourceModel.ready
now ensures itssuccess
anderror
options are functions before bdinging them.
- Replaced a binding ofself = this
and calling a function by binding
said function to the correct context.
- Cleaned up some assignments inRB.BaseResourceModel._finishDestroy
so that it only does oneset()
call instead of several.
- Ran JS tests.
- Deleted attachment comments and diff comments from the review dialog.
It worked as expected. - Manually verified that the deletion confirmation works in both cases.