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
1=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
2--- lib/canonical/launchpad/icing/style-3-0.css 2009-11-04 17:35:50 +0000
3+++ lib/canonical/launchpad/icing/style-3-0.css 2009-11-06 22:51:12 +0000
4@@ -424,10 +424,6 @@
5 .registered {
6 font-size: 85%;
7 color: #666;
8- font-style: italic;
9- }
10-li .registered {
11- font-style: normal;
12 }
13 .description {
14 clear: both;
15
16=== modified file 'lib/lp/bugs/browser/configure.zcml'
17--- lib/lp/bugs/browser/configure.zcml 2009-10-30 12:09:16 +0000
18+++ lib/lp/bugs/browser/configure.zcml 2009-11-06 22:51:12 +0000
19@@ -487,8 +487,8 @@
20 template="../templates/bugtask-tasks-and-nominations-table-row.pt"/>
21 <browser:page
22 for="lp.bugs.interfaces.bugtask.IBugTask"
23- name="+listing-detailed"
24- template="../templates/bugtask-listing-detailed.pt"
25+ name="+bugtask-macros-listing"
26+ template="../templates/bugtask-macros-listing.pt"
27 permission="zope.Public"/>
28 <browser:page
29 name="+edit"
30
31=== renamed file 'lib/lp/bugs/templates/bugtask-listing-detailed.pt' => 'lib/lp/bugs/templates/bugtask-macros-listing.pt'
32--- lib/lp/bugs/templates/bugtask-listing-detailed.pt 2009-07-17 17:59:07 +0000
33+++ lib/lp/bugs/templates/bugtask-macros-listing.pt 2009-11-06 22:51:12 +0000
34@@ -1,28 +1,39 @@
35-<tr xmlns:tal="http://xml.zope.org/namespaces/tal">
36- <td class="icon left" tal:content="structure context/image:icon" />
37- <td>
38- <div>
39- #<span tal:replace="context/bug/id">4</span>
40- <a tal:attributes="href context/fmt:url"
41- tal:content="context/bug/title">Bug Title Here
42- </a>
43- <tal:badges replace="structure context/image:badges" />
44- </div>
45- <div class="lesser" tal:condition="hide_extra_details|nothing">
46- <tal:affected_pillars define="also_in context/other_affected_pillars"
47- condition="also_in">
48- also in
49- <tal:per_pillar repeat="pillar also_in">
50- <b tal:content="pillar/displayname" />,
51- </tal:per_pillar>
52- </tal:affected_pillars>
53- reported
54- <span
55- tal:attributes="title context/datecreated/fmt:datetime"
56- tal:content="context/datecreated/fmt:displaydate">2005-10-05</span>
57- by
58- <a tal:attributes="href context/owner/fmt:url"
59- tal:content="context/owner/displayname">Foo Bar</a>
60- </div>
61- </td>
62-</tr>
63+<metal:header
64+ xmlns:metal="http://xml.zope.org/namespaces/metal"
65+ xmlns:tal="http://xml.zope.org/namespaces/tal"
66+ define-macro="detailed">
67+ <tal:comment replace="nothing">
68+ Variables to be defined for this macro.
69+ :bugtask: (Required) BugTask that will be displayed.
70+ :show_extra_details: (Optional) Boolean determining whether
71+ to display a second line of info below the bug title.
72+ </tal:comment>
73+ <tr>
74+ <td class="icon left" tal:content="structure bugtask/image:icon" />
75+ <td>
76+ #<span tal:replace="bugtask/bug/id">4</span>
77+ <a tal:attributes="href bugtask/fmt:url"
78+ tal:content="bugtask/bug/title">Bug Title Here
79+ </a>
80+ </td>
81+ <td style="text-align: right">
82+ <tal:badges replace="structure bugtask/image:badges" />
83+ </td>
84+ </tr>
85+ <tr tal:condition="show_extra_details|nothing">
86+ <td colspan="3" style="padding-bottom: 0.5em">
87+ <div class="registered">
88+ <tal:affected_pillars define="also_in bugtask/other_affected_pillars">
89+ in <a tal:attributes="href bugtask/pillar/fmt:url"
90+ tal:content="bugtask/pillar/displayname"
91+ /><tal:comma condition="also_in">,</tal:comma>
92+ <tal:per_pillar repeat="pillar also_in">
93+ <a tal:attributes="href pillar/fmt:url"
94+ tal:content="pillar/displayname"
95+ /><tal:comma condition="not: repeat/pillar/end">,</tal:comma>
96+ </tal:per_pillar>
97+ </tal:affected_pillars>
98+ </div>
99+ </td>
100+ </tr>
101+</metal:header>
102
103=== modified file 'lib/lp/registry/browser/configure.zcml'
104--- lib/lp/registry/browser/configure.zcml 2009-10-26 19:47:59 +0000
105+++ lib/lp/registry/browser/configure.zcml 2009-11-06 22:51:12 +0000
106@@ -1770,13 +1770,6 @@
107 DistributionNavigation"/>
108 <browser:page
109 for="lp.registry.interfaces.distribution.IDistribution"
110- class="lp.registry.browser.distribution.DistributionAllPackagesView"
111- permission="zope.Public"
112- name="+allpackages"
113- facet="overview"
114- template="../templates/distribution-allpackages.pt"/>
115- <browser:page
116- for="lp.registry.interfaces.distribution.IDistribution"
117 facet="overview"
118 class="lp.registry.browser.distribution.DistributionArchiveMirrorsView"
119 permission="zope.Public"
120
121=== modified file 'lib/lp/registry/browser/distribution.py'
122--- lib/lp/registry/browser/distribution.py 2009-10-20 14:18:10 +0000
123+++ lib/lp/registry/browser/distribution.py 2009-11-06 22:51:12 +0000
124@@ -8,7 +8,6 @@
125 __all__ = [
126 'DerivativeDistributionOverviewMenu',
127 'DistributionAddView',
128- 'DistributionAllPackagesView',
129 'DistributionArchiveMirrorsRSSView',
130 'DistributionArchiveMirrorsView',
131 'DistributionArchivesView',
132@@ -296,7 +295,7 @@
133
134 usedfor = IDistribution
135 facet = 'overview'
136- links = ['edit', 'branding', 'driver', 'search', 'allpkgs', 'members',
137+ links = ['edit', 'branding', 'driver', 'search', 'members',
138 'mirror_admin', 'reassign', 'addseries', 'series', 'milestones',
139 'top_contributors',
140 'builds', 'cdimage_mirrors', 'archive_mirrors',
141@@ -360,10 +359,6 @@
142 enabled = self._userCanSeeNonPublicMirrorListings()
143 return Link('+unofficialmirrors', text, enabled=enabled, icon='info')
144
145- def allpkgs(self):
146- text = 'List all packages'
147- return Link('+allpackages', text, icon='info')
148-
149 @enabled_with_permission('launchpad.Edit')
150 def members(self):
151 text = 'Change members team'
152@@ -717,16 +712,6 @@
153 distribution=self.context)
154
155
156-class DistributionAllPackagesView(LaunchpadView):
157- """A view to show all the packages in a distribution."""
158-
159- def initialize(self):
160- results = self.context.getSourcePackageCaches()
161- self.batchnav = BatchNavigator(results, self.request)
162-
163- label = 'All packages'
164-
165-
166 class DistributionSetActionNavigationMenu(RegistryCollectionActionMenuBase):
167 """Action menu for `DistributionSetView`."""
168
169
170=== removed file 'lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt'
171--- lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt 2009-09-18 15:24:30 +0000
172+++ lib/lp/registry/stories/distribution/xx-distribution-all-packages.txt 1970-01-01 00:00:00 +0000
173@@ -1,40 +0,0 @@
174-
175- >>> print http(r"""
176- ... GET /ubuntu/+allpackages HTTP/1.1
177- ... """)
178- HTTP/1.1 200 Ok
179- ...
180- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
181- <BLANKLINE>
182- ...
183- <title>All packages...</title>
184- ...
185- <strong>1</strong>
186- &rarr;
187- <strong>5</strong>
188- of
189- 10 results
190- ...
191- <a href="...">alsa-utils</a>
192- <BLANKLINE>
193- <BLANKLINE>
194- <BLANKLINE>
195- <BLANKLINE>
196- <a href="...">cnews</a>
197- <BLANKLINE>
198- <BLANKLINE>
199- <BLANKLINE>
200- <BLANKLINE>
201- <a href="...">commercialpackage</a>
202- <BLANKLINE>
203- <BLANKLINE>
204- <BLANKLINE>
205- <BLANKLINE>
206- <a href="...">evolution</a>
207- <BLANKLINE>
208- <BLANKLINE>
209- <BLANKLINE>
210- <BLANKLINE>
211- <a href="...">foobar</a>
212- ...
213-
214
215=== removed file 'lib/lp/registry/templates/distribution-allpackages.pt'
216--- lib/lp/registry/templates/distribution-allpackages.pt 2009-09-15 01:17:46 +0000
217+++ lib/lp/registry/templates/distribution-allpackages.pt 1970-01-01 00:00:00 +0000
218@@ -1,25 +0,0 @@
219-<html
220- xmlns="http://www.w3.org/1999/xhtml"
221- xmlns:tal="http://xml.zope.org/namespaces/tal"
222- xmlns:metal="http://xml.zope.org/namespaces/metal"
223- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
224- metal:use-macro="view/macro:page/main_only"
225- i18n:domain="launchpad">
226- <body>
227- <div metal:fill-slot="main"
228- tal:define="batch view/batchnav/currentBatch">
229- <tal:navigation replace="structure view/batchnav/@@+navigation-links-upper" />
230-
231- <p>
232- <tal:per_item repeat="result batch">
233- <a tal:content="result/name"
234- tal:attributes="href result/distributionsourcepackage/fmt:url"
235- >apache2</a>
236- </tal:per_item>
237- </p>
238-
239- <tal:navigation replace="structure view/batchnav/@@+navigation-links-lower" />
240-
241- </div>
242- </body>
243-</html>
244
245=== modified file 'lib/lp/registry/templates/person-portlet-currentfocus.pt'
246--- lib/lp/registry/templates/person-portlet-currentfocus.pt 2009-09-11 19:59:54 +0000
247+++ lib/lp/registry/templates/person-portlet-currentfocus.pt 2009-11-06 22:51:12 +0000
248@@ -20,8 +20,8 @@
249
250 <table>
251 <tr tal:repeat="bugtask bugtasks">
252- <tal:define-vars define="hide_extra_details string:true">
253- <tal:task tal:replace="structure bugtask/@@+listing-detailed" />
254+ <tal:define-vars define="show_extra_details python:True">
255+ <metal:task use-macro="bugtask/@@+bugtask-macros-listing/detailed" />
256 </tal:define-vars>
257 </tr>
258 </table>

Subscribers

People subscribed via source and target branches

to status/vote changes: