← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~sinzui/launchpad/css-ui-1 into lp:launchpad

 

Curtis Hovey has proposed merging lp:~sinzui/launchpad/css-ui-1 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #90502 class="highlight" and class="highlighted" shouldn't coexist
  https://bugs.launchpad.net/bugs/90502
  #415267 Table header cells should not be centered
  https://bugs.launchpad.net/bugs/415267


Clean up the CSS.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/90502
        https://bugs.launchpad.net/bugs/415267
    Pre-implementation: no one
    Test command: ./bin/test -vv \
      -t distribution-views -t xx-productseries-series

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * Both classes use the base rules. There should be only one.
      The 3.0 eliminated most of the highlighted cases. polls are being
      removed, so distro mirrors are the only case

Bug #415267 [Table header cells should not be centered]
    ages with wide tables but narrow data, such as
    <https://code.launchpad.net/ubuntu/+source/hotssh>, demonstrate a mistake
    I made in designing Launchpad tables: the text in table header cells
    should not be centered.

--------------------------------------------------------------------

RULES

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * update distributionmirror-macros.pt to use highlight instead of
      highlighted
    * Remove the highligted rules from the CSS.
    * Rename dimmed to lowlight.

Bug #415267 [Table header cells should not be centered]
    * use text-align: left so that the left edge of the text in the th
      aligns with the text in the td.

QA

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * Visit https://launchpad.net/ubuntu/+cdmirrors
    * Verify the country and total are highlighted.

Bug #415267 [Table header cells should not be centered]
    * Visit any table listing in lp and verify that the table headers
      have left-aligned text.


LINT

    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/lp/answers/templates/question-listing-detailed.pt
    lib/lp/registry/browser/distribution.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/browser/tests/distribution-views.txt
    lib/lp/registry/stories/productseries/xx-productseries-series.txt
    lib/lp/registry/templates/distributionmirror-macros.pt
    lib/lp/registry/templates/productreleasefile-macros.pt
    lib/lp/registry/templates/team-editproposed.pt



IMPLEMENTATION

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    Update template to use highlight and removed highligted from css.
    Removed unhighlighted. Renamed dimmed to lowlight. Removed .series
    class because the rules are always superseded by other css rules.
    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/lp/registry/browser/distribution.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/browser/tests/distribution-views.txt
    lib/lp/registry/stories/productseries/xx-productseries-series.txt
    lib/lp/registry/templates/distributionmirror-macros.pt

Bug #415267 [Table header cells should not be centered]
    Updated the style as mpt suggested.
    lib/canonical/launchpad/icing/style-3-0.css.in
-- 
https://code.launchpad.net/~sinzui/launchpad/css-ui-1/+merge/44068
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/css-ui-1 into lp:launchpad.
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
--- lib/canonical/launchpad/icing/style-3-0.css.in	2010-12-16 15:53:37 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css.in	2010-12-17 17:11:59 +0000
@@ -537,7 +537,7 @@
     vertical-align: baseline;
     }
 thead th, tr.thead th {
-    text-align: center;
+    text-align: left;
     vertical-align: bottom;
     }
 th.icon, td.icon {
@@ -663,9 +663,6 @@
 table.listing tfoot td {
     border: 1px solid #d2d2d2;
     }
-table.listing tr.note {
-    font-size: 77%;
-    }
 table.listing th, table.listing td {
     padding: 0.25em;
     }
@@ -681,7 +678,7 @@
     border: 1px #d2d2d2;
     border-style: dotted none none none;
     }
