Merge lp://staging/~julian-edwards/launchpad/mechanical-changes-7 into lp://staging/launchpad

Proposed by Julian Edwards
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~julian-edwards/launchpad/mechanical-changes-7
Merge into: lp://staging/launchpad
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~julian-edwards/launchpad/mechanical-changes-7
Reviewer Review Type Date Requested Status
Michael Nelson (community) ui Approve
Abel Deuring (community) Approve
Review via email: mp+11156@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

= Summary =
Mechanical 3.0 conversion of distroseriesbinarypackage page

== Implementation details ==
Pretty straightforward template conversion of
lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt

The two side portlets are removed, although the publishing details one has
moved to the bottom of the main content.

I also took the opportunity to clean up the page test a bit.

== Tests ==
bin/test -vvt xx-distroseries-binary-packages.txt

== Demo and Q/A ==
See dogfood:
https://dogfood.launchpad.net/ubuntu/hardy/+package/kmail

Or in .dev:
https://launchpad.dev/ubuntu/warty/+package/mozilla-firefox/

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/canonical/launchpad/pagetitles.py
  lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt
  lib/lp/soyuz/browser/distroseriesbinarypackage.py
  lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt

Revision history for this message
Abel Deuring (adeuring) :
review: Approve
Revision history for this message
Michael Nelson (michael.nelson) wrote :

