• 
      
    Fish Trophy

    chipx86 got a fish trophy!

    Fish Trophy

    Rewrite the review dialog.

    Review Request #4224 — Created June 8, 2013 and submitted

    Information

    Review Board
    master

    Reviewers

    Rewrite the review dialog.
    
    The review dialog has had a full rewrite. It's no longer just a
    container for a server-side rendered form, which was done in a very
    hacky way and could be slow to load for large changes. Now it displays
    instantly and fetches the comments itself, rendering them one at a time.
    
    This looks the same as the old form, but with one improvement:
    File attachment thumbnails are now rendered as well. They appear just
    like screenshot thumbnails do. Previously, we'd only render the
    caption or filename.
    
    Unit tests were added for this.
    Unit tests pass.
    
    Tested all three types of comments.
    
    Tested modifying every type of field on the reviews and comments and making sure they persisted on save.
    
    Tested publishing.
    
    Tested discarding the draft.
    
    Tested creating a brand new review from scratch with the Review button, and publishing that.
    Description From Last Updated

    For now (until we use require.js), can we wrap everything in an anonymous function to avoid polluting the global namespace?

    daviddavid

    If this gets called before render() it'll raise an exception. Can you check whether these are null?

    daviddavid

    Can we use this.listenTo?

    daviddavid

    this.listenTo?

    daviddavid

    this.listenTo?

    daviddavid

    alert?

    daviddavid
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/reviews/views.py
          reviewboard/settings.py
          reviewboard/reviews/urls.py
        Ignored Files:
          reviewboard/static/rb/js/views/draftReviewBannerView.js
          reviewboard/static/rb/css/reviews.less
          reviewboard/static/rb/js/views/tests/draftReviewBannerViewTests.js
          reviewboard/static/rb/js/views/tests/reviewDialogViewTests.js
          reviewboard/static/rb/js/views/reviewDialogView.js
          reviewboard/static/rb/js/reviews.js
          reviewboard/templates/reviews/review_draft_inline_form.html
      
      
    2. 
        
    david
    1. 
        
    2. reviewboard/static/rb/js/views/reviewDialogView.js (Diff revision 1)
       
       
       
       
       
      Show all issues
      For now (until we use require.js), can we wrap everything in an anonymous function to avoid polluting the global namespace?
    3. Show all issues
      If this gets called before render() it'll raise an exception. Can you check whether these are null?
      1. I could, but they won't be called before render. They're internal only and only called during save(). I'm not sure it's worth the extra code in this case unless we end up exposing these classes later.
    4. Show all issues
      Can we use this.listenTo?
    5. Show all issues
      this.listenTo?
    6. Show all issues
      this.listenTo?
    7. Show all issues
      alert?
    8. 
        
    chipx86
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/reviews/views.py
          reviewboard/settings.py
          reviewboard/reviews/urls.py
        Ignored Files:
          reviewboard/static/rb/js/views/draftReviewBannerView.js
          reviewboard/static/rb/css/reviews.less
          reviewboard/static/rb/js/views/tests/draftReviewBannerViewTests.js
          reviewboard/static/rb/js/views/tests/reviewDialogViewTests.js
          reviewboard/static/rb/js/views/reviewDialogView.js
          reviewboard/static/rb/js/reviews.js
          reviewboard/templates/reviews/review_draft_inline_form.html
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed