• 
      

    Improve file attachment hover logic

    Review Request #7673 — Created Oct. 1, 2015 and submitted

    Information

    Review Board
    release-2.5.x

    Reviewers

    Previously, if a user put their mouse in just the right place (to the
    right of a thumbnail), all thumbnails would fade. This was because the
    condition for a thumbnail to not fade was for the mouse to be hovering
    over the .file inside. This issue has been solved by selectively
    fading out thumbnails and not fading out the entire #file-list
    container.

    This patch also replaces the use of a self = this binding in
    JavaScript with _.bind(..., this).

    Ran JS tests.

    Manually verified that placing the mouse cursor near the thumbnails no
    longer triggers the old behaviour of fading out all attachments.
    Instead, the currently hovered over attachment does not fade out but
    all other do.

    reviewbot
    1. Tool: PEP8 Style Checker
      Ignored Files:
          reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
      
      
      
      Tool: Pyflakes
      Ignored Files:
          reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
      
      
    2. 
        
    david
    1. Code looks OK on first glance but I'd like to see some manual testing of these changes in addition to the automated tests.

    2. 
        
    brennie
    david
    1. Ship It!
    2. 
        
    brennie
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.5.x (6605306)