Merge lp:~barry/launchpad/421974-newpersonteam into lp:launchpad

Proposed by Barry Warsaw
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~barry/launchpad/421974-newpersonteam
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~barry/launchpad/421974-newpersonteam
Reviewer Review Type Date Requested Status
Curtis Hovey (community) ui Approve
Edwin Grubbs (community) ui Approve
Aaron Bentley (community) Approve
Review via email: mp+10937@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Barry Warsaw (barry) wrote :

= Summary =

This branch converts /people/+newteam and /people/+newperson to UI 3.0.

== Proposed fix ==

Update the templates to 3.0 format.

== Pre-implementation notes ==

None.

== Implementation details ==

The changes were pretty mechanical, except that I had to fix the way the views
specified the page label and page title, and I had to remove the pagetitles.py
cruft. These pages were inconsistent in the way it defined they label and
title, so I updated them to the current understanding of how they should be
defined (though this may or may not change in the future -- that's outside the
scope of this branch).

I also reformatted the TAL to be consistently indented.

== Tests ==

bin/test -vv -t launchpadlib.txt -t front-pages.txt -t standalone -t private-team-creation-views.txt -t stories/teammembership -t create-lists.txt -t recover.txt -t modify-lists.txt

== Demo and Q/A ==

http://launchpad.dev/people/+newperson
http://launchpad.dev/people/+newteam

= 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/registry/browser/team.py
  lib/lp/registry/templates/people-newteam.pt
  lib/lp/registry/browser/person.py
  lib/lp/registry/templates/people-newperson.pt

== Pylint notices ==

lib/lp/registry/browser/person.py
    229: [F0401] Unable to import 'lazr.uri' (No module named uri)

^^ false positive

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 merge approved

Looks good.

Barry Warsaw wrote:
> Barry Warsaw has proposed merging lp:~barry/launchpad/421974-newpersonteam into lp:launchpad/devel.
>
> Requested reviews:
> Canonical Launchpad Engineering (launchpad)
>
> = Summary =
>
> This branch converts /people/+newteam and /people/+newperson to UI 3.0.
>
> == Proposed fix ==
>
> Update the templates to 3.0 format.
>
> == Pre-implementation notes ==
>
> None.
>
> == Implementation details ==
>
> The changes were pretty mechanical, except that I had to fix the way the views
> specified the page label and page title, and I had to remove the pagetitles.py
> cruft. These pages were inconsistent in the way it defined they label and
> title, so I updated them to the current understanding of how they should be
> defined (though this may or may not change in the future -- that's outside the
> scope of this branch).
>
> I also reformatted the TAL to be consistently indented.
>
> == Tests ==
>
> bin/test -vv -t launchpadlib.txt -t front-pages.txt -t standalone -t private-team-creation-views.txt -t stories/teammembership -t create-lists.txt -t recover.txt -t modify-lists.txt
>
> == Demo and Q/A ==
>
> http://launchpad.dev/people/+newperson
> http://launchpad.dev/people/+newteam
>
> = 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/registry/browser/team.py
> lib/lp/registry/templates/people-newteam.pt
> lib/lp/registry/browser/person.py
> lib/lp/registry/templates/people-newperson.pt
>
>
> == Pylint notices ==
>
> lib/lp/registry/browser/person.py
> 229: [F0401] Unable to import 'lazr.uri' (No module named uri)
>
> ^^ false positive
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqcJ8UACgkQ0F+nu1YWqI0/EQCcDer/MIGaHdWpAJLPZGRc2QUT
C7UAnjwD5cwRlbuj4wtnoqCAfNsA25lK
=JIp6
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

ui=me*

review: Approve (ui)
Revision history for this message
Curtis Hovey (sinzui) wrote :

