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

Review Request #7172 - Created April 6, 2015 and updated

Wu Di
Review Board
master
9964e4c...
reviewboard, students

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.

Loading file attachments...

  • 0
  • 0
  • 4
  • 0
  • 4
Description From Last Updated
Review Bot
  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. 
      
Review Bot
  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. 
      
Christian Hammond
  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 Di
Review Bot
  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. 
      
Barret Rennie
  1. 
      
  2. reviewboard/reviews/context.py (Diff revision 2)
     
     

    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)
     
     

    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. Can you put a blank line between these? It makes it easier to read with an inline function.

  6. 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 Di
Review request changed

Change Summary:

  • Bind the updated reply values to the existing serializedComments so that closing and opening the comment editor will not result in the old reply being displayed.
  • Updates the comment block tooltips after updating replies.
  • Display replies for text based file attachments and screenshots.

Summary:

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

Description:

~  

The only way to reply to reviews are from the View Reviews page. Although all the comments can be seen in the diffviewer, 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.

  ~

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.

   
~  

Currently the inline editor has been integrated into the other reviews pane of the comment editor dialog. If a draft reply to that comment exists, then 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.

  ~

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.

   
~  

Saving and updating draft review replies is working, but the updated data is not binded to the serializedComment in the diffCommentBlock, so after closing the comment dialog, the updated values are only reflected in the server and not on the client.

  ~

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

Testing Done:

  +

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.

Commit:

-c6fd1969b5cb62b88b1455e5bf766e4440c7a580
+9964e4c04902b25f626b7c326725ead51415e9d1

Diff:

Revision 3 (+422 -91)

Show changes

Added Files:

Review Bot
  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. 
      
Loading...