• 
      

    Refactor out the remaining comment issue status code.

    Review Request #4182 — Created May 28, 2013 and submitted

    Information

    Review Board
    master

    Reviewers

    Refactor out the remaining comment issue status code.
    
    This introduces a CommentIssueBarView object, which handles everything
    having to do with the issue status bars. It can optionally create and
    render the element (in the case of the comment dialog), or reuse an
    existing element (in the case of the review boxes).
    
    This is a bit different from the original code in $.issueStatus. That
    code did too much. Some of the responsibilities have been moved out or
    cleaned up. For example, the IssueSummaryTableView now updates itself
    when issue statuses change, rather than the issue bar having to update
    it.
    
    As part of this, other cleanups were able to be made. The custom
    callback registration in CommentIssueManager is gone, and replaced with
    standard Backbone events.
    
    CommentDialogView now requires a reviewRequestEditor, which impacted
    some tests. Also, ReviewRequestEditor now takes a CommentIssueManager,
    in an effort to reduce (and eventually remove) the use of global
    variables.
    
    Unit tests were added for this.
    Tested all issue states on the reviews page, and made sure that
    the issue summary table was updated appropriately.
    
    Tested all issue states on comments in the comment dialog from
    the diff viewer page.
    
    Unit tests all pass.
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/settings.py
        Ignored Files:
          reviewboard/static/rb/js/models/commentIssueManagerModel.js
          reviewboard/static/rb/js/views/tests/commentDialogViewTests.js
          reviewboard/static/rb/js/views/commentIssueBarView.js
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/views/tests/commentIssueBarViewTests.js
          reviewboard/static/rb/js/views/issueSummaryTableView.js
          reviewboard/static/rb/js/reviews.js
          reviewboard/templates/reviews/reviewable_base.html
          reviewboard/static/rb/js/models/reviewRequestEditorModel.js
          reviewboard/static/rb/js/views/commentDialogView.js
          reviewboard/templates/reviews/comment_issue.html
          reviewboard/static/rb/js/views/tests/reviewRequestEditorViewTests.js
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed