Merge lp:~deryck/launchpad/person-bug-page-ui-update-434794 into lp:launchpad
- person-bug-page-ui-update-434794
- Merge into devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp:~deryck/launchpad/person-bug-page-ui-update-434794 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: | None lines | ||||
To merge this branch: | bzr merge lp:~deryck/launchpad/person-bug-page-ui-update-434794 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | release-critical | Approve | |
Graham Binns (community) | code | Approve | |
Jeroen T. Vermeulen (community) | Needs Fixing | ||
Review via email: mp+12275@code.launchpad.net |
Commit message
Description of the change
Deryck Hodge (deryck) wrote : | # |
Jeroen T. Vermeulen (jtv) wrote : | # |
Several problems, as discussed on IRC:
* Don't fill the heading slot. Let the h1 be generated from your view's label, and the title from your breadcrumbs.
* getSearchPageHe
* The getSearchPageHe
* I guess there's no time to change this now, but the actions menu is basically a related-pages menu. I don't think it belongs in the sidebar in the new design; it probably ought to be a horizontal line of links at the top or bottom, with an info icon for each.
Deryck Hodge (deryck) wrote : | # |
On Wed, Sep 23, 2009 at 7:50 AM, Jeroen T. Vermeulen <email address hidden> wrote:
> * I guess there's no time to change this now, but the actions menu is basically a related-pages menu. I don't think it belongs in the sidebar in the new design; it probably ought to be a horizontal line of links at the top or bottom, with an info icon for each.
I thought I followed examples in registry templates for this. If this
needs to be in a grid above the results I can file a bug, but it seems
fine to me as a side bar set. I do know people pages have related
pages in the side in other templates.
Here's an updated diff for everything else:
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -3325,6 +3325,7 @@
schema = IFrontPageBugTa
custom_
+ page_title = 'Search'
def initialize(self):
@@ -3359,7 +3360,7 @@
return "Search all bug reports"
@property
- def page_title(self):
+ def label(self):
return self.getSearchP
=== modified file 'lib/lp/
--- lib/lp/
04:31:16 +0000
+++ lib/lp/
12:45:16 +0000
@@ -7,8 +7,6 @@
i18n:
<body>
- <h1 metal:fill-
-
<div metal:fill-
<tal:menu replace="structure context/
<div tal:condition=
=== modified file 'lib/lp/
--- lib/lp/
+++ lib/lp/
@@ -1820,6 +1820,7 @@
"""Bugs reported on packages for a bug subscriber."""
columns_
+ page_title = 'Package bugs'
@property
def current_
@@ -2013,6 +2014,10 @@
def getSimpleSearch
return self.getBugSubs
+ @property
+ def label(self):
+ return self.getSearchP
+
class RelevantMilesto
"""Mixin to narrow the milestone list to only relevant milestones."""
@@ -2033,6 +2038,7 @@
columns_
+ page_title = 'Related bugs'
def searchUnbatched
@@ -2082,7 +2088,7 @@
return canonical_
@property
- def page_title(self):
+ def label(self):
return self.getSearchP
@@ -2092,6 +2098,7 @@
columns_
+ page_title = 'Assigned bugs'
def searchUnbatched
Graham Binns (gmb) : | # |
Brad Crittenden (bac) wrote : | # |
Hi Deryck,
Thanks for getting this template converted. The changes Martin suggested are ones we definitely need to include but there is no time to make the current release schedule.
r9566 of your branch is approved for release-critical submission. We'll tackle the other issues immediately afterwards.
Thanks for the hard work.
Preview Diff
1 | === modified file 'lib/lp/bugs/browser/bugtask.py' | |||
2 | --- lib/lp/bugs/browser/bugtask.py 2009-09-20 20:46:39 +0000 | |||
3 | +++ lib/lp/bugs/browser/bugtask.py 2009-09-23 12:13:38 +0000 | |||
4 | @@ -155,8 +155,8 @@ | |||
5 | 155 | NewLineToSpacesWidget, NominationReviewActionWidget) | 155 | NewLineToSpacesWidget, NominationReviewActionWidget) |
6 | 156 | from canonical.widgets.itemswidgets import LabeledMultiCheckBoxWidget | 156 | from canonical.widgets.itemswidgets import LabeledMultiCheckBoxWidget |
7 | 157 | from canonical.widgets.lazrjs import ( | 157 | from canonical.widgets.lazrjs import ( |
10 | 158 | InlineEditPickerWidget, TextAreaEditorWidget, | 158 | TextAreaEditorWidget, TextLineEditorWidget, |
11 | 159 | TextLineEditorWidget, vocabulary_to_choice_edit_items) | 159 | vocabulary_to_choice_edit_items) |
12 | 160 | from canonical.widgets.project import ProjectScopeWidget | 160 | from canonical.widgets.project import ProjectScopeWidget |
13 | 161 | 161 | ||
14 | 162 | from lp.registry.vocabularies import MilestoneVocabulary | 162 | from lp.registry.vocabularies import MilestoneVocabulary |
15 | @@ -1961,7 +1961,8 @@ | |||
16 | 1961 | 1961 | ||
17 | 1962 | @enabled_with_permission('launchpad.Edit') | 1962 | @enabled_with_permission('launchpad.Edit') |
18 | 1963 | def securitycontact(self): | 1963 | def securitycontact(self): |
20 | 1964 | return Link('+securitycontact', 'Change security contact', icon='edit') | 1964 | return Link( |
21 | 1965 | '+securitycontact', 'Change security contact', icon='edit') | ||
22 | 1965 | 1966 | ||
23 | 1966 | def subscribe(self): | 1967 | def subscribe(self): |
24 | 1967 | return Link('+subscribe', 'Subscribe to bug mail', icon='edit') | 1968 | return Link('+subscribe', 'Subscribe to bug mail', icon='edit') |
25 | @@ -3357,6 +3358,10 @@ | |||
26 | 3357 | """Return the heading to search all Bugs.""" | 3358 | """Return the heading to search all Bugs.""" |
27 | 3358 | return "Search all bug reports" | 3359 | return "Search all bug reports" |
28 | 3359 | 3360 | ||
29 | 3361 | @property | ||
30 | 3362 | def page_title(self): | ||
31 | 3363 | return self.getSearchPageHeading() | ||
32 | 3364 | |||
33 | 3360 | 3365 | ||
34 | 3361 | class BugTaskPrivacyAdapter: | 3366 | class BugTaskPrivacyAdapter: |
35 | 3362 | """Provides `IObjectPrivacy` for `IBugTask`.""" | 3367 | """Provides `IObjectPrivacy` for `IBugTask`.""" |
36 | 3363 | 3368 | ||
37 | === modified file 'lib/lp/bugs/templates/buglisting-embedded-advanced-search.pt' | |||
38 | --- lib/lp/bugs/templates/buglisting-embedded-advanced-search.pt 2009-07-17 17:59:07 +0000 | |||
39 | +++ lib/lp/bugs/templates/buglisting-embedded-advanced-search.pt 2009-09-23 04:31:16 +0000 | |||
40 | @@ -3,23 +3,17 @@ | |||
41 | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" | 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
42 | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" | 4 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
43 | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" | 5 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
50 | 6 | xml:lang="en" | 6 | metal:use-macro="view/macro:page/main_side" |
51 | 7 | lang="en" | 7 | i18n:domain="launchpad"> |
46 | 8 | dir="ltr" | ||
47 | 9 | metal:use-macro="context/@@main_template/master" | ||
48 | 10 | i18n:domain="malone" | ||
49 | 11 | > | ||
52 | 12 | 8 | ||
53 | 13 | <body> | 9 | <body> |
61 | 14 | 10 | <h1 metal:fill-slot="heading" tal:content="view/page_title" /> | |
62 | 15 | <metal:heading fill-slot="pageheading"> | 11 | |
63 | 16 | <h1 tal:content="view/getSearchPageHeading"></h1> | 12 | <div metal:fill-slot="side"> |
64 | 17 | </metal:heading> | 13 | <tal:menu replace="structure context/@@+global-actions" /> |
65 | 18 | 14 | <div tal:condition="view/shouldShowAssignedToTeamPortlet|nothing" | |
59 | 19 | <metal:leftportlets fill-slot="portlets_one"> | ||
60 | 20 | <div tal:condition="view/shouldShowAssignedToTeamPortlet|nothing" | ||
66 | 21 | tal:content="structure context/@@+portlet-team-assignedbugs" /> | 15 | tal:content="structure context/@@+portlet-team-assignedbugs" /> |
68 | 22 | </metal:leftportlets> | 16 | </div> |
69 | 23 | 17 | ||
70 | 24 | <div metal:fill-slot="main"> | 18 | <div metal:fill-slot="main"> |
71 | 25 | <tal:do_not_show_advanced_form | 19 | <tal:do_not_show_advanced_form |
72 | @@ -36,8 +30,6 @@ | |||
73 | 36 | use-macro="context/@@+bugtask-macros-tableview/advanced_search_form" /> | 30 | use-macro="context/@@+bugtask-macros-tableview/advanced_search_form" /> |
74 | 37 | </tal:show_advanced> | 31 | </tal:show_advanced> |
75 | 38 | <div class="visualClear"> </div> | 32 | <div class="visualClear"> </div> |
76 | 39 | |||
77 | 40 | </div> | 33 | </div> |
78 | 41 | |||
79 | 42 | </body> | 34 | </body> |
80 | 43 | </html> | 35 | </html> |
81 | 44 | 36 | ||
82 | === modified file 'lib/lp/registry/browser/person.py' | |||
83 | --- lib/lp/registry/browser/person.py 2009-09-22 15:02:41 +0000 | |||
84 | +++ lib/lp/registry/browser/person.py 2009-09-23 04:38:00 +0000 | |||
85 | @@ -2081,6 +2081,10 @@ | |||
86 | 2081 | def getSimpleSearchURL(self): | 2081 | def getSimpleSearchURL(self): |
87 | 2082 | return canonical_url(self.context, view_name="+bugs") | 2082 | return canonical_url(self.context, view_name="+bugs") |
88 | 2083 | 2083 | ||
89 | 2084 | @property | ||
90 | 2085 | def page_title(self): | ||
91 | 2086 | return self.getSearchPageHeading() | ||
92 | 2087 | |||
93 | 2084 | 2088 | ||
94 | 2085 | class PersonAssignedBugTaskSearchListingView(RelevantMilestonesMixin, | 2089 | class PersonAssignedBugTaskSearchListingView(RelevantMilestonesMixin, |
95 | 2086 | BugTaskSearchListingView): | 2090 | BugTaskSearchListingView): |
96 | @@ -2133,6 +2137,10 @@ | |||
97 | 2133 | """Return a URL that can be usedas an href to the simple search.""" | 2137 | """Return a URL that can be usedas an href to the simple search.""" |
98 | 2134 | return canonical_url(self.context, view_name="+assignedbugs") | 2138 | return canonical_url(self.context, view_name="+assignedbugs") |
99 | 2135 | 2139 | ||
100 | 2140 | @property | ||
101 | 2141 | def page_title(self): | ||
102 | 2142 | return self.getSearchPageHeading() | ||
103 | 2143 | |||
104 | 2136 | 2144 | ||
105 | 2137 | class PersonCommentedBugTaskSearchListingView(RelevantMilestonesMixin, | 2145 | class PersonCommentedBugTaskSearchListingView(RelevantMilestonesMixin, |
106 | 2138 | BugTaskSearchListingView): | 2146 | BugTaskSearchListingView): |
107 | @@ -2173,6 +2181,10 @@ | |||
108 | 2173 | """Return a URL that can be used as an href to the simple search.""" | 2181 | """Return a URL that can be used as an href to the simple search.""" |
109 | 2174 | return canonical_url(self.context, view_name="+commentedbugs") | 2182 | return canonical_url(self.context, view_name="+commentedbugs") |
110 | 2175 | 2183 | ||
111 | 2184 | @property | ||
112 | 2185 | def page_title(self): | ||
113 | 2186 | return self.getSearchPageHeading() | ||
114 | 2187 | |||
115 | 2176 | 2188 | ||
116 | 2177 | class PersonReportedBugTaskSearchListingView(RelevantMilestonesMixin, | 2189 | class PersonReportedBugTaskSearchListingView(RelevantMilestonesMixin, |
117 | 2178 | BugTaskSearchListingView): | 2190 | BugTaskSearchListingView): |
118 | @@ -2224,6 +2236,10 @@ | |||
119 | 2224 | """Should the tags combinator widget show on the search page?""" | 2236 | """Should the tags combinator widget show on the search page?""" |
120 | 2225 | return False | 2237 | return False |
121 | 2226 | 2238 | ||
122 | 2239 | @property | ||
123 | 2240 | def page_title(self): | ||
124 | 2241 | return self.getSearchPageHeading() | ||
125 | 2242 | |||
126 | 2227 | 2243 | ||
127 | 2228 | class PersonSubscribedBugTaskSearchListingView(RelevantMilestonesMixin, | 2244 | class PersonSubscribedBugTaskSearchListingView(RelevantMilestonesMixin, |
128 | 2229 | BugTaskSearchListingView): | 2245 | BugTaskSearchListingView): |
129 | @@ -2264,6 +2280,10 @@ | |||
130 | 2264 | """Return a URL that can be used as an href to the simple search.""" | 2280 | """Return a URL that can be used as an href to the simple search.""" |
131 | 2265 | return canonical_url(self.context, view_name="+subscribedbugs") | 2281 | return canonical_url(self.context, view_name="+subscribedbugs") |
132 | 2266 | 2282 | ||
133 | 2283 | @property | ||
134 | 2284 | def page_title(self): | ||
135 | 2285 | return self.getSearchPageHeading() | ||
136 | 2286 | |||
137 | 2267 | 2287 | ||
138 | 2268 | class PersonVouchersView(LaunchpadFormView): | 2288 | class PersonVouchersView(LaunchpadFormView): |
139 | 2269 | """Form for displaying and redeeming commercial subscription vouchers.""" | 2289 | """Form for displaying and redeeming commercial subscription vouchers.""" |
140 | 2270 | 2290 | ||
141 | === modified file 'lib/lp/registry/stories/foaf/xx-person-bugs.txt' | |||
142 | --- lib/lp/registry/stories/foaf/xx-person-bugs.txt 2009-06-12 16:36:02 +0000 | |||
143 | +++ lib/lp/registry/stories/foaf/xx-person-bugs.txt 2009-09-23 04:36:10 +0000 | |||
144 | @@ -60,7 +60,7 @@ | |||
145 | 60 | 60 | ||
146 | 61 | >>> anon_browser.getLink('List assigned bugs').click() | 61 | >>> anon_browser.getLink('List assigned bugs').click() |
147 | 62 | >>> print anon_browser.title | 62 | >>> print anon_browser.title |
149 | 63 | Bugs assigned to Sample Person | 63 | Bugs assigned to Sample Person : Sample Person |
150 | 64 | >>> print anon_browser.url | 64 | >>> print anon_browser.url |
151 | 65 | http://bugs.launchpad.dev/~name12/+assignedbugs | 65 | http://bugs.launchpad.dev/~name12/+assignedbugs |
152 | 66 | 66 | ||
153 | @@ -77,7 +77,7 @@ | |||
154 | 77 | 77 | ||
155 | 78 | >>> anon_browser.getLink('List commented bugs').click() | 78 | >>> anon_browser.getLink('List commented bugs').click() |
156 | 79 | >>> print anon_browser.title | 79 | >>> print anon_browser.title |
158 | 80 | Bugs commented on by Sample Person | 80 | Bugs commented on by Sample Person : Sample Person |
159 | 81 | >>> print anon_browser.url | 81 | >>> print anon_browser.url |
160 | 82 | http://bugs.launchpad.dev/~name12/+commentedbugs | 82 | http://bugs.launchpad.dev/~name12/+commentedbugs |
161 | 83 | 83 | ||
162 | @@ -98,7 +98,7 @@ | |||
163 | 98 | 98 | ||
164 | 99 | >>> anon_browser.getLink('List reported bugs').click() | 99 | >>> anon_browser.getLink('List reported bugs').click() |
165 | 100 | >>> print anon_browser.title | 100 | >>> print anon_browser.title |
167 | 101 | Bugs reported by Sample Person | 101 | Bugs reported by Sample Person : Sample Person |
168 | 102 | >>> print anon_browser.url | 102 | >>> print anon_browser.url |
169 | 103 | http://bugs.launchpad.dev/~name12/+reportedbugs | 103 | http://bugs.launchpad.dev/~name12/+reportedbugs |
170 | 104 | 104 | ||
171 | @@ -127,7 +127,7 @@ | |||
172 | 127 | 127 | ||
173 | 128 | >>> anon_browser.getLink('List subscribed bugs').click() | 128 | >>> anon_browser.getLink('List subscribed bugs').click() |
174 | 129 | >>> print anon_browser.title | 129 | >>> print anon_browser.title |
176 | 130 | Bugs Sample Person is subscribed to | 130 | Bugs Sample Person is subscribed to : Sample Person |
177 | 131 | >>> print anon_browser.url | 131 | >>> print anon_browser.url |
178 | 132 | http://bugs.launchpad.dev/~name12/+subscribedbugs | 132 | http://bugs.launchpad.dev/~name12/+subscribedbugs |
179 | 133 | 133 |
The final template converted! w00t!
This converts the template for displaying a person's bug page and
related bug pages (assigned bugs, commented bugs, etc.) These are just
mechanical changes.
This is tracked at bug 434794.
To demo, visit https:/ /bugs.launchpad .dev/~name16
(or any other user bug page).
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ stories/ foaf/xx- person- bugs.txt bugs/templates/ buglisting- embedded- advanced- search. pt bugs/browser/ bugtask. py registry/ browser/ person. py
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ bugs/browser/ bugtask. py .event' (No module named .snapshot' (No module interface' (No module interfaces' (No module interfaces' (No module
73: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)
74: [F0401] Unable to import 'lazr.enum' (No module named enum)
76: [F0401] Unable to import 'lazr.lifecycle
lifecycle)
77: [F0401] Unable to import 'lazr.lifecycle
named lifecycle)
78: [F0401] Unable to import 'lazr.restful.
named restful)
79: [F0401] Unable to import 'lazr.restful.
named restful)
149: [F0401] Unable to import 'lazr.restful.
named restful)
lib/lp/ registry/ browser/ person. py interface' (No module
117: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)
118: [F0401] Unable to import 'lazr.config' (No module named config)
119: [F0401] Unable to import 'lazr.restful.
named restful)