Code review comment for lp://staging/~allenap/launchpad/ui-convert-bug-tracker-3.0-bug-418155-pt2

Revision history for this message
Gavin Panella (allenap) wrote :

On Tue, 01 Sep 2009 11:43:19 -0000
Michael Nelson <email address hidden> wrote:

> Review: Needs Fixing ui
> > To walk through the UI, try:
>
> Thanks for providing these walk-throughs... much easier to review!
> I'll start doing that too. And sorry for the two 'needs fixing'
> reviews! The pages really do look great (we initially tried to
> re-use our soyuz context portlets in the same way), but afaik, it's
> left-over from 1.0 (or maybe I'm confused at that point - I wasn't
> around then), but it's not meant to be in the 3.0 side-bar.

No worries about the needs-fixing. They need fixing! :)

>
> >
> > * Go to the bug trackers page (for IBugTrackerSet) at
> > <https://bugs.launchpad.dev/bugs/bugtrackers>,
> >
> > * There's nothing new in this page for this branch, so just click on
> > "This Mozilla.prg Bug Tracker" to see its overview page,
> >
> > * Look at the portlets. The top portlet replicates some of the info
> > that's in the page, but it is used elsewhere in Launchpad so it's
> > useful to keep.
>
> See comments on the first MP. I think it's really 1.0 templates
> trying to be forced into the 3.0 mold (I tried the same thing with
> some soyuz pages and got rejected ;) ).

Yes, I've removed all the side portlets from all of the bug tracker
pages; they don't make sense anywhere. The navigation menu for the bug
tracker index page remains.

>
> >
> > * Click "Change details",
> >
> > * This is one place where the details portlet is useful.
>
> Well, not really - the only extra information presented in the
> portlet is not really relevant to the person editing the watch?
> Otherwise it's just duplicated info, and as mentioned in the
> previous MP, afaik, isn't the type of content that is meant to go in
> the side portlet. I'd recommend using main_only for this template,
> you might even be able to get rid of the template and use
> generic-edit.pt?

I'd not heard of generic-edit before; it'll be handy for the
future. However, I don't think it'll be suitable here because the edit
page has some blurb at the beginning, including an explanation of why
a particular bug tracker cannot be deleted (which is not static).

>
> >
> > * Use the new cancel link to return to the previous page,
>
> Great!
>
> >
> > * Notice the new h1 title and h2 "Summary" heading,
>
> Great! Note that both of these above two points will happen
> automatically with generic-edit.
>
> >
> > * Append /42 to the URL and see the remote bug index page, including
> > the h2 "Is watched by..." and the new text. I think the text is
> > good, but the heading was a tough one. I'm simply still not sure
> > exactly how to use the heading slot.
>
>
> Yeah, it's been confusing and could change again - but afaik, you've
> done the right thing for the current rules (ie. this is an +index
> page, so putting an <h1>context.title</h1> is correct).
>
> I'm not so sure about "Is watched by...". I think this h2 shouldn't
> be a continuation of a sentance. In fact, I'm not even sure that the
> h2 is necessary. I know I'm looking at the Remote bug #42 for the
> Mozilla.org bug tracker, and your overview para tells me exactly
> what I need to know.

