Merge lp:~michael.nelson/launchpad/219222-edit-ppa-dependencies-rename into lp:launchpad

Proposed by Michael Nelson
Status: Merged
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/219222-edit-ppa-dependencies-rename
Merge into: lp:launchpad
Diff against target: 142 lines
5 files modified
lib/canonical/launchpad/pagetitles.py (+0/-2)
lib/lp/soyuz/browser/archive.py (+4/-1)
lib/lp/soyuz/browser/tests/archive-views.txt (+8/-0)
lib/lp/soyuz/stories/ppa/xx-edit-dependencies.txt (+11/-10)
lib/lp/soyuz/templates/archive-edit-dependencies.pt (+0/-6)
To merge this branch: bzr merge lp:~michael.nelson/launchpad/219222-edit-ppa-dependencies-rename
Reviewer Review Type Date Requested Status
Abel Deuring (community) Approve
Review via email: mp+13468@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 bug 219222 simply by renaming 'Edit dependencies' to
'Edit ppa dependencies'.

http://people.canonical.com/~michaeln/tmp/edit-dependencies-link.png

I also used the opportunity to get rid of the old pagetitles.py entry
and update the related view with the label/page_title.

http://people.canonical.com/~michaeln/tmp/edit-dependencies-heading.png

My main concern is that this makes the action text quite long - meaning
that it wraps when the window is not reasonably wide. Actually, I think
my concern is more generally with *how* those actions with icons wrap
across LP generally - it'd be much nicer if the wrapped line aligned
with the RHS of the icon.

== Tests ==

bin/test -vv -t archive-views.txt -t xx-edit-dependencies.txt

== Demo and Q/A ==

Log in as <email address hidden>:test and visit:

https://launchpad.dev/~cprov/+archive/ppa

Click on 'Edit PPA dependencies'.

= 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/browser/tests/archive-views.txt
  lib/lp/soyuz/templates/archive-edit-dependencies.pt
  lib/lp/soyuz/stories/ppa/xx-edit-dependencies.txt
  lib/lp/soyuz/browser/archive.py

--
Michael

Revision history for this message
Abel Deuring (adeuring) wrote :

Hi Michael,

nice work! just one nitpick:

> @@ -39,12 +39,13 @@
> ... auth='Basic <email address hidden>:test')
> >>> no_priv_browser.open("http://launchpad.dev/~no-priv/+archive/ppa")
>
> - >>> no_priv_browser.getLink('Edit dependencies').click()
> + >>> no_priv_browser.getLink('Edit PPA dependencies').click()
> >>> print no_priv_browser.url
> http://launchpad.dev/~no-priv/+archive/ppa/+edit-dependencies
>
> >>> print no_priv_browser.title
> - Edit dependencies for PPA for No Privileges Person...
> + Edit PPA dependencies : PPA for No Privileges Person :
> + No Privileges Person
>
> Only Celso and an administrator can access the 'Edit dependencies'
> page for Celso's PPA.

Not really important, but could you you s/'Edit dependencies'/'Edit PPA dependencies' ?

