Merge lp:~michael.nelson/launchpad/missing-distro-ppas-heading into lp:launchpad

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/missing-distro-ppas-heading
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~michael.nelson/launchpad/missing-distro-ppas-heading
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Graham Binns (community) Approve
Review via email: mp+12211@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

= Summary =

This branch fixes the distribution ppas view, which was updated to 3-0
before the requirement of view.label for the main heading.

You can see the missing heading at:

https://edge.launchpad.net/ubuntu/+ppas

I also updated the page_title to something shorter now that it's used as
the leaf of the breadcrumbs (and first part of the page-title).

== Tests ==

bin/test -vv -t distribution-views.txt -t xx-ubuntu-ppas.txt -t
stories/soyuz -t stories/ppa

== Demo and Q/A ==

Screenshot:
http://people.canonical.com/~michaeln/tmp/distro-ppa-heading.png

Demo:
https://launchpad.dev/ubuntu/+ppas

QA:
https://edge.launchpad.net/ubuntu/+ppas

= Launchpad lint =

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

Linting changed files:
  lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt
  lib/lp/soyuz/templates/distribution-ppa-list.pt
  lib/lp/registry/browser/tests/distribution-views.txt
  lib/lp/registry/browser/distribution.py

--
Michael

Revision history for this message
Graham Binns (gmb) :
review: Approve
Revision history for this message
Brad Crittenden (bac) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/distribution.py'
2--- lib/lp/registry/browser/distribution.py 2009-09-16 00:40:53 +0000
3+++ lib/lp/registry/browser/distribution.py 2009-09-22 10:05:26 +0000
4@@ -659,13 +659,15 @@
5 class DistributionPPASearchView(LaunchpadView):
6 """Search PPAs belonging to the Distribution in question."""
7
8+ page_title = "Personal Package Archives"
9+
10 def initialize(self):
11 self.name_filter = self.request.get('name_filter')
12 self.show_inactive = self.request.get('show_inactive')
13
14 @property
15- def page_title(self):
16- return '%s Personal Package Archives' % self.context.title
17+ def label(self):
18+ return 'Personal Package Archives for %s' % self.context.title
19
20 @property
21 def search_results(self):
22
23=== modified file 'lib/lp/registry/browser/tests/distribution-views.txt'
24--- lib/lp/registry/browser/tests/distribution-views.txt 2009-09-15 16:26:15 +0000
25+++ lib/lp/registry/browser/tests/distribution-views.txt 2009-09-22 10:05:26 +0000
26@@ -304,3 +304,18 @@
27 grumpy unhighlighted
28 hoary highlighted
29 warty unhighlighted
30+
31+
32+Distribution +ppas
33+------------------
34+
35+The +ppas view provides a page title and label, some statistics helpers
36+and search results.
37+
38+ >>> view = create_view(ubuntu, name='+ppas')
39+ >>> print view.label
40+ Personal Package Archives for Ubuntu Linux
41+
42+ # The leaf of the breadcrumbs, also used in the page-title.
43+ >>> print view.page_title
44+ Personal Package Archives
45
46=== modified file 'lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt'
47--- lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-09-19 08:30:29 +0000
48+++ lib/lp/soyuz/stories/ppa/xx-ubuntu-ppas.txt 2009-09-22 10:05:26 +0000
49@@ -4,8 +4,16 @@
50
51 >>> anon_browser.open("http://launchpad.dev/ubuntu")
52 >>> anon_browser.getLink("Personal Package Archives").click()
53- >>> print anon_browser.title
54- Ubuntu Linux Personal Package Archives...
55+ >>> print_location(anon_browser.contents)
56+ Hierarchy: Ubuntu > Personal Package Archives
57+ Tabs:
58+ * Overview (selected) - http://launchpad.dev/ubuntu
59+ * Code - http://code.launchpad.dev/ubuntu
60+ * Bugs - http://bugs.launchpad.dev/ubuntu
61+ * Blueprints - http://blueprints.launchpad.dev/ubuntu
62+ * Translations - http://translations.launchpad.dev/ubuntu
63+ * Answers - http://answers.launchpad.dev/ubuntu
64+ Main heading: Personal Package Archives for Ubuntu Linux
65
66
67 == Distribution PPA main page ==
68@@ -77,7 +85,7 @@
69 >>> anon_browser.open("http://launchpad.dev/debian")
70 >>> anon_browser.getLink("Personal Package Archives").click()
71 >>> print anon_browser.title
72- Debian GNU/Linux Personal Package Archives...
73+ Personal Package Archives : Debian
74
75 Those pages present coherent data for a distribution with no PPAs.
76
77@@ -594,7 +602,7 @@
78 >>> anon_browser.open("http://launchpad.dev/ubuntutest")
79 >>> anon_browser.getLink("Personal Package Archives").click()
80 >>> print anon_browser.title
81- Ubuntu Test Personal Package Archives...
82+ Personal Package Archives : ubuntutest
83
84 >>> len(find_tags_by_class(anon_browser.contents, 'ppa_batch_row'))
85 0
86
87=== modified file 'lib/lp/soyuz/templates/distribution-ppa-list.pt'
88--- lib/lp/soyuz/templates/distribution-ppa-list.pt 2009-09-02 05:37:54 +0000
89+++ lib/lp/soyuz/templates/distribution-ppa-list.pt 2009-09-22 10:05:26 +0000
90@@ -16,8 +16,6 @@
91
92 <div id="ppa_search" class="top-portlet">
93
94- <h2>Personal Package Archives</h2>
95-
96 <p>Personal Package Archives (PPA) allow you to upload
97 Ubuntu source packages to be built and published as an
98 apt repository by Launchpad. You can find out more about