For edit icons on inline editors, use CSS visibility instead of display.

Review Request #4503 — Created Aug. 28, 2013 and submitted

Information

Djblets
master

Reviewers

For edit icons on inline editors, use CSS visibility instead of display.

We try to use CSS min-height on the labels for inline editors to keep them the
same height when the edit icon disappears, which works for the most part,
except many browsers think that the text baseline moves, which still makes the
text jump by a pixel or two.

This change alters our javascript to manipulate the visibility parameter of the
icon rather than just calling .show() and .hide(), which retains space for the
element on the page.
Opened and closed a bunch of inline editors and saw it be silky smooth.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
      Ignored Files:
        djblets/media/js/jquery.gravy.js
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
      Ignored Files:
        djblets/media/js/jquery.gravy.js
    
    
  2. 
      
chipx86
  1. 
      
  2. djblets/media/js/jquery.gravy.js (Diff revision 1)
     
     
    Is this the default fadeOut? Or does this change the animation style? I think it uses 'linear' by default.
    1. This is the default for just about all of jquery's animations.
    2. Okay, sounds good then.
  3. 
      
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (0579e62).