review: Approve

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-10-05 22:14:18 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-10-30 12:35:24 +0000
@@ -126,8 +126,6 @@
126126
127archive_edit = ContextDisplayName('Edit %s')127archive_edit = ContextDisplayName('Edit %s')
128128
129archive_edit_dependencies = ContextDisplayName('Edit dependencies for %s')
130
131bazaar_all_branches = 'All branches in the Launchpad Bazaar'129bazaar_all_branches = 'All branches in the Launchpad Bazaar'
132130
133bazaar_index = 'Launchpad Branches'131bazaar_index = 'Launchpad Branches'
134132
=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py 2009-10-16 11:47:55 +0000
+++ lib/lp/soyuz/browser/archive.py 2009-10-30 12:35:24 +0000
@@ -391,7 +391,7 @@
391391
392 @enabled_with_permission('launchpad.Edit')392 @enabled_with_permission('launchpad.Edit')
393 def edit_dependencies(self):393 def edit_dependencies(self):
394 text = 'Edit dependencies'394 text = 'Edit PPA dependencies'
395 return Link('+edit-dependencies', text, icon='edit')395 return Link('+edit-dependencies', text, icon='edit')
396396
397397
@@ -1303,6 +1303,9 @@
1303 custom_widget('primary_components', LaunchpadRadioWidget,1303 custom_widget('primary_components', LaunchpadRadioWidget,
1304 cssClass='highlight-selected')1304 cssClass='highlight-selected')
13051305
1306 label = "Edit PPA dependencies"
1307 page_title = label
1308
1306 def initialize(self):1309 def initialize(self):
1307 self.cancel_url = canonical_url(self.context)1310 self.cancel_url = canonical_url(self.context)
1308 self._messages = []1311 self._messages = []
13091312
=== modified file 'lib/lp/soyuz/browser/tests/archive-views.txt'
--- lib/lp/soyuz/browser/tests/archive-views.txt 2009-10-28 14:42:40 +0000
+++ lib/lp/soyuz/browser/tests/archive-views.txt 2009-10-30 12:35:24 +0000
@@ -634,6 +634,14 @@
634 >>> view = create_initialized_view(634 >>> view = create_initialized_view(
635 ... cprov.archive, name="+edit-dependencies")635 ... cprov.archive, name="+edit-dependencies")
636636
637The view's h1 heading and leaf breadcrumb are equivalent.
638
639 >>> print view.label
640 Edit PPA dependencies
641
642 >>> print view.page_title
643 Edit PPA dependencies
644
637There is a property indicating whether or not the context PPA has645There is a property indicating whether or not the context PPA has
638recorded dependencies.646recorded dependencies.
639647
640648
=== modified file 'lib/lp/soyuz/stories/ppa/xx-edit-dependencies.txt'
--- lib/lp/soyuz/stories/ppa/xx-edit-dependencies.txt 2009-09-18 15:24:30 +0000
+++ lib/lp/soyuz/stories/ppa/xx-edit-dependencies.txt 2009-10-30 12:35:24 +0000
@@ -9,7 +9,7 @@
9edit dependencies, even if they try the URL directly.9edit dependencies, even if they try the URL directly.
1010
11 >>> anon_browser.open('http://launchpad.dev/~cprov/+archive')11 >>> anon_browser.open('http://launchpad.dev/~cprov/+archive')
12 >>> anon_browser.getLink('Edit dependencies').click()12 >>> anon_browser.getLink('Edit PPA dependencies').click()
13 Traceback (most recent call last):13 Traceback (most recent call last):
14 ...14 ...
15 LinkNotFoundError15 LinkNotFoundError
@@ -21,7 +21,7 @@
21 Unauthorized: ..., 'launchpad.Edit')21 Unauthorized: ..., 'launchpad.Edit')
2222
23 >>> user_browser.open('http://launchpad.dev/~cprov/+archive/ppa')23 >>> user_browser.open('http://launchpad.dev/~cprov/+archive/ppa')
24 >>> user_browser.getLink('Edit dependencies').click()24 >>> user_browser.getLink('Edit PPA dependencies').click()
25 Traceback (most recent call last):25 Traceback (most recent call last):
26 ...26 ...
27 LinkNotFoundError27 LinkNotFoundError
@@ -39,31 +39,32 @@
39 ... auth='Basic no-priv@canonical.com:test')39 ... auth='Basic no-priv@canonical.com:test')
40 >>> no_priv_browser.open("http://launchpad.dev/~no-priv/+archive/ppa")40 >>> no_priv_browser.open("http://launchpad.dev/~no-priv/+archive/ppa")
4141
42 >>> no_priv_browser.getLink('Edit dependencies').click()42 >>> no_priv_browser.getLink('Edit PPA dependencies').click()
43 >>> print no_priv_browser.url43 >>> print no_priv_browser.url
44 http://launchpad.dev/~no-priv/+archive/ppa/+edit-dependencies44 http://launchpad.dev/~no-priv/+archive/ppa/+edit-dependencies
4545
46 >>> print no_priv_browser.title46 >>> print no_priv_browser.title
47 Edit dependencies for PPA for No Privileges Person...47 Edit PPA dependencies : PPA for No Privileges Person :
48 No Privileges Person
4849
49Only Celso and an administrator can access the 'Edit dependencies'50Only Celso and an administrator can access the 'Edit PPA dependencies'
50page for Celso's PPA.51page for Celso's PPA.
5152
52 >>> cprov_browser = setupBrowser(53 >>> cprov_browser = setupBrowser(
53 ... auth="Basic celso.providelo@canonical.com:cprov")54 ... auth="Basic celso.providelo@canonical.com:cprov")
54 >>> cprov_browser.open('http://launchpad.dev/~cprov/+archive/ppa')55 >>> cprov_browser.open('http://launchpad.dev/~cprov/+archive/ppa')
55 >>> cprov_browser.getLink('Edit dependencies').click()56 >>> cprov_browser.getLink('Edit PPA dependencies').click()
56 >>> print cprov_browser.url57 >>> print cprov_browser.url
57 http://launchpad.dev/~cprov/+archive/ppa/+edit-dependencies58 http://launchpad.dev/~cprov/+archive/ppa/+edit-dependencies
58 >>> print cprov_browser.title59 >>> print cprov_browser.title
59 Edit dependencies for PPA for Celso Providelo...60 Edit PPA dependencies : PPA for Celso Providelo : Celso Providelo
6061
61 >>> admin_browser.open('http://launchpad.dev/~cprov/+archive/ppa')62 >>> admin_browser.open('http://launchpad.dev/~cprov/+archive/ppa')
62 >>> admin_browser.getLink('Edit dependencies').click()63 >>> admin_browser.getLink('Edit PPA dependencies').click()
63 >>> print admin_browser.url64 >>> print admin_browser.url
64 http://launchpad.dev/~cprov/+archive/ppa/+edit-dependencies65 http://launchpad.dev/~cprov/+archive/ppa/+edit-dependencies
65 >>> print admin_browser.title66 >>> print admin_browser.title
66 Edit dependencies for PPA for Celso Providelo...67 Edit PPA dependencies : PPA for Celso Providelo : Celso Providelo
6768
68Once accessed the page provides a way to remove recorded dependencies69Once accessed the page provides a way to remove recorded dependencies
69via the POST form.70via the POST form.
@@ -507,7 +508,7 @@
507At anytime the form can be cancelled and the user will be taken to the508At anytime the form can be cancelled and the user will be taken to the
508PPA context page and the action won't be executed.509PPA context page and the action won't be executed.
509510
510 >>> admin_browser.getLink('Edit dependencies').click()511 >>> admin_browser.getLink('Edit PPA dependencies').click()
511512
512 >>> admin_browser.getControl("Add PPA dependency").value = 'no-priv/ppa'513 >>> admin_browser.getControl("Add PPA dependency").value = 'no-priv/ppa'
513 >>> admin_browser.getControl(514 >>> admin_browser.getControl(
514515
=== modified file 'lib/lp/soyuz/templates/archive-edit-dependencies.pt'
--- lib/lp/soyuz/templates/archive-edit-dependencies.pt 2009-08-06 12:59:32 +0000
+++ lib/lp/soyuz/templates/archive-edit-dependencies.pt 2009-10-30 12:35:24 +0000
@@ -8,12 +8,6 @@
8 >8 >
9<body>9<body>
1010
11<div metal:fill-slot="heading">
12 <h1 tal:content="CONTEXTS/fmt:pagetitle">
13 Edit dependencies for Blah PPA
14 </h1>
15</div>
16
17<div metal:fill-slot="main">11<div metal:fill-slot="main">
18<div class="top-portlet">12<div class="top-portlet">
19 <div metal:use-macro="context/@@launchpad_form/form">13 <div metal:use-macro="context/@@launchpad_form/form">