• 
      

    Fix setting the height of the review request box for long fields.

    Review Request #6154 — Created July 28, 2014 and submitted

    Information

    Review Board
    master
    bd6ec5c...

    Reviewers

    The fixes to set the proper widths of the fields broke the heights.
    It removed the defer() call and replaced it with a throttle(). The
    defer() is important to the calculations, though, since we schedule a
    layout resize after closing CodeMirror fields but before all layout has
    settled.

    This restores the original _scheduleResizeLayout() function and adds the
    throttle there.

    Tested adding a lot of text to the Description field and closing it. It no
    longer resulted in the text fields overflowing out of the review request box.

    Tested adding lots of text to the Branch field. Didn't see it cause any
    overflow issues.

    Resized the window. Didn't see any performance issues.

    Description From Last Updated

    This is kind of very wrong. The 100 should be an argument to _.throttle instead of _.defer, and you're missing …

    daviddavid
    reviewbot
    1. Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
      
      
      
      Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
      
      
    2. 
        
    david
    1. 
        
    2. Show all issues

      This is kind of very wrong. The 100 should be an argument to _.throttle instead of _.defer, and you're missing a period in this._checkResizeLayout. Are you sure you tested this?

      1. This was a very bad merge job on my part. I had this implemented in another change by doing this._scheduleResizeLayout = ... like it was before this change, and that was working and was correct. I then tried moving it out into its own function and removed the this._scheduleResizeLayout = ... line in this commit.

        The commit after re-introduced the line (I've been juggling some branches). That overrode the broken version in the prototype with a correct version of this. I was probably testing with that commit.

        I've now re-tested with just this commit directly off of master, and it's working.

    3. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
      
      
      
      Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
      
      
    2. 
        
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (5cb1681)