Merge lp:~edwin-grubbs/launchpad/bug-234051-bug-project-info into lp:launchpad/db-devel

Proposed by Edwin Grubbs
Status: Merged
Approved by: Edwin Grubbs
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~edwin-grubbs/launchpad/bug-234051-bug-project-info
Merge into: lp:launchpad/db-devel
Diff against target: 258 lines (+44/-124)
8 files modified
lib/canonical/launchpad/icing/style-3-0.css (+0/-4)
lib/lp/bugs/browser/configure.zcml (+2/-2)
lib/lp/bugs/templates/bugtask-macros-listing.pt (+39/-28)
lib/lp/registry/browser/configure.zcml (+0/-7)
lib/lp/registry/browser/distribution.py (+1/-16)
lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt (+0/-40)
lib/lp/registry/templates/distribution-allpackages.pt (+0/-25)
lib/lp/registry/templates/person-portlet-currentfocus.pt (+2/-2)
To merge this branch: bzr merge lp:~edwin-grubbs/launchpad/bug-234051-bug-project-info
Reviewer Review Type Date Requested Status
Curtis Hovey (community) ui Approve
Martin Albisetti (community) ui Approve
Barry Warsaw (community) code ui* Approve
Canonical Launchpad Engineering code Pending
Review via email: mp+14556@code.launchpad.net

Commit message

Added pillar info below the bug portlet on the person index page.

To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

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.

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.

Here is a screenshot for the UI review.
https://chinstrap.canonical.com/~egrubbs/bugs_with_pillar_info_and_latest_memberships_without_italics.png

Implementation details
----------------------

I converted the bugtask-listing-detailed.pt page into a macro so that
the show_extra_details variable could be passed in.
    lib/lp/bugs/templates/bugtask-macros-listing.pt

Tests
-----

The only test changes that were necessary were to remove some for
the deleted +allpackages page.

Demo and Q/A
------------

* Open http://launchpad.dev/~name16

Revision history for this message
Barry Warsaw (barry) wrote :
Download full text (6.7 KiB)

> 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?

> 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?

> }
> .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 in...

Read more...

review: Approve (code ui*)
Revision history for this message
Martin Albisetti (beuno) wrote :

+1 on barry's comments, and I would also add some bottom padding to after each item (not a lot, maybe 0.5-1em).

review: Approve (ui)
Revision history for this message
Curtis Hovey (sinzui) wrote :

Hi Edwin.

I looked at the screenshot. I think alignment of the badges is hard to scan. I know that badges are often aligned to the right and playout in a fixed order so that the milestone badges always align. Consider your own profile page where most bugs will have a milestone, and a few will have branches.

review: Needs Information (ui)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :
Download full text (9.4 KiB)

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:datet...

