Diff expansion controls now have a delay before appearing.

Review Request #6583 — Created Nov. 13, 2014 and submitted

Information

Review Board
master
d348519...

Reviewers

Diff fragment expansion controls will only expand if the mouse hovers
over the diff fragment for a half of a second. This unifies behaviour
in Firefox in Chrome so that when you scroll down a review request,
the diff fragment controls won't expand as you scroll by.

Scrolling to a diff fragment and stopping now works correctly in both
Firefox and Chrome. That is, the diff fragment will expand as long as
the mouse stays it for half of a second.

The diffFragmentQueueView now maintains the number of mouse watchers
so that multiple mouse move event handlers are not added and the event
handler is only removed once there are no active mouse watchers. This
behaviour is used in the case of multiple diff fragment expansion
events and/or scrolling over diff fragments occuring near the same
time.

Verified in Firefox, Chrome, and Safari.

Description From Last Updated

I know it was this way before, but can you change this to: this._mouse = { x: ..., y: ..., …

chipx86chipx86

Given the number of arguments to these functions, can you format this more like: _.delay( _.bind(function() { ... }, this), …

chipx86chipx86

There's an extra space before "mouse".

chipx86chipx86

These should be lowercase.

chipx86chipx86
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/diffFragmentQueueView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/diffFragmentQueueView.js
    
    
  2. 
      
brennie
brennie
chipx86
  1. 
      
  2. I know it was this way before, but can you change this to:

    this._mouse = {
        x: ...,
        y: ...,
        ...
    };
    
  3. reviewboard/static/rb/js/views/diffFragmentQueueView.js (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     

    Given the number of arguments to these functions, can you format this more like:

    _.delay(
        _.bind(function() {
            ...
        }, this),
        this._timeout);
    
  4. There's an extra space before "mouse".

  5. These should be lowercase.

  6. 
      
brennie
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/diffFragmentQueueView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/diffFragmentQueueView.js
    
    
  2. 
      
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (3827bc8)
Loading...