I've removed the h2. You're right, the page does not need it at
all. I've also changed the table - which contained one sparsely filled
column - to a ul, and have switched the custom formatted bug links to
use fmt:link (except in the case of private bugs, which do still have
custom formatting, but it's pretty simple and does now use sprites).

>
> And again, I don't think we can put the context details portlet in
> the side-bar (it was requested for 1.0 and afaik meant to be removed
> for 2.0(?) and doesn't belong in the side-bar for 3.0).

I've killed it!

I've attached post-ui-review.diff, which covers the changes made
following your UI review of both this branch and the parent branch.

1=== modified file 'lib/lp/bugs/browser/configure.zcml'
2--- lib/lp/bugs/browser/configure.zcml 2009-08-28 12:57:41 +0000
3+++ lib/lp/bugs/browser/configure.zcml 2009-09-01 14:31:18 +0000
4@@ -740,6 +740,9 @@
5 <browser:page
6 name="+portlet-projects"
7 template="../templates/bugtracker-portlet-projects.pt"/>
8+ <browser:page
9+ name="+portlet-watches"
10+ template="../templates/bugtracker-portlet-watches.pt"/>
11 </browser:pages>
12 <browser:page
13 name="+edit"
14
15=== modified file 'lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt'
16--- lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-08-28 12:57:41 +0000
17+++ lib/lp/bugs/stories/bugtracker/bugtrackers-index.txt 2009-09-01 16:19:33 +0000
18@@ -147,17 +147,3 @@
19 >>> user_browser.getLink("Register another bug tracker").click()
20 >>> user_browser.url
21 'http://bugs.launchpad.dev/bugs/bugtrackers/+newbugtracker'
22-
23-In fact, the link is there twice: once at the top of the page, once at
24-the bottom.
25-
26- >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers')
27- >>> links = find_tags_by_class(
28- ... user_browser.contents, 'menu-link-newbugtracker')
29- >>> len(links)
30- 2
31-
32- >>> for link in links:
33- ... print extract_text(link)
34- Register another bug tracker
35- Register another bug tracker
36
37=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt'
38--- lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt 2009-08-28 15:43:29 +0000
39+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker-remote-bug.txt 2009-09-01 16:47:37 +0000
40@@ -24,9 +24,9 @@
41 * Answers - http://answers.launchpad.dev/
42 Main heading: Remote Bug #42 in The Mozilla.org Bug Tracker
43
44- >>> print_table(find_tag_by_id(browser.contents, 'watchedbugs'))
45- #1: Firefox does not support SVG
46- #2: Blackhole Trash folder
47+ >>> print extract_text(find_tag_by_id(browser.contents, 'watchedbugs'))
48+ Bug #1: Firefox does not support SVG
49+ Bug #2: Blackhole Trash folder
50
51 If there is only a single bug watching the remote bug, then we skip
52 the list page and redirect the user directly to that bug's page:
53@@ -80,16 +80,16 @@
54 * Answers - http://answers.launchpad.dev/
55 Main heading: Remote Bug #42 in The Mozilla.org Bug Tracker
56
57- >>> print_table(find_tag_by_id(anon_browser.contents, 'watchedbugs'))
58- #1: Private bug
59- #2: Blackhole Trash folder
60+ >>> print extract_text(find_tag_by_id(anon_browser.contents, 'watchedbugs'))
61+ Bug #1: (Private)
62+ Bug #2: Blackhole Trash folder
63
64 The bug title is still provided if the user can view the private bug:
65
66 >>> browser.open('http://launchpad.dev/bugs/bugtrackers/mozilla.org/42')
67- >>> print_table(find_tag_by_id(browser.contents, 'watchedbugs'))
68- #1: Firefox does not support SVG
69- #2: Blackhole Trash folder
70+ >>> print extract_text(find_tag_by_id(browser.contents, 'watchedbugs'))
71+ Bug #1: Firefox does not support SVG
72+ Bug #2: Blackhole Trash folder
73
74 For the case where the private bug is the only one watching the given
75 remote bug, we don't perform the redirect ahead of time:
76
77=== modified file 'lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt'
78--- lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2009-08-28 14:09:24 +0000
79+++ lib/lp/bugs/stories/bugtracker/xx-bugtracker.txt 2009-09-01 15:20:28 +0000
80@@ -677,15 +677,13 @@
81
82 >>> user_browser.open('http://launchpad.dev/bugs/bugtrackers/email')
83 >>> print extract_text(find_portlet(
84- ... user_browser.contents, 'Email bugtracker'))
85- Email bugtracker
86- Location:
87+ ... user_browser.contents, 'Details'))
88+ Details
89+ Location
90 mailto:bugs@example.com
91- Tracker type:
92+ Tracker type
93 Email Address
94- Number of watches:
95- 1
96- Creator:
97+ Created by
98 Foo Bar
99
100 If the user is not logged in, email addresses in the Location field
101@@ -693,9 +691,9 @@
102
103 >>> anon_browser.open('http://launchpad.dev/bugs/bugtrackers/email')
104 >>> print extract_text(find_portlet(
105- ... anon_browser.contents, 'Email bugtracker'))
106- Email bugtracker
107- Location:
108+ ... anon_browser.contents, 'Details'))
109+ Details
110+ Location
111 mailto:&lt;email address hidden&gt;
112 ...
113
114@@ -704,15 +702,14 @@
115 >>> anon_browser.open(
116 ... 'http://bugs.launchpad.dev/bugs/bugtrackers/gnome-bugzilla')
117 >>> print extract_text(find_portlet(
118- ... anon_browser.contents, 'GnomeGBug GTracker'))
119- GnomeGBug GTracker
120- Location:
121- http://bugzilla.gnome.org/bugs
122- Tracker type:
123+ ... anon_browser.contents, 'Details'))
124+ Details
125+ Location
126+ http://bugzilla.gnome.org/bugs
127+ http://alias.example.com/ (Alias)
128+ Tracker type
129 Bugzilla
130- Number of watches:
131- 2
132- Contact details:
133+ Contact details
134 Jeff Waugh, in his pants.
135- Creator:
136+ Created by
137 Foo Bar
138
139=== modified file 'lib/lp/bugs/templates/bugtracker-edit.pt'
140--- lib/lp/bugs/templates/bugtracker-edit.pt 2009-08-28 13:47:50 +0000
141+++ lib/lp/bugs/templates/bugtracker-edit.pt 2009-09-01 16:01:09 +0000
142@@ -3,13 +3,9 @@
143 xmlns:tal="http://xml.zope.org/namespaces/tal"
144 xmlns:metal="http://xml.zope.org/namespaces/metal"
145 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
146- metal:use-macro="view/macro:page/main_side"
147+ metal:use-macro="view/macro:page/main_only"
148 i18n:domain="malone">
149
150- <div metal:fill-slot="side">
151- <div tal:replace="structure context/@@+portlet-details" />
152- </div>
153-
154 <div metal:fill-slot="main">
155 <h1>Change bug tracker details</h1>
156 <div class="top-portlet">
157
158=== modified file 'lib/lp/bugs/templates/bugtracker-index.pt'
159--- lib/lp/bugs/templates/bugtracker-index.pt 2009-08-28 13:42:10 +0000
160+++ lib/lp/bugs/templates/bugtracker-index.pt 2009-09-01 16:07:16 +0000
161@@ -12,104 +12,35 @@
162
163 <metal:side fill-slot="side">
164 <tal:menu replace="structure view/@@+global-actions" />
165- <div tal:replace="structure context/@@+portlet-details" />
166- <div tal:replace="structure context/@@+portlet-projects" />
167 </metal:side>
168
169- <metal:macros fill-slot="bogus">
170- <metal:macro define-macro="watchlisting">
171- <table class="sortable listing" id="latestwatches">
172- <thead>
173- <tr>
174- <th>Launchpad bug</th>
175- <th>Remote bug</th>
176- <th>Status</th>
177- </tr>
178- </thead>
179- <tbody>
180- <tal:watches repeat="watch watches">
181- <tr tal:define="show watch/bug/required:launchpad.View">
182- <tal:hide-watch-details condition="not:show">
183- <td>
184- <img alt="" src="/@@/bug" />
185- #<span tal:replace="watch/bug/id">34</span>:
186- <em>(Private)</em>
187- </td>
188- <td><em>-</em></td>
189- <td></td>
190- </tal:hide-watch-details>
191- <tal:show-watch-details condition="show">
192- <td>
193- <img alt="" src="/@@/bug" />
194- <a href="#" tal:attributes="href watch/bug/fmt:url">
195- #<span tal:replace="watch/bug/id">34</span>:
196- <span tal:replace="watch/bug/title">
197- Launchpad Bug Title
198- </span>
199- </a>
200- </td>
201- <td>
202- <a tal:replace="structure watch/fmt:external-link-short">
203- 1234
204- </a>
205- </td>
206- <td><tal:status tal:replace="watch/remotestatus"/></td>
207- </tal:show-watch-details>
208- </tr>
209- </tal:watches>
210- </tbody>
211- </table>
212- </metal:macro>
213- </metal:macros>
214-
215 <div metal:fill-slot="main">
216 <div class="top-portlet">
217- <h2>Summary</h2>
218- <p tal:content="context/summary">
219- $BugTracker.summary goes here. This should be quite short,
220- just a single paragraph of text really, giving the BugTracker
221- highlights.
222- </p>
223+ <tal:summary condition="context/summary">
224+ <h2>Summary</h2>
225+ <p tal:content="context/summary">
226+ $BugTracker.summary goes here. This should be quite short,
227+ just a single paragraph of text really, giving the BugTracker
228+ highlights.
229+ </p>
230+ </tal:summary>
231 <p tal:condition="not: context/active" id="inactive-message">
232 <strong>
233 Bug watch updates for <tal:bugtracker
234 content="context/title" /> are disabled.
235 </strong>
236 </p>
237-
238- <h2>Location</h2>
239- <ul id="bugtracker-urls">
240- <li>
241- <strong>
242- <a tal:replace="structure context/fmt:external-link">
243- http://bugs.example.com/
244- </a>
245- </strong>
246- </li>
247- <li tal:repeat="alias context/fmt:aliases">
248- <strong tal:content="alias" /> (Alias)
249- </li>
250- </ul>
251-
252- <tal:contact-details condition="context/contactdetails">
253- <h2>Contact details</h2>
254- <div tal:condition="context/contactdetails"
255- tal:content="context/contactdetails" >
256- The contact details for the admins of this bug tracker go
257- here, so we can get to them in an emergency.
258- </div>
259- </tal:contact-details>
260-
261- <tal:watches condition="context/watches">
262- <h2>Bug watches</h2>
263- <tal:navigation
264- replace="structure view/batchnav/@@+navigation-links-upper" />
265- <tal:block define="watches view/batchnav/batch" condition="watches">
266- <metal:watches use-macro="template/macros/watchlisting" />
267- </tal:block>
268- <tal:navigation
269- replace="structure view/batchnav/@@+navigation-links-lower" />
270- </tal:watches>
271+ </div>
272+ <div class="yui-g">
273+ <div class="first yui-u">
274+ <div tal:replace="structure context/@@+portlet-details" />
275+ </div>
276+ <div class="yui-u">
277+ <div tal:replace="structure context/@@+portlet-projects" />
278+ </div>
279+ </div>
280+ <div class="yui-u" tal:condition="context/watches">
281+ <div tal:replace="structure context/@@+portlet-watches" />
282 </div>
283 </div>
284
285
286=== modified file 'lib/lp/bugs/templates/bugtracker-portlet-details.pt'
287--- lib/lp/bugs/templates/bugtracker-portlet-details.pt 2009-08-28 14:00:23 +0000
288+++ lib/lp/bugs/templates/bugtracker-portlet-details.pt 2009-09-01 15:14:51 +0000
289@@ -1,27 +1,32 @@
290 <div
291- xmlns:tal="http://xml.zope.org/namespaces/tal"
292- xmlns:metal="http://xml.zope.org/namespaces/metal"
293- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
294- class="portlet" id="portlet-details">
295-
296- <h2 tal:content="context/title">bugtracker title</h2>
297-
298+ xmlns:tal="http://xml.zope.org/namespaces/tal"
299+ xmlns:metal="http://xml.zope.org/namespaces/metal"
300+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
301+ class="portlet" id="portlet-details">
302+ <h2>Details</h2>
303 <dl>
304- <dt>Location:</dt>
305+ <dt>Location</dt>
306 <dd>
307- <img alt="" src="/@@/link" />
308- <a tal:replace="structure context/fmt:external-link" />
309+ <ul id="bugtracker-urls">
310+ <li>
311+ <strong>
312+ <a tal:replace="structure context/fmt:external-link">
313+ http://bugs.example.com/
314+ </a>
315+ </strong>
316+ </li>
317+ <li tal:repeat="alias context/fmt:aliases">
318+ <strong tal:content="alias" /> (Alias)
319+ </li>
320+ </ul>
321 </dd>
322- <dt>Tracker type:</dt>
323+ <dt>Tracker type</dt>
324 <dd tal:content="context/bugtrackertype/title" />
325- <dt>Number of watches:</dt>
326- <dd tal:content="context/watches/count" />
327 <tal:contact-details condition="context/contactdetails">
328- <dt>Contact details:</dt>
329+ <dt>Contact details</dt>
330 <dd tal:content="context/contactdetails" />
331 </tal:contact-details>
332- <dt>Creator:</dt>
333+ <dt>Created by</dt>
334 <dd tal:content="structure context/owner/fmt:link" />
335 </dl>
336-
337 </div>
338
339=== modified file 'lib/lp/bugs/templates/bugtracker-portlet-projects.pt'
340--- lib/lp/bugs/templates/bugtracker-portlet-projects.pt 2009-08-28 13:51:06 +0000
341+++ lib/lp/bugs/templates/bugtracker-portlet-projects.pt 2009-09-01 15:16:10 +0000
342@@ -1,16 +1,13 @@
343 <div
344- xmlns:tal="http://xml.zope.org/namespaces/tal"
345- xmlns:metal="http://xml.zope.org/namespaces/metal"
346- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
347- class="portlet" id="portlet-projects">
348-
349+ xmlns:tal="http://xml.zope.org/namespaces/tal"
350+ xmlns:metal="http://xml.zope.org/namespaces/metal"
351+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
352+ class="portlet" id="portlet-projects">
353 <h2>Related projects</h2>
354-
355 <p>
356 You can link a registered bug tracker with a <a
357 href="/projects/">registered project</a> in Launchpad:
358 </p>
359-
360 <ul tal:define="related_projects view/related_projects">
361 <li tal:repeat="project related_projects">
362 <a tal:replace="structure project/fmt:link" />
363@@ -19,5 +16,4 @@
364 <i>There are no projects linked to this bug tracker.</i>
365 </li>
366 </ul>
367-
368 </div>
369
370=== added file 'lib/lp/bugs/templates/bugtracker-portlet-watches.pt'
371--- lib/lp/bugs/templates/bugtracker-portlet-watches.pt 1970-01-01 00:00:00 +0000
372+++ lib/lp/bugs/templates/bugtracker-portlet-watches.pt 2009-09-01 15:15:00 +0000
373@@ -0,0 +1,54 @@
374+<div
375+ xmlns:tal="http://xml.zope.org/namespaces/tal"
376+ xmlns:metal="http://xml.zope.org/namespaces/metal"
377+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
378+ class="portlet" id="portlet-watches">
379+ <h2>Bug watches</h2>
380+ <tal:navigation
381+ replace="structure view/batchnav/@@+navigation-links-upper" />
382+ <tal:block define="watches view/batchnav/batch">
383+ <table class="sortable listing" id="latestwatches">
384+ <thead>
385+ <tr>
386+ <th>Launchpad bug</th>
387+ <th>Remote bug</th>
388+ <th>Status</th>
389+ </tr>
390+ </thead>
391+ <tbody>
392+ <tal:watches repeat="watch watches">
393+ <tr tal:define="show watch/bug/required:launchpad.View">
394+ <tal:hide-watch-details condition="not:show">
395+ <td>
396+ <img alt="" src="/@@/bug" />
397+ #<span tal:replace="watch/bug/id">34</span>:
398+ <em>(Private)</em>
399+ </td>
400+ <td><em>-</em></td>
401+ <td></td>
402+ </tal:hide-watch-details>
403+ <tal:show-watch-details condition="show">
404+ <td>
405+ <img alt="" src="/@@/bug" />
406+ <a href="#" tal:attributes="href watch/bug/fmt:url">
407+ #<span tal:replace="watch/bug/id">34</span>:
408+ <span tal:replace="watch/bug/title">
409+ Launchpad Bug Title
410+ </span>
411+ </a>
412+ </td>
413+ <td>
414+ <a tal:replace="structure watch/fmt:external-link-short">
415+ 1234
416+ </a>
417+ </td>
418+ <td><tal:status tal:replace="watch/remotestatus"/></td>
419+ </tal:show-watch-details>
420+ </tr>
421+ </tal:watches>
422+ </tbody>
423+ </table>
424+ </tal:block>
425+ <tal:navigation
426+ replace="structure view/batchnav/@@+navigation-links-lower" />
427+</div>
428
429=== modified file 'lib/lp/bugs/templates/bugtrackers-index.pt'
430--- lib/lp/bugs/templates/bugtrackers-index.pt 2009-09-01 09:53:09 +0000
431+++ lib/lp/bugs/templates/bugtrackers-index.pt 2009-09-01 16:23:56 +0000
432@@ -69,11 +69,6 @@
433 shown in Launchpad, and Launchpad subscribers are notified when
434 the external status changes.
435 </p>
436- <p tal:define="link context/menu:context/newbugtracker"
437- tal:content="structure link/render"
438- tal:condition="link/enabled">
439- Add a new bug tracker
440- </p>
441 <tal:table define="id string:trackers;
442 trackers view/active_bug_trackers">
443 <metal:table use-macro="template/macros/tracker-table" />
444
445=== modified file 'lib/lp/bugs/templates/remotebug-index.pt'
446--- lib/lp/bugs/templates/remotebug-index.pt 2009-08-28 15:43:29 +0000
447+++ lib/lp/bugs/templates/remotebug-index.pt 2009-09-01 16:45:43 +0000
448@@ -3,7 +3,7 @@
449 xmlns:tal="http://xml.zope.org/namespaces/tal"
450 xmlns:metal="http://xml.zope.org/namespaces/metal"
451 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
452- metal:use-macro="view/macro:page/main_side"
453+ metal:use-macro="view/macro:page/main_only"
454 i18n:domain="launchpad">
455
456 <metal:heading fill-slot="heading">
457@@ -16,7 +16,6 @@
458
459 <div metal:fill-slot="main">
460 <div class="top-portlet">
461- <h2>Is watched by...</h2>
462 <p>
463 The following bugs in Launchpad are watching bug #<span
464 tal:replace="context/remotebug">1234</span> in <span
465@@ -25,26 +24,20 @@
466 using &ldquo;Also affects project&rdquo; or &ldquo;Also
467 affects distribution&rdquo; on the bug page.
468 </p>
469- <table class="listing" id="watchedbugs">
470- <thead>
471- <tr>
472- <th>Bug</th>
473- </tr>
474- </thead>
475- <tbody>
476- <tal:bugs tal:repeat="bug context/bugs">
477- <tr tal:define="visible bug/required:launchpad.View">
478- <td tal:condition="visible">
479- <a class="sprite bug"
480- tal:attributes="href bug/fmt:url"
481- tal:content="string:#${bug/id}: ${bug/title}" />
482- </td>
483- <td tal:condition="not:visible"
484- tal:content="string:#${bug/id}: Private bug" />
485- </tr>
486- </tal:bugs>
487- </tbody>
488- </table>
489+ <ul id="watchedbugs">
490+ <tal:bugs repeat="bug context/bugs">
491+ <li tal:define="visible bug/required:launchpad.View">
492+ <tal:visible condition="visible">
493+ <a tal:replace="structure bug/fmt:link" />
494+ </tal:visible>
495+ <tal:hidden condition="not:visible">
496+ <span class="sprite bug">
497+ Bug #<span tal:replace="bug/id" />: <em>(Private)</em>
498+ </span>
499+ </tal:hidden>
500+ </li>
501+ </tal:bugs>
502+ </ul>
503 </div>
504 </div>
505

« Back to merge proposal