This looks good. We discussed change the team action to read [Create Team] if the test changes were not overwhelming

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-08-29 03:38:28 +0000
3+++ lib/canonical/launchpad/pagetitles.py 2009-08-31 18:52:04 +0000
4@@ -767,10 +767,6 @@
5
6 people_mergerequest_sent = 'Merge request sent'
7
8-people_newperson = 'Create a new Launchpad profile'
9-
10-people_newteam = 'Register a new team in Launchpad'
11-
12 people_requestmerge = 'Merge Launchpad accounts'
13
14 people_requestmerge_multiple = 'Merge Launchpad accounts'
15
16=== modified file 'lib/lp/registry/browser/person.py'
17--- lib/lp/registry/browser/person.py 2009-08-29 03:38:28 +0000
18+++ lib/lp/registry/browser/person.py 2009-08-31 18:52:04 +0000
19@@ -1379,8 +1379,10 @@
20 class PersonAddView(LaunchpadFormView):
21 """The page where users can create new Launchpad profiles."""
22
23- label = "Create a new Launchpad profile"
24+ page_title = "Create a new Launchpad profile"
25+ label = page_title
26 schema = INewPerson
27+
28 custom_widget('creation_comment', TextAreaWidget, height=5, width=60)
29
30 @action(_("Create Profile"), name="create")
31
32=== modified file 'lib/lp/registry/browser/team.py'
33--- lib/lp/registry/browser/team.py 2009-08-26 16:34:38 +0000
34+++ lib/lp/registry/browser/team.py 2009-08-31 18:52:04 +0000
35@@ -831,8 +831,10 @@
36
37 class TeamAddView(TeamFormMixin, HasRenewalPolicyMixin, LaunchpadFormView):
38 """View for adding a new team."""
39+
40+ page_title = 'Register a new team in Launchpad'
41+ label = page_title
42 schema = ITeamCreation
43- label = ''
44
45 custom_widget('teamowner', HiddenUserWidget)
46 custom_widget(
47
48=== modified file 'lib/lp/registry/templates/people-newperson.pt'
49--- lib/lp/registry/templates/people-newperson.pt 2009-07-17 17:59:07 +0000
50+++ lib/lp/registry/templates/people-newperson.pt 2009-08-31 17:46:33 +0000
51@@ -3,37 +3,27 @@
52 xmlns:tal="http://xml.zope.org/namespaces/tal"
53 xmlns:metal="http://xml.zope.org/namespaces/metal"
54 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
55- xml:lang="en"
56- lang="en"
57- dir="ltr"
58- metal:use-macro="context/@@main_template/master"
59+ metal:use-macro="view/macro:page/main_only"
60 i18n:domain="launchpad"
61->
62-
63-<body>
64-
65-<metal:leftportlets fill-slot="portlets_one">
66-</metal:leftportlets>
67-
68-<metal:rightportlets fill-slot="portlets_two">
69-</metal:rightportlets>
70-
71-<div metal:fill-slot="main">
72-
73- <div metal:use-macro="context/@@launchpad_form/form">
74-
75- <p metal:fill-slot="extra_top">
76- We will send an email to the provided email address explaining that
77- you created a Launchpad profile for the email address' owner. This
78- email will include your name and email address, so that the user can
79- contact you if (s)he wants. It won't be possible to login with this
80- new profile and we will not send any other emails to it before its
81- email address is confirmed and the registration process finished by
82- the person represented by that profile.
83- </p>
84-
85- </div>
86-</div>
87-
88-</body>
89+ >
90+ <body>
91+ <div metal:fill-slot="main">
92+ <div metal:use-macro="context/@@launchpad_form/form">
93+ <div metal:fill-slot="extra_info" class="application-summary">
94+ <p>
95+ Launchpad will send a message to the email address you provide
96+ below. This message explains that you created a Launchpad profile
97+ for the email address's owner, and it will include your name and
98+ email address so that the user can contact you if they want to.
99+ </p>
100+ <p>
101+ It will not be possible to log in with this new profile, and
102+ Launchpad will not send any other messages to it before its email
103+ address is confirmed. The registration process must be finished by
104+ the person represented by the new profile.
105+ </p>
106+ </div>
107+ </div>
108+ </div>
109+ </body>
110 </html>
111
112=== modified file 'lib/lp/registry/templates/people-newteam.pt'
113--- lib/lp/registry/templates/people-newteam.pt 2009-07-17 17:59:07 +0000
114+++ lib/lp/registry/templates/people-newteam.pt 2009-08-31 17:46:33 +0000
115@@ -3,31 +3,20 @@
116 xmlns:tal="http://xml.zope.org/namespaces/tal"
117 xmlns:metal="http://xml.zope.org/namespaces/metal"
118 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
119- xml:lang="en"
120- lang="en"
121- dir="ltr"
122- metal:use-macro="context/@@main_template/master"
123+ metal:use-macro="view/macro:page/main_only"
124 i18n:domain="launchpad"
125->
126-<body>
127-
128- <div metal:fill-slot="main">
129-
130- <h1>Register a new team</h1>
131-
132- <div metal:use-macro="context/@@launchpad_form/form">
133-
134- <p metal:fill-slot="extra_info">
135+ >
136+ <body>
137+ <div metal:fill-slot="main">
138+ <div metal:use-macro="context/@@launchpad_form/form">
139+ <p metal:fill-slot="extra_info" class="application-summary">
140 Use a team to group people involved in a common task.
141 For example, a team can be the maintainer of a project,
142- the assignee of a bug,
143- or the editor of a package for a particular language.
144+ the assignee of a bug, or the editor of a package for a particular
145+ language.
146 </p>
147-
148+ </div>
149+ <metal:js use-macro="context/@@+person-macros/private-team-js" />
150 </div>
151-
152- <metal:js use-macro="context/@@+person-macros/private-team-js" />
153-
154- </div>
155-</body>
156+ </body>
157 </html>