<noodles> bigjools: sorry, not part of a ui review I know, but do we have any rules about using non-ascii characters in tests? I've always seen people doing ... instead of “
<noodles> I think it's much more readable just to use it as you have...
<bigjools> noodles: I honestly don't know
<bigjools> exactly, and it passes ...
<noodles> yep.
<noodles> ouch... I just saw what this page used tot look like! Gee it's nice seeing all these changes!
<bigjools> :)
<bigjools> horrible wasn't it
<noodles> Yeah, having the publishings down the side...
* bigjools has quit (Ping timeout)
* bigjools (<email address hidden>) has joined #launchpad-soyuz
<bigjools> intel drivers FTW again
<noodles> bigjools: looks great. My only thought (there's always one isn't there... is that I think we should update the h2: "Published as" to something that doesn't require context.
<noodles> heh
<bigjools> not sure I completely understand
<noodles> hmm... maybe not. I was thinking that instead of "Published as", maybe "Publications of 'kmail' in Ubuntu Hardy"
<noodles> but that's too much context.
<noodles> Any ideas? Or do you think there's no benefit in changing from "Publish as"...?
<bigjools> "Published versions" maybe
<noodles> Yeah, perfect

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/pagetitles.py'
2--- lib/canonical/launchpad/pagetitles.py 2009-09-02 23:14:55 +0000
3+++ lib/canonical/launchpad/pagetitles.py 2009-09-03 19:34:53 +0000
4@@ -442,8 +442,6 @@
5
6 distroseries_queue = ContextTitle('Queue for %s')
7
8-distroseriesbinarypackage_index = ContextTitle('%s')
9-
10 distroserieslanguage_index = ContextTitle('%s')
11
12 distroseriessourcepackagerelease_index = ContextTitle('%s')
13
14=== modified file 'lib/lp/soyuz/browser/distroseriesbinarypackage.py'
15--- lib/lp/soyuz/browser/distroseriesbinarypackage.py 2009-08-24 20:28:33 +0000
16+++ lib/lp/soyuz/browser/distroseriesbinarypackage.py 2009-09-03 16:38:19 +0000
17@@ -15,6 +15,7 @@
18 from canonical.launchpad.webapp import (
19 StandardLaunchpadFacets, ApplicationMenu, Navigation)
20 from canonical.launchpad.webapp.breadcrumb import Breadcrumb
21+from canonical.lazr.utils import smartquote
22
23
24 class DistroSeriesBinaryPackageFacets(StandardLaunchpadFacets):
25@@ -50,4 +51,6 @@
26 self.context = context
27 self.request = request
28
29-
30+ @property
31+ def page_title(self):
32+ return smartquote(self.context.title)
33
34=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt'
35--- lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt 2008-11-13 13:46:54 +0000
36+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt 2009-09-03 19:02:44 +0000
37@@ -5,20 +5,17 @@
38
39 >>> browser.open(
40 ... 'http://launchpad.dev/ubuntu/warty/+package/mozilla-firefox')
41- >>> browser.title
42- 'Binary package "mozilla-firefox" in ubuntu warty'
43-
44+ >>> print browser.title
45+ Binary package “mozilla-firefox” in ubuntu warty
46+
47 >>> main_content = find_main_content(browser.contents)
48 >>> print extract_text(main_content)
49+ Binary package “mozilla-firefox” in ubuntu warty
50+ Ubuntu 4.10 mozilla-firefox
51 Mozilla Firefox Web Browser
52 Mozilla Firefox Web Browser is .....
53 Source package
54 iceweasel 1.0 (source) in ubuntu warty
55-
56-There is a portlet displaying the publishing history:
57-
58- >>> portlet = find_portlet(browser.contents, "Published as")
59- >>> print extract_text(portlet)
60 Published as
61 mozilla-firefox 0.9 in hppa (Release)
62 mozilla-firefox 0.9 in i386 (Release)
63@@ -27,16 +24,16 @@
64 And each publishing history item is a link to the relevant binary
65 release:
66
67- >>> browser.getLink('mozilla-firefox 0.9 in hppa (Release)').url
68- 'http://launchpad.dev/ubuntu/warty/hppa/mozilla-firefox/0.9'
69- >>> browser.getLink('mozilla-firefox 0.9 in i386 (Release)').url
70- 'http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/0.9'
71- >>> browser.getLink('mozilla-firefox 1.0 in i386 (Release)').url
72- 'http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/1.0'
73+ >>> print browser.getLink('mozilla-firefox 0.9 in hppa (Release)').url
74+ http://launchpad.dev/ubuntu/warty/hppa/mozilla-firefox/0.9
75+ >>> print browser.getLink('mozilla-firefox 0.9 in i386 (Release)').url
76+ http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/0.9
77+ >>> print browser.getLink('mozilla-firefox 1.0 in i386 (Release)').url
78+ http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/1.0
79
80 The page also displays a link to the distro series source package
81 release:
82-
83+
84 >>> browser.getLink(id="source_package").click()
85 >>> browser.title
86 'iceweasel 1.0 (source) in ubuntu warty'
87@@ -46,11 +43,15 @@
88
89 >>> browser.open(
90 ... 'http://launchpad.dev/ubuntu/hoary/+package/mozilla-firefox')
91- >>> browser.title
92- 'Binary package "mozilla-firefox" in ubuntu hoary'
93-
94+ >>> print browser.title
95+ Binary package “mozilla-firefox” in ubuntu hoary
96+
97 >>> main_content = find_main_content(browser.contents)
98 >>> print extract_text(main_content)
99+ Binary package “mozilla-firefox” in ubuntu hoary
100+ Ubuntu 5.04 mozilla-firefox
101 No summary available for mozilla-firefox in ubuntu hoary.
102 No description available for mozilla-firefox in ubuntu hoary.
103+ Published as
104+ Not published at present.
105
106
107=== modified file 'lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt'
108--- lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt 2009-07-17 17:59:07 +0000
109+++ lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt 2009-09-03 16:38:19 +0000
110@@ -3,46 +3,41 @@
111 xmlns:tal="http://xml.zope.org/namespaces/tal"
112 xmlns:metal="http://xml.zope.org/namespaces/metal"
113 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
114- xml:lang="en"
115- lang="en"
116- dir="ltr"
117- metal:use-macro="context/@@main_template/master"
118+ metal:use-macro="view/macro:page/main_only"
119 i18n:domain="launchpad"
120 >
121- <body>
122- <metal:heading fill-slot="pageheading">
123- <h1 tal:content="context/summary">Summary Goes Here</h1>
124- </metal:heading>
125-
126-<metal:leftportlets fill-slot="portlets_one">
127- <div tal:replace="structure context/@@+portlet-details" />
128-</metal:leftportlets>
129-
130-<metal:rightportlets fill-slot="portlets_two">
131- <div tal:replace="structure context/@@+portlet-published" />
132-</metal:rightportlets>
133+
134+<body>
135+ <metal:heading fill-slot="heading">
136+ <h1 tal:content="view/page_title"/>
137+ </metal:heading>
138
139 <div metal:fill-slot="main">
140
141+ <h2 tal:content="context/summary"/>
142+
143 <tal:description replace="structure context/description/fmt:text-to-html">
144 Package Description
145 </tal:description>
146
147- <tal:sourcepkg tal:define="spackage context/last_sourcepackagerelease"
148- tal:condition="spackage">
149+ <div class="portlet"
150+ tal:define="spackage context/last_sourcepackagerelease"
151+ tal:condition="spackage">
152 <h2>Source package</h2>
153
154 <div id="source">
155 <ul>
156 <li class="source package">
157- <a
158+ <a
159 tal:content="spackage/title"
160 tal:attributes="href spackage/fmt:url"
161 id="source_package">SOURCEPACKAGE</a>
162 </li>
163 </ul>
164 </div>
165- </tal:sourcepkg>
166+ </div>
167+
168+ <div tal:replace="structure context/@@+portlet-published" />
169
170 </div>
171 </body>