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

Proposed by Julian Edwards
Status: Merged
Merged at revision: not available
Proposed branch: lp:~julian-edwards/launchpad/mechanical-changes-7
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~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.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
=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-09-02 23:14:55 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-09-03 19:34:53 +0000
@@ -442,8 +442,6 @@
442442
443distroseries_queue = ContextTitle('Queue for %s')443distroseries_queue = ContextTitle('Queue for %s')
444444
445distroseriesbinarypackage_index = ContextTitle('%s')
446
447distroserieslanguage_index = ContextTitle('%s')445distroserieslanguage_index = ContextTitle('%s')
448446
449distroseriessourcepackagerelease_index = ContextTitle('%s')447distroseriessourcepackagerelease_index = ContextTitle('%s')
450448
=== modified file 'lib/lp/soyuz/browser/distroseriesbinarypackage.py'
--- lib/lp/soyuz/browser/distroseriesbinarypackage.py 2009-08-24 20:28:33 +0000
+++ lib/lp/soyuz/browser/distroseriesbinarypackage.py 2009-09-03 16:38:19 +0000
@@ -15,6 +15,7 @@
15from canonical.launchpad.webapp import (15from canonical.launchpad.webapp import (
16 StandardLaunchpadFacets, ApplicationMenu, Navigation)16 StandardLaunchpadFacets, ApplicationMenu, Navigation)
17from canonical.launchpad.webapp.breadcrumb import Breadcrumb17from canonical.launchpad.webapp.breadcrumb import Breadcrumb
18from canonical.lazr.utils import smartquote
1819
1920
20class DistroSeriesBinaryPackageFacets(StandardLaunchpadFacets):21class DistroSeriesBinaryPackageFacets(StandardLaunchpadFacets):
@@ -50,4 +51,6 @@
50 self.context = context51 self.context = context
51 self.request = request52 self.request = request
5253
5354 @property
55 def page_title(self):
56 return smartquote(self.context.title)
5457
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt 2008-11-13 13:46:54 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-binary-packages.txt 2009-09-03 19:02:44 +0000
@@ -5,20 +5,17 @@
55
6 >>> browser.open(6 >>> browser.open(
7 ... 'http://launchpad.dev/ubuntu/warty/+package/mozilla-firefox')7 ... 'http://launchpad.dev/ubuntu/warty/+package/mozilla-firefox')
8 >>> browser.title8 >>> print browser.title
9 'Binary package "mozilla-firefox" in ubuntu warty'9 Binary package “mozilla-firefox” in ubuntu warty
10 10
11 >>> main_content = find_main_content(browser.contents)11 >>> main_content = find_main_content(browser.contents)
12 >>> print extract_text(main_content)12 >>> print extract_text(main_content)
13 Binary package “mozilla-firefox” in ubuntu warty
14 Ubuntu 4.10 mozilla-firefox
13 Mozilla Firefox Web Browser15 Mozilla Firefox Web Browser
14 Mozilla Firefox Web Browser is .....16 Mozilla Firefox Web Browser is .....
15 Source package17 Source package
16 iceweasel 1.0 (source) in ubuntu warty18 iceweasel 1.0 (source) in ubuntu warty
17
18There is a portlet displaying the publishing history:
19
20 >>> portlet = find_portlet(browser.contents, "Published as")
21 >>> print extract_text(portlet)
22 Published as19 Published as
23 mozilla-firefox 0.9 in hppa (Release)20 mozilla-firefox 0.9 in hppa (Release)
24 mozilla-firefox 0.9 in i386 (Release)21 mozilla-firefox 0.9 in i386 (Release)
@@ -27,16 +24,16 @@
27And each publishing history item is a link to the relevant binary24And each publishing history item is a link to the relevant binary
28release:25release:
2926
30 >>> browser.getLink('mozilla-firefox 0.9 in hppa (Release)').url27 >>> print browser.getLink('mozilla-firefox 0.9 in hppa (Release)').url
31 'http://launchpad.dev/ubuntu/warty/hppa/mozilla-firefox/0.9'28 http://launchpad.dev/ubuntu/warty/hppa/mozilla-firefox/0.9
32 >>> browser.getLink('mozilla-firefox 0.9 in i386 (Release)').url29 >>> print browser.getLink('mozilla-firefox 0.9 in i386 (Release)').url
33 'http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/0.9'30 http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/0.9
34 >>> browser.getLink('mozilla-firefox 1.0 in i386 (Release)').url31 >>> print browser.getLink('mozilla-firefox 1.0 in i386 (Release)').url
35 'http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/1.0'32 http://launchpad.dev/ubuntu/warty/i386/mozilla-firefox/1.0
3633
37The page also displays a link to the distro series source package34The page also displays a link to the distro series source package
38release:35release:
39 36
40 >>> browser.getLink(id="source_package").click()37 >>> browser.getLink(id="source_package").click()
41 >>> browser.title38 >>> browser.title
42 'iceweasel 1.0 (source) in ubuntu warty'39 'iceweasel 1.0 (source) in ubuntu warty'
@@ -46,11 +43,15 @@
4643
47 >>> browser.open(44 >>> browser.open(
48 ... 'http://launchpad.dev/ubuntu/hoary/+package/mozilla-firefox')45 ... 'http://launchpad.dev/ubuntu/hoary/+package/mozilla-firefox')
49 >>> browser.title46 >>> print browser.title
50 'Binary package "mozilla-firefox" in ubuntu hoary'47 Binary package “mozilla-firefox” in ubuntu hoary
51 48
52 >>> main_content = find_main_content(browser.contents)49 >>> main_content = find_main_content(browser.contents)
53 >>> print extract_text(main_content)50 >>> print extract_text(main_content)
51 Binary package “mozilla-firefox” in ubuntu hoary
52 Ubuntu 5.04 mozilla-firefox
54 No summary available for mozilla-firefox in ubuntu hoary.53 No summary available for mozilla-firefox in ubuntu hoary.
55 No description available for mozilla-firefox in ubuntu hoary.54 No description available for mozilla-firefox in ubuntu hoary.
55 Published as
56 Not published at present.
5657
5758
=== modified file 'lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt'
--- lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/soyuz/templates/distroseriesbinarypackage-index.pt 2009-09-03 16:38:19 +0000
@@ -3,46 +3,41 @@
3 xmlns:tal="http://xml.zope.org/namespaces/tal"3 xmlns:tal="http://xml.zope.org/namespaces/tal"
4 xmlns:metal="http://xml.zope.org/namespaces/metal"4 xmlns:metal="http://xml.zope.org/namespaces/metal"
5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"5 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
6 xml:lang="en"6 metal:use-macro="view/macro:page/main_only"
7 lang="en"
8 dir="ltr"
9 metal:use-macro="context/@@main_template/master"
10 i18n:domain="launchpad"7 i18n:domain="launchpad"
11>8>
12 <body>9
13 <metal:heading fill-slot="pageheading">10<body>
14 <h1 tal:content="context/summary">Summary Goes Here</h1>11 <metal:heading fill-slot="heading">
15 </metal:heading>12 <h1 tal:content="view/page_title"/>
1613 </metal:heading>
17<metal:leftportlets fill-slot="portlets_one">
18 <div tal:replace="structure context/@@+portlet-details" />
19</metal:leftportlets>
20
21<metal:rightportlets fill-slot="portlets_two">
22 <div tal:replace="structure context/@@+portlet-published" />
23</metal:rightportlets>
2414
25<div metal:fill-slot="main">15<div metal:fill-slot="main">
2616
17 <h2 tal:content="context/summary"/>
18
27 <tal:description replace="structure context/description/fmt:text-to-html">19 <tal:description replace="structure context/description/fmt:text-to-html">
28 Package Description20 Package Description
29 </tal:description>21 </tal:description>
3022
31 <tal:sourcepkg tal:define="spackage context/last_sourcepackagerelease"23 <div class="portlet"
32 tal:condition="spackage">24 tal:define="spackage context/last_sourcepackagerelease"
25 tal:condition="spackage">
33 <h2>Source package</h2>26 <h2>Source package</h2>
3427
35 <div id="source">28 <div id="source">
36 <ul>29 <ul>
37 <li class="source package">30 <li class="source package">
38 <a 31 <a
39 tal:content="spackage/title"32 tal:content="spackage/title"
40 tal:attributes="href spackage/fmt:url"33 tal:attributes="href spackage/fmt:url"
41 id="source_package">SOURCEPACKAGE</a>34 id="source_package">SOURCEPACKAGE</a>
42 </li>35 </li>
43 </ul>36 </ul>
44 </div>37 </div>
45 </tal:sourcepkg>38 </div>
39
40 <div tal:replace="structure context/@@+portlet-published" />
4641
47</div>42</div>
48</body>43</body>