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