Merge lp:~deryck/launchpad/bugs-home-floats-etc into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: 10881
Proposed branch: lp:~deryck/launchpad/bugs-home-floats-etc
Merge into: lp:launchpad
Diff against target: 180 lines (+66/-55)
2 files modified
lib/lp/bugs/stories/bugs/xx-front-page-info.txt (+18/-1)
lib/lp/bugs/templates/bugtarget-bugs.pt (+48/-54)
To merge this branch: bzr merge lp:~deryck/launchpad/bugs-home-floats-etc
Reviewer Review Type Date Requested Status
Eleanor Berger (community) Approve
Review via email: mp+24942@code.launchpad.net

Commit message

Fix float issues and other display issues on a project's bugs home page.

Description of the change

This branch fixes bug 551915 and a few minor issues with the display of
a project's bugs home page. To fix the float issues mentioned in this
bug, the branch changes the bug supervisor and security contact info to
appear in a portlet in the sidebar. This allows us to remove float from
the elements in the main content of the page, which makes a nicer
experience when resizing the window. Nothing re-flows oddly now.

See:
http://launchpadlibrarian.net/48022236/float-right-no-open-bugs.png

I discussed this change in a pre-imp discussion with intellectronica,
who supported the approach. We originally moved this stuff out of the
portlets and into the main content for the 3.0 design, thinking we would
have clear rules for what went in portlets and eventually fade the
sidebar's use all together. This change has never been realized, and in
this case, the sidebar location makes more sense and cleans up the page.

While I was fixing this, I also fixed another couple minor issues. I
changed the language to read "no open bugs" rather than "no hot bugs"
when the page displays no bugs, which makes more sense with the way the
page works. I also fixed the page so the external bug tracker link
shows up now when specified on a project that doesn't use Launchpad for
bug tracking. I also added a bit of extra spacing around the form to
make the page scan better.

