Merge lp:~deryck/launchpad/edit-bug-ui-update-412971 into lp:launchpad
- edit-bug-ui-update-412971
- Merge into devel
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~deryck/launchpad/edit-bug-ui-update-412971 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: | None lines | ||||
To merge this branch: | bzr merge lp:~deryck/launchpad/edit-bug-ui-update-412971 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eleanor Berger (community) | ui | Approve | |
Guilherme Salgado (community) | Approve | ||
Review via email: mp+10151@code.launchpad.net |
Commit message
Description of the change
Deryck Hodge (deryck) wrote : | # |
Guilherme Salgado (salgado) wrote : | # |
Hi Deryck,
I noticed the link to the bug's page on the heading doesn't exist in the
new UI, but I don't think that's a problem as we now have the 'Cancel'
link at the bottom. It'd be nice if you could double check that with
Martin.
Other than that, it looks nice, and I only have one suggestion below.
review approve
On Fri, 2009-08-14 at 13:25 +0000, Deryck Hodge wrote:
> = Summary =
>
> This branch is my first attempt at mechanical conversions for 3.0 UI
> updates for bugs templates. This works on bug-edit.pt, which will
> rarely be hit with all the recent AJAX work. The idea was to do an
> easy, low-visibility template to start, to understand some basics of
> the
> updating process.
>
> See bug 412971 for a good bit of discussion/
> as
> I worked out what to do.
>
> I think most of the comments there also get me pretty far along in UI
> review. The only question I have remaining is minor. In the original
> version the page heading was "Edit bug description" and I changed that
> to "Edit bug information" since the page encompasses more fields than
> description. Perhaps description is a better word or there is yet
> another better term.
>
> == Screenshots ==
>
> Before:
> http://
>
> After:
> http://
>
> == Tests ==
>
> ./bin/test -vv -t xx-bug-edit.txt
>
> The test is currently broken, and I'm waiting on a fix to base layout
> by
> Edwin to land before fixing the test. There may be other tests
> broken,
> too, and I have the branch in ec2test for now to know for sure.
>
> I'll amend the MP with a diff of test updates when done.
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -412,7 +412,8 @@
> @cachedproperty
> def subscriber_
> """Return a dictionary mapping a css_name to user name."""
> - subscribers = self.direct_
> + subscribers = self.direct_
> + self.duplicate_
>
> # The current user has to be in subscribers_id so
> # in case the id is needed for a new subscription.
> @@ -555,6 +556,21 @@
> BugEditViewBase
> self.notifications = []
>
> + @property
> + def label(self):
> + """The form label."""
> + return 'Edit Bug Information'
I guess we don't need this to be a property, do we?
> +
> + @property
> + def page_title(self):
> + """The page title."""
> + return 'Edit %s ' % self.context.title
> +
> + @property
> + def cancel_url(self):
> + """See `LaunchpadFormV
> + return canonical_
> +
> def validate(self, data):
> """Make sure new tags are confirmed."""
> if 'tags' not in data:
>
>
--
Guilherme Salgado <email address hidden>
Deryck Hodge (deryck) wrote : | # |
Hi, salgado. Thanks for the review!
On Fri, Aug 14, 2009 at 9:30 AM, Guilherme Salgado<email address hidden> wrote:
> I noticed the link to the bug's page on the heading doesn't exist in the
> new UI, but I don't think that's a problem as we now have the 'Cancel'
> link at the bottom. It'd be nice if you could double check that with
> Martin.
I think this is okay because the breadcrumbs Gavin is working on will
have the bug link.
>> + @property
>> + def label(self):
>> + """The form label."""
>> + return 'Edit Bug Information'
>
> I guess we don't need this to be a property, do we?
>
I'm not sure I follow exactly what you mean, sorry. Do you mean I
should use the simpler form of:
label = 'Edit Bug Description'
That would make since given the string is not constructed from some
other piece of data. But I wanted to make sure I understood you
first.
Cheers,
deryck
Guilherme Salgado (salgado) wrote : | # |
On Fri, 2009-08-14 at 15:45 +0000, Deryck Hodge wrote:
> Hi, salgado. Thanks for the review!
>
> On Fri, Aug 14, 2009 at 9:30 AM, Guilherme Salgado<email address hidden> wrote:
> > I noticed the link to the bug's page on the heading doesn't exist in the
> > new UI, but I don't think that's a problem as we now have the 'Cancel'
> > link at the bottom. It'd be nice if you could double check that with
> > Martin.
>
> I think this is okay because the breadcrumbs Gavin is working on will
> have the bug link.
Fair enough.
>
> >> + @property
> >> + def label(self):
> >> + """The form label."""
> >> + return 'Edit Bug Information'
> >
> > I guess we don't need this to be a property, do we?
> >
>
> I'm not sure I follow exactly what you mean, sorry. Do you mean I
> should use the simpler form of:
>
> label = 'Edit Bug Description'
>
> That would make since given the string is not constructed from some
> other piece of data. But I wanted to make sure I understood you
> first.
That's exactly what I meant. :)
Cheers,
--
Guilherme Salgado <email address hidden>
Eleanor Berger (intellectronica) wrote : | # |
We've discussed removing the nickname field from the form (since it now can't be accessed by most users). You're filing a bug for doing that.
Deryck Hodge (deryck) wrote : | # |
> We've discussed removing the nickname field from the form (since it now can't
> be accessed by most users). You're filing a bug for doing that.
This is captured as bug 416369.
Deryck Hodge (deryck) wrote : | # |
I had been waiting on some notifications fixes to be able to land
this branch, but turns out, the older way of doing this is correct
because the notifications have to appear inside the form.
Here's a diff of the change back to the original template, with
3.0 mechanical updates plus removing the obsolete test.
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -549,7 +549,6 @@
custom_
custom_
next_url = None
- label = 'Edit Bug Information'
_confirm_
@@ -558,9 +557,14 @@
@property
+ def label(self):
+ """The form label."""
+ return 'Edit details for bug #%d' % self.context.id
+
+ @property
def page_title(self):
"""The page title."""
- return 'Edit %s ' % self.context.title
+ return self.label
@property
def cancel_url(self):
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -485,7 +485,7 @@
- template=
+ template=
=== removed file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -1,93 +0,0 @@
-The bug index page includes action links, which provide various links
-to add things to the bug, inlined within the main content area.
-
- >>> user_browser.open(
- ... 'http://
- >>> print user_browser.
- <...
- ...Activity log...
- ...Mark as duplicate...
-
-On other bug views, the 'Mark as duplicate' link can be found in the actions
-menu.
-
- >>> user_browser.
- >>> print find_tags_by_class(
- ... user_browser.
- Mark as duplicate
-
- Tests the marking of a bug that is a duplicate of a duplicate.
-
- >>> user_browser.
- >>> print user_browser.url
- http://
-
- >>> user_browser.
- >>> user_browser.
- >>> print user_browser.
- <...
- <p class="error message">There is 1 error.</p>
- ...
- ...already a duplicate...
-
-
- Tests the marking of a bug that is a duplicate of itself.
-
- >>> user_browser.
- >>> user_browser.
- >>> print user_browser.
- <...
- <p class="error message">There is 1 error.</p>
- ...
- ......
Preview Diff
1 | === modified file 'lib/lp/bugs/browser/bug.py' |
2 | --- lib/lp/bugs/browser/bug.py 2009-08-04 05:30:51 +0000 |
3 | +++ lib/lp/bugs/browser/bug.py 2009-08-14 13:06:27 +0000 |
4 | @@ -412,7 +412,8 @@ |
5 | @cachedproperty |
6 | def subscriber_ids(self): |
7 | """Return a dictionary mapping a css_name to user name.""" |
8 | - subscribers = self.direct_subscribers.union(self.duplicate_subscribers) |
9 | + subscribers = self.direct_subscribers.union( |
10 | + self.duplicate_subscribers) |
11 | |
12 | # The current user has to be in subscribers_id so |
13 | # in case the id is needed for a new subscription. |
14 | @@ -555,6 +556,21 @@ |
15 | BugEditViewBase.__init__(self, context, request) |
16 | self.notifications = [] |
17 | |
18 | + @property |
19 | + def label(self): |
20 | + """The form label.""" |
21 | + return 'Edit Bug Information' |
22 | + |
23 | + @property |
24 | + def page_title(self): |
25 | + """The page title.""" |
26 | + return 'Edit %s ' % self.context.title |
27 | + |
28 | + @property |
29 | + def cancel_url(self): |
30 | + """See `LaunchpadFormView`.""" |
31 | + return canonical_url(self.context) |
32 | + |
33 | def validate(self, data): |
34 | """Make sure new tags are confirmed.""" |
35 | if 'tags' not in data: |
36 | |
37 | === modified file 'lib/lp/bugs/browser/configure.zcml' |
38 | --- lib/lp/bugs/browser/configure.zcml 2009-07-27 12:39:34 +0000 |
39 | +++ lib/lp/bugs/browser/configure.zcml 2009-08-13 18:51:36 +0000 |
40 | @@ -485,7 +485,7 @@ |
41 | name="+edit" |
42 | for="lp.bugs.interfaces.bugtask.IBugTask" |
43 | class="lp.bugs.browser.bug.BugEditView" |
44 | - template="../templates/bug-edit.pt" |
45 | + template="../../app/templates/generic-edit.pt" |
46 | permission="launchpad.Edit"/> |
47 | <browser:page |
48 | name="+secrecy" |
49 | |
50 | === removed file 'lib/lp/bugs/templates/bug-edit.pt' |
51 | --- lib/lp/bugs/templates/bug-edit.pt 2009-07-17 17:59:07 +0000 |
52 | +++ lib/lp/bugs/templates/bug-edit.pt 1970-01-01 00:00:00 +0000 |
53 | @@ -1,58 +0,0 @@ |
54 | -<html |
55 | - xmlns="http://www.w3.org/1999/xhtml" |
56 | - xmlns:tal="http://xml.zope.org/namespaces/tal" |
57 | - xmlns:metal="http://xml.zope.org/namespaces/metal" |
58 | - xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
59 | - xml:lang="en" |
60 | - lang="en" |
61 | - dir="ltr" |
62 | - metal:use-macro="context/@@main_template/master" |
63 | - i18n:domain="malone" |
64 | -> |
65 | - <body> |
66 | - <metal:heading fill-slot="pageheading"> |
67 | - <div> |
68 | - <tal:icon replace="structure context/image:icon" /> |
69 | - <a tal:attributes="href context/fmt:url" |
70 | - >Bug #<tal:bug replace="context/bug/id">3252543</tal:bug></a>: |
71 | - <tal:title replace="context/bug/title">Foo doesn't work</tal:title> |
72 | - </div> |
73 | - <h1>Edit bug description</h1> |
74 | - </metal:heading> |
75 | - |
76 | - <metal:leftportlets fill-slot="portlets_one"> |
77 | - <div tal:replace="structure context/bug/@@+portlet-subscribers" /> |
78 | - </metal:leftportlets> |
79 | - |
80 | - <metal:rightportlets fill-slot="portlets_two"> |
81 | - <div tal:replace="structure context/@@+portlet-search" /> |
82 | - <div tal:replace="structure context/bug/@@+portlet-cve" /> |
83 | - <div tal:replace="structure context/bug/@@+portlet-watch" /> |
84 | - </metal:rightportlets> |
85 | - |
86 | - <div metal:fill-slot="main"> |
87 | - |
88 | - <div metal:use-macro="context/@@launchpad_form/form"> |
89 | - |
90 | - |
91 | - <metal:extra_info metal:fill-slot="extra_info"> |
92 | - |
93 | - <p> |
94 | - Your changes will be reflected in all contexts where |
95 | - this bug has been reported. |
96 | - </p> |
97 | - |
98 | - <p class="informational message" |
99 | - tal:repeat="message view/notifications" |
100 | - tal:content="structure message"> |
101 | - Confirmation message. |
102 | - </p> |
103 | - |
104 | - </metal:extra_info> |
105 | - |
106 | - </div> |
107 | - |
108 | - </div> |
109 | - |
110 | - </body> |
111 | -</html> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
= Summary =
This branch is my first attempt at mechanical conversions for 3.0 UI
updates for bugs templates. This works on bug-edit.pt, which will
rarely be hit with all the recent AJAX work. The idea was to do an
easy, low-visibility template to start, to understand some basics of the
updating process.
See bug 412971 for a good bit of discussion/ mid-implementat ion notes as
I worked out what to do.
I think most of the comments there also get me pretty far along in UI
review. The only question I have remaining is minor. In the original
version the page heading was "Edit bug description" and I changed that
to "Edit bug information" since the page encompasses more fields than
description. Perhaps description is a better word or there is yet
another better term.
== Screenshots ==
Before: launchpadlibrar ian.net/ 30273670/ edit-bug- page-before- changes. png
http://
After: launchpadlibrar ian.net/ 30279936/ edit-bug- using-generic- edit.png
http://
== Tests ==
./bin/test -vv -t xx-bug-edit.txt
The test is currently broken, and I'm waiting on a fix to base layout by
Edwin to land before fixing the test. There may be other tests broken,
too, and I have the branch in ec2test for now to know for sure.
I'll amend the MP with a diff of test updates when done.
== Demo and Q/A ==
Add +edit to any bug page url and make sure the page works and looks
like it should.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: bugs/browser/ bug.py bugs/browser/ configure. zcml enigmail. mozdev. org
lib/lp/
lib/lp/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq FZC4ACgkQ4glRK0 DaE8hqKACePEtez QOZY461nq4jbK50 LhO+ t0eF7ZAl9HI37zn sigG+T
icwAn0n0s9+
=d32Q
-----END PGP SIGNATURE-----