[WIP] Allow replying to reviews from the diffviewer/text based file attachments/screenshots

Review Request #7172 — Created April 6, 2015 and discarded

Information

Review Board
master

Reviewers

The only way to reply to reviews are from the View Reviews page. Although all the comments can be seen in the diffviewer/text based file attachments/screenshots, they are not organized in the review and review reply hierarchy. The comments in the comment editor dialog are also not rendered and are shown in the raw text form. Although draft review replies are shown in the comment editor textarea, it is not possible to make any changes to them. Viewing and replying to reviews will redirect the page to the View Reviews page.

This new feature will allow users to reply to reviews from the other reviews pane in the comment editor. Upon clicking on reply, the other reviews pane will expand and display the inline comment editor, similar to one in the View Reviews page. The UI for publishing and discarding review replies is more tricky and has not been determined.

The inline editor has been integrated into the other reviews pane of the comment editor dialog. If a draft reply to that comment exists, it would be shown with a green username with an edit icon beside the username. If not, the reply butoon will be displayed at the top right corner, clicking it will display the editor.

This change only allows for creating new replies to comments, publishing and discarding of review replies are only available in the View Reviews page.

Manually tested by replying to existing comments in the 3 pages - diffviewer/text based file attachments/screenshots:
- Creating new comment replies without an existing draft review reply. A new draft review reply is created with it.
- Creating new comment replies for existing draft review replies.
- Updating comment replies for existing draft review replies.


Description From Last Updated

So I know this is inconsistent with the comment_dict above, but can you make comment_replies_dict a collections.defaultdict(list) ? That way …

brenniebrennie

Blank line between statement and block.

brenniebrennie

Can you put a blank line between these? It makes it easier to read with an inline function.

brenniebrennie

Does this go over line length if you put .appendTo($replies) on the previous line?

brenniebrennie
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/staticbundles.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/abstractCommentBlockView.js
        reviewboard/static/rb/js/views/commentDialogView.js
        reviewboard/static/rb/js/views/commentDialogReviewView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
  2. 
      
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/staticbundles.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/abstractCommentBlockView.js
        reviewboard/static/rb/js/views/commentDialogView.js
        reviewboard/static/rb/js/views/commentDialogReviewView.js
        reviewboard/static/rb/css/pages/reviews.less
    
    
  2. 
      
chipx86
  1. Can you add screenshots showing this off (and update them for any changes)?

    1. Currently I'm still trying to get the inline editor to display correctly, I'll update the review with screenshots after adding in the proper styling.

  2. 
      
WU
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/staticbundles.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/abstractCommentBlockView.js
        reviewboard/static/rb/js/views/commentDialogView.js
        reviewboard/static/rb/js/views/commentDialogReviewView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/staticbundles.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/abstractCommentBlockView.js
        reviewboard/static/rb/js/views/commentDialogView.js
        reviewboard/static/rb/js/views/commentDialogReviewView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
    
    
  2. 
      
brennie
  1. 
      
  2. reviewboard/reviews/context.py (Diff revision 2)
     
     
    Show all issues

    So I know this is inconsistent with the comment_dict above, but can you make comment_replies_dict a collections.defaultdict(list) ?

    That way you can just do comment_replies_dict[parent_id].append(...).

  3. reviewboard/reviews/context.py (Diff revision 2)
     
     
    Show all issues

    Blank line between statement and block.

  4. I'm guessing you're applying direct descendant selector because of rendered Markdown beneath this, right?

    1. Yes, I also have another list for each of this list's items for the replies.

  5. Show all issues

    Can you put a blank line between these? It makes it easier to read with an inline function.

  6. Show all issues

    Does this go over line length if you put .appendTo($replies) on the previous line?

    1. It doesn't, I've shifted it up.

  7. 
      
WU
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/ui/base.py
        reviewboard/staticbundles.py
        reviewboard/reviews/ui/text.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/abstractCommentBlockView.js
        reviewboard/static/rb/js/views/commentDialogReviewView.js
        reviewboard/static/rb/js/views/abstractReviewableView.js
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/static/rb/js/views/commentDialogView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/ui/base.py
        reviewboard/staticbundles.py
        reviewboard/reviews/ui/text.py
        reviewboard/reviews/context.py
    
    Ignored Files:
        reviewboard/static/rb/js/views/abstractCommentBlockView.js
        reviewboard/static/rb/js/views/commentDialogReviewView.js
        reviewboard/static/rb/js/views/abstractReviewableView.js
        reviewboard/static/rb/js/views/reviewReplyEditorView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/static/rb/js/views/commentDialogView.js
    
    
  2. 
      
david
Review request changed
Status:
Discarded