To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-info.txt'
2--- lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-04-09 16:19:25 +0000
3+++ lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-05-17 13:11:39 +0000
4@@ -100,7 +100,7 @@
5 >>> bug_list = find_tag_by_id(
6 ... anon_browser.contents, 'no-bugs-filed')
7 >>> print extract_text(bug_list)
8- There are currently no hot bugs filed against Project Uses Malone.
9+ There are currently no open bugs filed against Project Uses Malone.
10
11 But since the project has a bug, the search box is still visible.
12
13@@ -110,3 +110,20 @@
14 by status
15 ...
16 Advanced search
17+
18+Projects that use an external bug tracker will list the tracker on a
19+bugs home page in addition to the message that the project does not
20+use Launchpad for bug tracking.
21+
22+ >>> login('foo.bar@canonical.com')
23+ >>> some_tracker = factory.makeBugTracker(
24+ ... base_url='http://tracker.example.com/')
25+ >>> test_project.bugtracker = some_tracker
26+ >>> logout()
27+ >>> anon_browser.open('http://bugs.launchpad.dev/test-project')
28+ >>> uses_malone_p = find_tag_by_id(anon_browser.contents, 'no-malone')
29+ >>> print extract_text(uses_malone_p)
30+ Simple Test Project does not use Launchpad for bug tracking.
31+ >>> tracker_text = find_tag_by_id(anon_browser.contents, 'bugtracker')
32+ >>> print extract_text(tracker_text)
33+ Bugs are tracked in tracker.example.com/.
34
35=== modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt'
36--- lib/lp/bugs/templates/bugtarget-bugs.pt 2010-03-17 04:01:37 +0000
37+++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-05-17 13:11:39 +0000
38@@ -33,6 +33,43 @@
39 </li>
40 </ul>
41 </div>
42+ <div class="portlet">
43+ <dl tal:define="bug_supervisor context/bug_supervisor"
44+ id="bug-supervisor">
45+ <dt>Bug supervisor:</dt>
46+ <dd>
47+ <tal:none condition="not:bug_supervisor">None set</tal:none>
48+ <a tal:condition="bug_supervisor"
49+ tal:replace="structure bug_supervisor/fmt:link">Bob Johnson</a>
50+ <tal:edit-bug-supervisor
51+ condition="context/menu:bugs/bugsupervisor|nothing">
52+ <a tal:define="link context/menu:bugs/bugsupervisor"
53+ tal:condition="link/enabled"
54+ tal:attributes="href link/url; title link/text">
55+ <img tal:attributes="alt link/text" src="/@@/edit" />
56+ </a>
57+ </tal:edit-bug-supervisor>
58+ </dd>
59+ </dl>
60+ <dl tal:define="securitycontact context/security_contact">
61+ <dt id="bug-security">Security contact:</dt>
62+ <dd>
63+ <tal:none condition="not:securitycontact">None set</tal:none>
64+ <a tal:condition="securitycontact"
65+ tal:replace="structure securitycontact/fmt:link">
66+ Billy Anderson
67+ </a>
68+ <tal:edit-securitycontact
69+ condition="context/menu:bugs/securitycontact|nothing">
70+ <a tal:define="link context/menu:bugs/securitycontact"
71+ tal:condition="link/enabled"
72+ tal:attributes="href link/url; title link/text">
73+ <img tal:attributes="alt link/text" src="/@@/edit" />
74+ </a>
75+ </tal:edit-securitycontact>
76+ </dd>
77+ </dl>
78+ </div>
79 <div tal:replace="structure context/@@+portlet-bugfilters" />
80 <div tal:replace="structure context/@@+portlet-bugtags" />
81 <tal:releasecriticalbugs
82@@ -46,58 +83,11 @@
83 tal:define="search_url string:+bugs;
84 advanced_search_url string:+bugs?advanced=1">
85
86+
87+
88 <tal:uses_malone condition="view/uses_launchpad_bugtracker">
89- <div class="portlet" style="float: right; border: none">
90- <ul>
91- <li id="bugtracker" tal:condition="not: view/uses_launchpad_bugtracker">
92- <strong>Bug tracker:</strong><br />
93- <span style="margin-left: 1em">
94- <tal:bugtracker replace="structure view/bugtracker" />
95- </span>
96- </li>
97- <li id="bug-supervisor"
98- tal:define="bug_supervisor context/bug_supervisor">
99- Bug supervisor:<br />
100- <span style="margin-left: 1em">
101- <tal:none condition="not:bug_supervisor">None set</tal:none>
102- <a tal:condition="bug_supervisor"
103- tal:replace="structure bug_supervisor/fmt:link">Bob Johnson</a>
104- <tal:edit-bug-supervisor
105- condition="context/menu:bugs/bugsupervisor|nothing">
106- <a tal:define="link context/menu:bugs/bugsupervisor"
107- tal:condition="link/enabled"
108- tal:attributes="href link/url; title link/text">
109- <img tal:attributes="alt link/text" src="/@@/edit" />
110- </a>
111- </tal:edit-bug-supervisor>
112- </span>
113- </li>
114- <li id="bug-security"
115- tal:define="securitycontact context/security_contact">
116- Security contact:<br />
117- <span style="margin-left: 1em">
118- <tal:none condition="not:securitycontact">None set</tal:none>
119- <a tal:condition="securitycontact"
120- tal:replace="structure securitycontact/fmt:link">
121- Billy Anderson
122- </a>
123- <tal:edit-securitycontact
124- condition="context/menu:bugs/securitycontact|nothing">
125- <a tal:define="link context/menu:bugs/securitycontact"
126- tal:condition="link/enabled"
127- tal:attributes="href link/url; title link/text">
128- <img tal:attributes="alt link/text" src="/@@/edit" />
129- </a>
130- </tal:edit-securitycontact>
131- </span>
132- </li>
133- <li>
134- </li>
135- </ul>
136- </div>
137-
138 <tal:has_bugtasks condition="context/has_bugtasks">
139- <div class="search-box">
140+ <div class="search-box" style="margin-bottom:2em">
141 <metal:search
142 use-macro="context/@@+bugtarget-macros-search/simple-search-form"
143 />
144@@ -108,7 +98,7 @@
145 </tal:has_bugtasks>
146
147 <tal:has_hot_bugs condition="view/hot_bugs_info/bugtasks">
148- <h2 style="margin-top: 1em">Hot bugs</h2>
149+ <h2>Hot bugs</h2>
150
151 <table class="listing" id="hot-bugs"
152 tal:define="show_package python: 'packagename' in view.columns_to_show
153@@ -157,20 +147,24 @@
154
155 <tal:no_hot_bugs condition="not: view/hot_bugs_info/bugtasks">
156 <p id="no-bugs-filed"><strong>There are currently no
157- <span tal:condition="context/has_bugtasks">hot</span> bugs filed
158+ <span tal:condition="context/has_bugtasks">open</span> bugs filed
159 against <tal:project_title replace="context/title" />.</strong></p>
160
161 <p id="no-bugs-report"><a href="+filebug">Report a bug.</a></p>
162 </tal:no_hot_bugs>
163 </tal:uses_malone>
164
165- <tal:not_uses_malone condition="not: view/uses_launchpad_bugtracker">
166+ <tal:not_uses_malone condition="not: view/uses_launchpad_bugtracker"
167+ tal:define ="configure_bugtracker context/menu:overview/configure_bugtracker | nothing">
168 <p id="no-malone"><strong><tal:project_title replace="context/title" /> does not use Launchpad for
169 bug tracking.</strong></p>
170+ <p tal:condition="view/external_bugtracker"
171+ id="bugtracker"><strong>Bugs are tracked in
172+ <tal:bugtracker replace="structure view/bugtracker" />.</strong>
173+ </p>
174
175 <p tal:condition="context/required:launchpad.Edit"
176 id="no-malone-edit"
177- tal:define ="configure_bugtracker context/menu:overview/configure_bugtracker | nothing"
178 >
179 <a tal:condition="configure_bugtracker"
180 tal:replace="structure configure_bugtracker/fmt:link"/>