-table.listing tr.note td {
+table.listing .note td {
     border-style: none;
     }
 table.listing img {
@@ -1469,11 +1466,20 @@
    Universal presentation
    Colors and fonts
 */
-pre .highlighted {
-    border: none;
-    padding: 0em;
-    margin: 0em;
-    }
+
+.exception {
+    color: #cc0000;
+    }
+.highlight {
+    background: #ddd;
+    border: 1px solid #ddd;
+    }
+.lowlight {
+  opacity: .5;
+  filter: alpha(opacity=50);
+  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
+}
+
 .answers-stat {
     color: #3840BE;
     }
@@ -1780,6 +1786,10 @@
 .launchpad-gold {
     color: #F8C300;
     }
+
+.discreet, .lesser, .duplicate-details {
+    font-size: 85%;
+    }
 pre.changelog, table.diff,
 .bug-comment, .bug-activity, .codereviewcomment {
     font-size: 93%;

=== modified file 'lib/canonical/launchpad/icing/style.css'
--- lib/canonical/launchpad/icing/style.css	2010-12-16 17:12:13 +0000
+++ lib/canonical/launchpad/icing/style.css	2010-12-17 17:11:59 +0000
@@ -25,6 +25,7 @@
 
 /* === Fonts and colors === */
 
+<<<<<<< TREE
 
 
 
@@ -32,6 +33,9 @@
 .exception {color: #cc0000;}
 .discreet, .lesser, .duplicate-details {font-size: 90%;}
 .extra-discreet {font-size: 75%;}
+=======
+.offline {text-align: center; margin: 2em 0;}
+>>>>>>> MERGE-SOURCE
 .unavailable {color: #999; background: none;}
 
 .duplicate-details p { padding: 0em; margin-top: 0em; margin-bottom: 0.2em; }
@@ -61,17 +65,6 @@
   .notforscreen {display:none;}
 }
 
-.highlighted, tr.highlight {background: #ddd; border: 1px solid #ddd;}
-.highlighted {padding: 0.5em;}
-.highlighted h3 {margin-top: 0;}
-.unhighlighted {padding: 0 0.5em;}
-.dimmed {
-  padding: 0 0.5em;
-  opacity: .5;
-  filter: alpha(opacity=50);
-  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
-}
-
 .debug {
   background: none;
   color: #f09;
@@ -262,7 +255,6 @@
     margin-top: 1em;
 }
 
-.product.series, .series {margin-bottom: 1em;}
 #packages h1, #projects h1 {margin-top: 1.2em;}
 
 

=== modified file 'lib/lp/answers/templates/question-listing-detailed.pt'
--- lib/lp/answers/templates/question-listing-detailed.pt	2009-07-17 17:59:07 +0000
+++ lib/lp/answers/templates/question-listing-detailed.pt	2010-12-17 17:11:59 +0000
@@ -4,7 +4,7 @@
   xmlns:i18n="http://xml.zope.org/namespaces/i18n";>
   <tal:description
     define="global description context/description/fmt:obfuscate-email/fmt:shorten/320" />
-<tr class="noted"
+<tr class="lesser"
     tal:attributes="title description">
   <td class="icon left">
     <img alt="" src="/@@/question" />
@@ -20,7 +20,7 @@
       />
       (<span tal:replace="context/status/title">Approved</span>)
     </div>
-    <div class="lesser">
+    <div>
       posted
       <span
         tal:attributes="title context/datecreated/fmt:datetime"

=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py	2010-11-28 00:47:39 +0000
+++ lib/lp/registry/browser/distribution.py	2010-12-17 17:11:59 +0000
@@ -829,13 +829,14 @@
         return all_series
 
     def getCssClass(self, series):
-        """The highlighted, unhighlighted, or dimmed CSS class."""
+        """The highlight, lowlight, or normal CSS class."""
         if series.status == SeriesStatus.DEVELOPMENT:
-            return 'highlighted'
+            return 'highlight'
         elif series.status == SeriesStatus.OBSOLETE:
-            return 'dimmed'
+            return 'lowlight'
         else:
-            return 'unhighlighted'
+            # This is normal presentation.
+            return ''
 
 
 class DistributionChangeMirrorAdminView(RegistryEditFormView):

=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py	2010-11-23 23:22:27 +0000
+++ lib/lp/registry/browser/product.py	2010-12-17 17:11:59 +0000
@@ -810,13 +810,14 @@
 
     @property
     def css_class(self):
-        """The highlighted, unhighlighted, or dimmed CSS class."""
+        """The highlight, lowlight, or normal CSS class."""
         if self.is_development_focus:
-            return 'highlighted'
+            return 'highlight'
         elif self.status == SeriesStatus.OBSOLETE:
-            return 'dimmed'
+            return 'lowlight'
         else:
-            return 'unhighlighted'
+            # This is normal presentation.
+            return ''
 
 
 class SeriesWithReleases(DecoratedSeries):

=== modified file 'lib/lp/registry/browser/tests/distribution-views.txt'
--- lib/lp/registry/browser/tests/distribution-views.txt	2010-11-29 19:08:26 +0000
+++ lib/lp/registry/browser/tests/distribution-views.txt	2010-12-17 17:11:59 +0000
@@ -306,10 +306,10 @@
 
     >>> for styled_series in view.styled_series:
     ...     print styled_series['series'].name, styled_series['css_class']
-    breezy-autotest unhighlighted
-    grumpy unhighlighted
-    hoary highlighted
-    warty unhighlighted
+    breezy-autotest
+    grumpy
+    hoary highlight
+    warty
 
 
 Distribution +ppas

=== modified file 'lib/lp/registry/stories/productseries/xx-productseries-series.txt'
--- lib/lp/registry/stories/productseries/xx-productseries-series.txt	2010-08-13 01:20:31 +0000
+++ lib/lp/registry/stories/productseries/xx-productseries-series.txt	2010-12-17 17:11:59 +0000
@@ -38,7 +38,7 @@
 it is highlighted.
 
     >>> print series_trunk['class']
-    highlighted series
+    highlight series
 
 The 1.0 series is not the focus of development, it is active, so it is not
 highlighted.
@@ -54,7 +54,7 @@
     >>> print series_1_0['class']
     unhighlighted series
 
-Any user can see that obsolete series are dimmed. Obsolete series do not
+Any user can see that obsolete series are lowlight. Obsolete series do not
 show bug status counts because it is expensive to retrieve the information.
 
     >>> series_xxx = find_tag_by_id(content, 'series-xxx')
@@ -64,4 +64,4 @@
     Use true GTK UI.
 
     >>> print series_xxx['class']
-    dimmed series
+    lowlight series

=== modified file 'lib/lp/registry/templates/distributionmirror-macros.pt'
--- lib/lp/registry/templates/distributionmirror-macros.pt	2009-12-09 19:41:23 +0000
+++ lib/lp/registry/templates/distributionmirror-macros.pt	2010-12-17 17:11:59 +0000
@@ -16,7 +16,7 @@
   <table class="listing" id="mirrors_list">
   <tbody>
     <tal:country_and_mirrors repeat="country_and_mirrors mirrors_by_country">
-      <tr class="highlighted">
+      <tr class="highlight">
         <th colspan="2" style="text-align: left"
             tal:content="country_and_mirrors/country" />
         <th style="text-align: left"
@@ -59,12 +59,12 @@
         Include a blank row after the last entry of a country to provide
         vertical spacing to separate the next country.
       </tal:comment>
-      <tr class="note">
+      <tr class="lesser">
         <td>&nbsp;</td>
       </tr>
 
     </tal:country_and_mirrors>
-    <tr class="highlighted">
+    <tr class="highlight">
       <th colspan="5" style="text-align: left; font-weight: bold;">Total</th>
     </tr>
     <tr>

=== modified file 'lib/lp/registry/templates/productreleasefile-macros.pt'
--- lib/lp/registry/templates/productreleasefile-macros.pt	2010-01-15 20:42:44 +0000
+++ lib/lp/registry/templates/productreleasefile-macros.pt	2010-12-17 17:11:59 +0000
@@ -26,7 +26,7 @@
                       define="last_downloaded lfa/last_downloaded">
         <span tal:replace="lfa/hits/fmt:intcomma">10</span>
         <br />
-        <span class="extra-discreet greyed-out">
+        <span class="lesser greyed-out">
           last downloaded
           <strong tal:condition="not:last_downloaded/days">
             today

=== modified file 'lib/lp/registry/templates/team-editproposed.pt'
--- lib/lp/registry/templates/team-editproposed.pt	2009-09-01 19:43:30 +0000
+++ lib/lp/registry/templates/team-editproposed.pt	2010-12-17 17:11:59 +0000
@@ -32,8 +32,8 @@
             <td style="text-align: left">
               <span tal:replace="structure member/fmt:link" />
               <br />
-              <span class="extra-discreet">
-                (Applied on 
+              <span class="lesser">
+                (Applied on
                 <span tal:replace="membership/date_proposed/fmt:date" />)
               </span>
             </td>