Read more...

Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you very much for fixing some many irksome problems. I know it was trying to reconcile all these little issues. I really appreciate this fix.

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 22:51:12 +0000
@@ -424,10 +424,6 @@
424.registered {424.registered {
425 font-size: 85%;425 font-size: 85%;
426 color: #666;426 color: #666;
427 font-style: italic;
428 }
429li .registered {
430 font-style: normal;
431 }427 }
432.description {428.description {
433 clear: both;429 clear: both;
434430
=== modified file 'lib/lp/bugs/browser/configure.zcml'
--- lib/lp/bugs/browser/configure.zcml 2009-10-30 12:09:16 +0000
+++ lib/lp/bugs/browser/configure.zcml 2009-11-06 22:51:12 +0000
@@ -487,8 +487,8 @@
487 template="../templates/bugtask-tasks-and-nominations-table-row.pt"/>487 template="../templates/bugtask-tasks-and-nominations-table-row.pt"/>
488 <browser:page488 <browser:page
489 for="lp.bugs.interfaces.bugtask.IBugTask"489 for="lp.bugs.interfaces.bugtask.IBugTask"
490 name="+listing-detailed"490 name="+bugtask-macros-listing"
491 template="../templates/bugtask-listing-detailed.pt"491 template="../templates/bugtask-macros-listing.pt"
492 permission="zope.Public"/>492 permission="zope.Public"/>
493 <browser:page493 <browser:page
494 name="+edit"494 name="+edit"
495495
=== 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 22:51:12 +0000
@@ -1,28 +1,39 @@
1<tr xmlns:tal="http://xml.zope.org/namespaces/tal">1<metal:header
2 <td class="icon left" tal:content="structure context/image:icon" />2 xmlns:metal="http://xml.zope.org/namespaces/metal"
3 <td>3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 <div>4 define-macro="detailed">
5 #<span tal:replace="context/bug/id">4</span>5 <tal:comment replace="nothing">
6 <a tal:attributes="href context/fmt:url"6 Variables to be defined for this macro.
7 tal:content="context/bug/title">Bug Title Here7 :bugtask: (Required) BugTask that will be displayed.
8 </a>8 :show_extra_details: (Optional) Boolean determining whether
9 <tal:badges replace="structure context/image:badges" />9 to display a second line of info below the bug title.
10 </div>10 </tal:comment>
11 <div class="lesser" tal:condition="hide_extra_details|nothing">11 <tr>
12 <tal:affected_pillars define="also_in context/other_affected_pillars"12 <td class="icon left" tal:content="structure bugtask/image:icon" />
13 condition="also_in">13 <td>
14 also in 14 #<span tal:replace="bugtask/bug/id">4</span>
15 <tal:per_pillar repeat="pillar also_in">15 <a tal:attributes="href bugtask/fmt:url"
16 <b tal:content="pillar/displayname" />,16 tal:content="bugtask/bug/title">Bug Title Here
17 </tal:per_pillar>17 </a>
18 </tal:affected_pillars>18 </td>
19 reported19 <td style="text-align: right">
20 <span20 <tal:badges replace="structure bugtask/image:badges" />
21 tal:attributes="title context/datecreated/fmt:datetime"21 </td>
22 tal:content="context/datecreated/fmt:displaydate">2005-10-05</span>22 </tr>
23 by23 <tr tal:condition="show_extra_details|nothing">
24 <a tal:attributes="href context/owner/fmt:url"24 <td colspan="3" style="padding-bottom: 0.5em">
25 tal:content="context/owner/displayname">Foo Bar</a>25 <div class="registered">
26 </div>26 <tal:affected_pillars define="also_in bugtask/other_affected_pillars">
27 </td>27 in <a tal:attributes="href bugtask/pillar/fmt:url"
28</tr>28 tal:content="bugtask/pillar/displayname"
29 /><tal:comma condition="also_in">,</tal:comma>
30 <tal:per_pillar repeat="pillar also_in">
31 <a tal:attributes="href pillar/fmt:url"
32 tal:content="pillar/displayname"
33 /><tal:comma condition="not: repeat/pillar/end">,</tal:comma>
34 </tal:per_pillar>
35 </tal:affected_pillars>
36 </div>
37 </td>
38 </tr>
39</metal:header>
2940
=== modified file 'lib/lp/registry/browser/configure.zcml'
--- lib/lp/registry/browser/configure.zcml 2009-10-26 19:47:59 +0000
+++ lib/lp/registry/browser/configure.zcml 2009-11-06 22:51:12 +0000
@@ -1770,13 +1770,6 @@
1770 DistributionNavigation"/>1770 DistributionNavigation"/>
1771 <browser:page1771 <browser:page
1772 for="lp.registry.interfaces.distribution.IDistribution"1772 for="lp.registry.interfaces.distribution.IDistribution"
1773 class="lp.registry.browser.distribution.DistributionAllPackagesView"
1774 permission="zope.Public"
1775 name="+allpackages"
1776 facet="overview"
1777 template="../templates/distribution-allpackages.pt"/>
1778 <browser:page
1779 for="lp.registry.interfaces.distribution.IDistribution"
1780 facet="overview"1773 facet="overview"
1781 class="lp.registry.browser.distribution.DistributionArchiveMirrorsView"1774 class="lp.registry.browser.distribution.DistributionArchiveMirrorsView"
1782 permission="zope.Public"1775 permission="zope.Public"
17831776
=== 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 22:51:12 +0000
@@ -8,7 +8,6 @@
8__all__ = [8__all__ = [
9 'DerivativeDistributionOverviewMenu',9 'DerivativeDistributionOverviewMenu',
10 'DistributionAddView',10 'DistributionAddView',
11 'DistributionAllPackagesView',
12 'DistributionArchiveMirrorsRSSView',11 'DistributionArchiveMirrorsRSSView',
13 'DistributionArchiveMirrorsView',12 'DistributionArchiveMirrorsView',
14 'DistributionArchivesView',13 'DistributionArchivesView',
@@ -296,7 +295,7 @@
296295
297 usedfor = IDistribution296 usedfor = IDistribution
298 facet = 'overview'297 facet = 'overview'
299 links = ['edit', 'branding', 'driver', 'search', 'allpkgs', 'members',298 links = ['edit', 'branding', 'driver', 'search', 'members',
300 'mirror_admin', 'reassign', 'addseries', 'series', 'milestones',299 'mirror_admin', 'reassign', 'addseries', 'series', 'milestones',
301 'top_contributors',300 'top_contributors',
302 'builds', 'cdimage_mirrors', 'archive_mirrors',301 'builds', 'cdimage_mirrors', 'archive_mirrors',
@@ -360,10 +359,6 @@
360 enabled = self._userCanSeeNonPublicMirrorListings()359 enabled = self._userCanSeeNonPublicMirrorListings()
361 return Link('+unofficialmirrors', text, enabled=enabled, icon='info')360 return Link('+unofficialmirrors', text, enabled=enabled, icon='info')
362361
363 def allpkgs(self):
364 text = 'List all packages'
365 return Link('+allpackages', text, icon='info')
366
367 @enabled_with_permission('launchpad.Edit')362 @enabled_with_permission('launchpad.Edit')
368 def members(self):363 def members(self):
369 text = 'Change members team'364 text = 'Change members team'
@@ -717,16 +712,6 @@
717 distribution=self.context)712 distribution=self.context)
718713
719714
720class DistributionAllPackagesView(LaunchpadView):
721 """A view to show all the packages in a distribution."""
722
723 def initialize(self):
724 results = self.context.getSourcePackageCaches()
725 self.batchnav = BatchNavigator(results, self.request)
726
727 label = 'All packages'
728
729
730class DistributionSetActionNavigationMenu(RegistryCollectionActionMenuBase):715class DistributionSetActionNavigationMenu(RegistryCollectionActionMenuBase):
731 """Action menu for `DistributionSetView`."""716 """Action menu for `DistributionSetView`."""
732717
733718
=== removed file 'lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt'
--- lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt 2009-09-18 15:24:30 +0000
+++ lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
1
2 >>> print http(r"""
3 ... GET /ubuntu/+allpackages HTTP/1.1
4 ... """)
5 HTTP/1.1 200 Ok
6 ...
7 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
8 <BLANKLINE>
9 ...
10 <title>All packages...</title>
11 ...
12 <strong>1</strong>
13 &rarr;
14 <strong>5</strong>
15 of
16 10 results
17 ...
18 <a href="...">alsa-utils</a>
19 <BLANKLINE>
20 <BLANKLINE>
21 <BLANKLINE>
22 <BLANKLINE>
23 <a href="...">cnews</a>
24 <BLANKLINE>
25 <BLANKLINE>
26 <BLANKLINE>
27 <BLANKLINE>
28 <a href="...">commercialpackage</a>
29 <BLANKLINE>
30 <BLANKLINE>
31 <BLANKLINE>
32 <BLANKLINE>
33 <a href="...">evolution</a>
34 <BLANKLINE>
35 <BLANKLINE>
36 <BLANKLINE>
37 <BLANKLINE>
38 <a href="...">foobar</a>
39 ...
40
410
=== removed file 'lib/lp/registry/templates/distribution-allpackages.pt'
--- lib/lp/registry/templates/distribution-allpackages.pt 2009-09-15 01:17:46 +0000
+++ lib/lp/registry/templates/distribution-allpackages.pt 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
1<html
2 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 metal:use-macro="view/macro:page/main_only"
7 i18n:domain="launchpad">
8 <body>
9 <div metal:fill-slot="main"
10 tal:define="batch view/batchnav/currentBatch">
11 <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />
12
13 <p>
14 <tal:per_item repeat="result batch">
15 <a tal:content="result/name"
16 tal:attributes="href result/distributionsourcepackage/fmt:url"
17 >apache2</a>
18 </tal:per_item>
19 </p>
20
21 <tal:navigation replace="structure view/batchnav/@@+navigation-links-lower" />
22
23 </div>
24 </body>
25</html>
260
=== 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 22:51:12 +0000
@@ -20,8 +20,8 @@
2020
21 <table>21 <table>
22 <tr tal:repeat="bugtask bugtasks">22 <tr tal:repeat="bugtask bugtasks">
23 <tal:define-vars define="hide_extra_details string:true">23 <tal:define-vars define="show_extra_details python:True">
24 <tal:task tal:replace="structure bugtask/@@+listing-detailed" />24 <metal:task use-macro="bugtask/@@+bugtask-macros-listing/detailed" />
25 </tal:define-vars>25 </tal:define-vars>
26 </tr>26 </tr>
27 </table>27 </table>

Subscribers

People subscribed via source and target branches

to status/vote changes: