Code review comment for lp:~edwin-grubbs/launchpad/bug-234051-bug-project-info

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Barry,

Thanks for the review. In addition to your comments that I addressed
below, I added the padding that Martin asked for and the change in
badge alignment that Curtis asked for.

On Fri, Nov 6, 2009 at 12:45 PM, Barry Warsaw <email address hidden> wrote:
> Review: Approve code ui*
>> In the "Assigned bugs" portlet (person-portlet-currentfocus.pt), I added
>> a table to display the badges like other portlets do. I also added an
>> additional line that lists all the pillars that a given bug affects.
>
> This looks great.  The one question I have is why all the pillars are not
> linked?  Looking at the screenshot I see that e.g. for bug #9 Ubuntu is
> linked, but not alsa-utils, Evolution, or Mozilla Thunderbird.  How hard would
> it be to link all of those?

Not hard. I'll do that.

>> I also removed the $distribution/+allpackages page as decided in bug
>> 196322.
>>
>> I removed the italics from the "registered" css class as requested
>> in bug 465524 to fix the "Latest memberships" portlet.
>
> Yay!
>
> === modified file 'lib/canonical/launchpad/icing/style-3-0.css'
> --- lib/canonical/launchpad/icing/style-3-0.css 2009-11-04 17:35:50 +0000
> +++ lib/canonical/launchpad/icing/style-3-0.css 2009-11-06 17:30:56 +0000
>> @@ -424,10 +424,6 @@
>>  .registered {
>>      font-size: 85%;
>>      color: #666;
>> -    font-style: italic;
>> -    }
>> -li .registered {
>> -    font-style: normal;
>
> There's a subtle change here.  Not only are you deleting the italics style
> from .registered (good) but you're also adding the font-size and color styles
> to li.registered.  That might be okay, but is it what you intended?

The "li .registered" selector doesn't eliminate all the styles from
the ".registered", just the ones that are explicitely overridden
(font-style), so elements with the "registered" class inside an <li>
were already getting their font-size and color set as it is now.

>>      }
>>  .description {
>>      clear: both;
>
> === renamed file 'lib/lp/bugs/templates/bugtask-listing-detailed.pt' => 'lib/lp/bugs/templates/bugtask-macros-listing.pt'
> --- lib/lp/bugs/templates/bugtask-listing-detailed.pt   2009-07-17 17:59:07 +0000
> +++ lib/lp/bugs/templates/bugtask-macros-listing.pt     2009-11-06 17:30:56 +0000
>> @@ -1,28 +1,38 @@
>> -<tr xmlns:tal="http://xml.zope.org/namespaces/tal">
>> -  <td class="icon left" tal:content="structure context/image:icon" />
>> -  <td>
>> -    <div>
>> -      #<span tal:replace="context/bug/id">4</span>
>> -      <a tal:attributes="href context/fmt:url"
>> -         tal:content="context/bug/title">Bug Title Here
>> -      </a>
>> -      <tal:badges replace="structure context/image:badges" />
>> -    </div>
>> -    <div class="lesser" tal:condition="hide_extra_details|nothing">
>> -      <tal:affected_pillars define="also_in context/other_affected_pillars"
>> -                           condition="also_in">
>> -        also in
>> -          <tal:per_pillar repeat="pillar also_in">
>> -            <b tal:content="pillar/displayname" />,
>> -          </tal:per_pillar>
>> -        </tal:affected_pillars>
>> -      reported
>> -      <span
>> -        tal:attributes="title context/datecreated/fmt:datetime"
>> -        tal:content="context/datecreated/fmt:displaydate">2005-10-05</span>
>> -      by
>> -      <a tal:attributes="href context/owner/fmt:url"
>> -         tal:content="context/owner/displayname">Foo Bar</a>
>> -    </div>
>> -  </td>
>> -</tr>
>> +<metal:header
>> +  xmlns:metal="http://xml.zope.org/namespaces/metal"
>> +  xmlns:tal="http://xml.zope.org/namespaces/tal"
>> +  define-macro="detailed">
>> +  <tal:comment replace="nothing">
>> +    Variables to be defined for this macro.
>> +      :bugtask: (Required) BugTask that will be displayed.
>> +      :show_extra_details: (Optional) Boolean determining whether
>> +          to display a second line of info below the bug title.
>
> Very nice.  Thanks for adding this comment.
>
>> +  </tal:comment>
>> +  <tr>
>> +    <td class="icon left" tal:content="structure bugtask/image:icon" />
>> +    <td>
>> +        #<span tal:replace="bugtask/bug/id">4</span>
>> +        <a tal:attributes="href bugtask/fmt:url"
>> +          tal:content="bugtask/bug/title">Bug Title Here
>> +        </a>
>> +    </td>
>> +    <td>
>> +      <tal:badges replace="structure bugtask/image:badges" />
>> +    </td>
>> +  </tr>
>> +  <tr tal:condition="show_extra_details|nothing">
>> +    <td colspan="3">
>> +      <div class="registered">
>> +        <tal:affected_pillars define="also_in bugtask/other_affected_pillars">
>> +          in <a tal:attributes="href bugtask/pillar/fmt:url"
>> +                tal:content="bugtask/pillar/displayname"
>> +              /><tal:comma condition="also_in">,</tal:comma>
>> +            <tal:per_pillar repeat="pillar also_in">
>> +              <tal:pillar replace="pillar/displayname"
>> +                /><tal:comma condition="not: repeat/pillar/end">,</tal:comma>
>> +            </tal:per_pillar>
>> +          </tal:affected_pillars>
>> +      </div>
>> +    </td>
>> +  </tr>
>> +</metal:header>
>
> === modified file 'lib/lp/registry/browser/distribution.py'
> --- lib/lp/registry/browser/distribution.py     2009-10-20 14:18:10 +0000
> +++ lib/lp/registry/browser/distribution.py     2009-11-06 17:30:56 +0000
>> @@ -296,7 +296,7 @@
>>
>>      usedfor = IDistribution
>>      facet = 'overview'
>> -    links = ['edit', 'branding', 'driver', 'search', 'allpkgs', 'members',
>> +    links = ['edit', 'branding', 'driver', 'search', 'members',
>>               'mirror_admin', 'reassign', 'addseries', 'series', 'milestones',
>>               'top_contributors',
>>               'builds', 'cdimage_mirrors', 'archive_mirrors',
>> @@ -360,10 +360,6 @@
>>          enabled = self._userCanSeeNonPublicMirrorListings()
>>          return Link('+unofficialmirrors', text, enabled=enabled, icon='info')
>>
>> -    def allpkgs(self):
>> -        text = 'List all packages'
>> -        return Link('+allpackages', text, icon='info')
>> -
>>      @enabled_with_permission('launchpad.Edit')
>>      def members(self):
>>          text = 'Change members team'
>> @@ -717,16 +713,6 @@
>>              distribution=self.context)
>>
>>
>> -class DistributionAllPackagesView(LaunchpadView):
>
> Don't forget to remove this from the module's __all__.

Fixed.

>> -    """A view to show all the packages in a distribution."""
>> -
>> -    def initialize(self):
>> -        results = self.context.getSourcePackageCaches()
>> -        self.batchnav = BatchNavigator(results, self.request)
>> -
>> -    label = 'All packages'
>> -
>> -
>>  class DistributionSetActionNavigationMenu(RegistryCollectionActionMenuBase):
>>      """Action menu for `DistributionSetView`."""
>
>
> === modified file 'lib/lp/registry/templates/person-portlet-currentfocus.pt'
> --- lib/lp/registry/templates/person-portlet-currentfocus.pt    2009-09-11 19:59:54 +0000
> +++ lib/lp/registry/templates/person-portlet-currentfocus.pt    2009-11-06 17:30:56 +0000
>> @@ -20,8 +20,8 @@
>>
>>          <table>
>>            <tr tal:repeat="bugtask bugtasks">
>> -            <tal:define-vars define="hide_extra_details string:true">
>> -              <tal:task tal:replace="structure bugtask/@@+listing-detailed" />
>> +            <tal:define-vars define="show_extra_details python:True">
>> +              <metal:task use-macro="bugtask/@@+bugtask-macros-listing/detailed" />
>>              </tal:define-vars>
>>            </tr>
>>          </table>
>
> merge-conditional, r=me with consideration of above
> ui* with consideration of linking the other pillars
> --
> https://code.edge.launchpad.net/~edwin-grubbs/launchpad/bug-234051-bug-project-info/+merge/14556
> You are the owner of lp:~edwin-grubbs/launchpad/bug-234051-bug-project-info.
>

Here is the incremental diff.
{{{
=== modified file 'lib/lp/bugs/templates/bugtask-macros-listing.pt'
--- lib/lp/bugs/templates/bugtask-macros-listing.pt 2009-11-06 03:00:11 +0000
+++ lib/lp/bugs/templates/bugtask-macros-listing.pt 2009-11-06 22:45:49 +0000
@@ -16,20 +16,21 @@
           tal:content="bugtask/bug/title">Bug Title Here
         </a>
     </td>
- <td>
+ <td style="text-align: right">
       <tal:badges replace="structure bugtask/image:badges" />
     </td>
   </tr>
   <tr tal:condition="show_extra_details|nothing">
- <td colspan="3">
+ <td colspan="3" style="padding-bottom: 0.5em">
       <div class="registered">
         <tal:affected_pillars define="also_in bugtask/other_affected_pillars">
           in <a tal:attributes="href bugtask/pillar/fmt:url"
                 tal:content="bugtask/pillar/displayname"
               /><tal:comma condition="also_in">,</tal:comma>
             <tal:per_pillar repeat="pillar also_in">
- <tal:pillar replace="pillar/displayname"
- /><tal:comma condition="not: repeat/pillar/end">,</tal:comma>
+ <a tal:attributes="href pillar/fmt:url"
+ tal:content="pillar/displayname"
+ /><tal:comma condition="not: repeat/pillar/end">,</tal:comma>
             </tal:per_pillar>
           </tal:affected_pillars>
       </div>

=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2009-11-05 17:29:59 +0000
+++ lib/lp/registry/browser/distribution.py 2009-11-06 20:01:05 +0000
@@ -8,7 +8,6 @@
 __all__ = [
     'DerivativeDistributionOverviewMenu',
     'DistributionAddView',
- 'DistributionAllPackagesView',
     'DistributionArchiveMirrorsRSSView',
     'DistributionArchiveMirrorsView',
     'DistributionArchivesView',
}}}

« Back to merge proposal