• 
      

    Improve the styling of the summary state labels in the datagrids.

    Review Request #7228 — Created April 17, 2015 and submitted

    Information

    Review Board
    release-2.5.x
    04b6878...

    Reviewers

    The summary labels ("Draft", "Submitted", "Discarded") were just simple
    text prefixes before, which were a bit ugly with the new datagrids, and
    didn't do a great job of standing out.
    
    This adds some styling to those to make them appear as little labels.
    They're placed to the left of the text block, and each have their own
    distinct color.
    
    The summary text retains its own solid block. It no longer wraps below
    the label, but instead stays to the right of it. It also has some
    additional line spacing, helping to improve readability when it does
    wrap.
    
    I also changed the "No Summary" text to be slightly faded out, so that
    it doesn't blend in with actual summaries as easily.

    Tested the labels at various widths, to ensure the wrapping was correct
    an the default state was correct.


    Description From Last Updated

    'format_html_join' imported but unused

    reviewbotreviewbot

    Can we format as: display_data += ('<label class="%s">%s</label>' % labels[label], label)

    brenniebrennie

    Blank line between tehse.

    brenniebrennie

    Can we use <span class="..."> rather than <i>?

    daviddavid
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/datagrids/columns.py
      
      Ignored Files:
          reviewboard/static/rb/css/ui/datagrids.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/css/common.less
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/datagrids/columns.py
      
      Ignored Files:
          reviewboard/static/rb/css/ui/datagrids.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/css/common.less
      
      
    2. reviewboard/datagrids/columns.py (Diff revision 1)
       
       
      Show all issues
       'format_html_join' imported but unused
      
    3. 
        
    brennie
    1. 
        
    2. reviewboard/datagrids/columns.py (Diff revision 1)
       
       
       
      Show all issues

      Can we format as:

              display_data += ('<label class="%s">%s</label>'
                               % labels[label], label)
      
    3. reviewboard/datagrids/columns.py (Diff revision 1)
       
       
       
      Show all issues

      Blank line between tehse.

    4. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/datagrids/columns.py
      
      Ignored Files:
          reviewboard/static/rb/css/ui/datagrids.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/css/common.less
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/datagrids/columns.py
      
      Ignored Files:
          reviewboard/static/rb/css/ui/datagrids.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/css/common.less
      
      
    2. 
        
    brennie
    1. 
        
    2. reviewboard/datagrids/columns.py (Diff revisions 1 - 2)
       
       
       
       

      Out of curiousity, any reason not to use

      display_data += format_html_join('', '<label class={}>{}</label>', (
          (label_class, label)
          for label, label_class in six.iteritems(labels)
      ))
      

      Wouldn't that be more efficient than multiple concatentations?

    3. 
        
    david
    1. 
        
    2. reviewboard/datagrids/columns.py (Diff revision 2)
       
       
      Show all issues

      Can we use <span class="..."> rather than <i>?

    3. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/datagrids/columns.py
      
      Ignored Files:
          reviewboard/static/rb/css/ui/datagrids.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/css/common.less
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/datagrids/columns.py
      
      Ignored Files:
          reviewboard/static/rb/css/ui/datagrids.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/css/common.less
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.5.x (c14d120)