launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17610
[Merge] lp:~wgrant/launchpad/buglisting-cleanups into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/buglisting-cleanups into lp:launchpad.
Commit message:
Revise most bug and bug listing page titles and labels.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1397422 in Launchpad itself: "bug number is no longer available in the body of a bug report"
https://bugs.launchpad.net/launchpad/+bug/1397422
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/buglisting-cleanups/+merge/243206
Revise most bug and bug listing page titles and labels.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/buglisting-cleanups into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/buglisting.py'
--- lib/lp/bugs/browser/buglisting.py 2014-11-29 01:33:59 +0000
+++ lib/lp/bugs/browser/buglisting.py 2014-11-29 06:51:34 +0000
@@ -70,6 +70,7 @@
UnexpectedFormData,
)
from lp.app.interfaces.launchpad import (
+ IHeadingContext,
IPrivacy,
IServiceUsage,
)
@@ -1003,11 +1004,12 @@
return product
return None
+ page_title = 'Bugs'
+
@property
- def page_title(self):
- return "Bugs for %s" % self.context.displayname
-
- label = page_title
+ def label(self):
+ if not IHeadingContext.providedBy(self.context):
+ return "Bugs for %s" % self.context.displayname
@property
def schema(self):
@@ -1475,10 +1477,6 @@
"""Return data used to render the milestone checkboxes."""
return self.getWidgetValues("MilestoneWithDateExpected")
- def getSimpleSearchURL(self):
- """Return a URL that can be used as an href to the simple search."""
- return canonical_url(self.context) + "/+bugs"
-
def shouldShowAssigneeWidget(self):
"""Should the assignee widget be shown on the advanced search page?"""
return True
@@ -1734,7 +1732,7 @@
"importance", "status", "heat"]
schema = IFrontPageBugTaskSearch
custom_widget('scope', ProjectScopeWidget)
- page_title = 'Search'
+ label = page_title = 'Search all bug reports'
def initialize(self):
"""Initialize the view for the request."""
@@ -1764,14 +1762,6 @@
canonical_url(search_target), query_string)
self.request.response.redirect(search_url)
- def getSearchPageHeading(self):
- """Return the heading to search all Bugs."""
- return "Search all bug reports"
-
- @property
- def label(self):
- return self.getSearchPageHeading()
-
class BugTaskExpirableListingView(BugTaskSearchListingView):
"""View for listing Incomplete bugs that can expire."""
@@ -1805,14 +1795,24 @@
bugtasks, self.request, columns_to_show=self.columns_to_show,
size=config.malone.buglist_batch_size)
+ page_title = 'Expirable bugs'
+
@property
- def page_title(self):
- return "Bugs that can expire in %s" % self.context.title
+ def label(self):
+ if not IHeadingContext.providedBy(self.context):
+ return "%s in %s" % (self.page_title, self.context.displayname)
+ return self.page_title
class BugNominationsView(BugTaskSearchListingView):
"""View for accepting/declining bug nominations."""
+ page_title = 'Nominated bugs'
+
+ @property
+ def label(self):
+ return "Bugs nominated for %s" % self.context.displayname
+
def search(self):
"""Return all the nominated tasks for this series."""
if IDistroSeries.providedBy(self.context):
=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py 2014-11-24 01:30:25 +0000
+++ lib/lp/bugs/browser/bugtarget.py 2014-11-29 06:51:34 +0000
@@ -68,6 +68,7 @@
UnexpectedFormData,
)
from lp.app.interfaces.launchpad import (
+ IHeadingContext,
ILaunchpadCelebrities,
ILaunchpadUsage,
)
@@ -965,6 +966,8 @@
class FileBugGuidedView(FilebugShowSimilarBugsView):
+ page_title = 'Report a bug'
+
_SEARCH_FOR_DUPES = ViewPageTemplateFile(
"../templates/bugtarget-filebug-search.pt")
_PROJECTGROUP_SEARCH_FOR_DUPES = ViewPageTemplateFile(
@@ -991,10 +994,6 @@
self.request.response.redirect(
config.malone.ubuntu_bug_filing_url)
- @property
- def page_title(self):
- return 'Report a bug about %s' % self.context.title
-
@safe_action
@action("Continue", name="search")
def search_action(self, action, data):
@@ -1028,6 +1027,8 @@
class ProjectGroupFileBugGuidedView(LaunchpadFormView):
"""Guided filebug pages for IProjectGroup."""
+ page_title = 'Report a bug'
+
schema = IProjectGroupBugAddForm
custom_widget('title', TextWidget, displayWidth=40)
@@ -1039,10 +1040,6 @@
def field_names(self):
return ['product', 'title', 'tags']
- @property
- def page_title(self):
- return 'Report a bug about %s' % self.context.title
-
@cachedproperty
def products_using_malone(self):
return [
@@ -1226,15 +1223,7 @@
schema = IOfficialBugTagTargetPublic
custom_widget('official_bug_tags', LargeBugTagsWidget)
- @property
- def label(self):
- """The form label."""
- return 'Manage official bug tags for %s' % self.context.title
-
- @property
- def page_title(self):
- """The page title."""
- return self.label
+ label = 'Manage official bug tags'
@action('Save', name='save')
def save_action(self, action, data):
@@ -1269,11 +1258,13 @@
class BugsPatchesView(LaunchpadView):
"""View list of patch attachments associated with bugs."""
+ page_title = 'Patch attachments'
+
@property
def label(self):
"""The display label for the view."""
- if IPerson.providedBy(self.context):
- return 'Patch attachments for %s' % self.context.displayname
+ if IHeadingContext.providedBy(self.context):
+ return self.page_title
else:
return 'Patch attachments in %s' % self.context.displayname
@@ -1350,6 +1341,15 @@
class TargetSubscriptionView(LaunchpadView):
"""A view to show all a person's structural subscriptions to a target."""
+ page_title = 'Your subscriptions'
+
+ @property
+ def label(self):
+ if IHeadingContext.providedBy(self.context):
+ return self.page_title
+ else:
+ return "Your subscriptions to %s" % self.context.displayname
+
def initialize(self):
super(TargetSubscriptionView, self).initialize()
expose_structural_subscription_data_to_js(
@@ -1359,9 +1359,3 @@
def subscriptions(self):
return get_structural_subscriptions_for_target(
self.context, self.user)
-
- @property
- def label(self):
- return "Your subscriptions to %s" % (self.context.displayname,)
-
- page_title = label
=== modified file 'lib/lp/bugs/browser/person.py'
--- lib/lp/bugs/browser/person.py 2014-11-29 01:33:59 +0000
+++ lib/lp/bugs/browser/person.py 2014-11-29 06:51:34 +0000
@@ -141,7 +141,7 @@
class BugSubscriberPackageBugsOverView(LaunchpadView):
- page_title = 'Package bugs'
+ label = 'Subscribed packages'
@cachedproperty
def total_bug_counts(self):
@@ -206,10 +206,6 @@
return super(FilteredSearchListingViewMixin, self).searchUnbatched(
searchtext, context, extra_params)
- def getSimpleSearchURL(self):
- """Return a URL that can be used as an href to the simple search."""
- return canonical_url(self.context, view_name=self.view_name)
-
class PersonAssignedBugTaskSearchListingView(FilteredSearchListingViewMixin):
"""All bugs assigned to someone."""
=== modified file 'lib/lp/bugs/browser/tests/test_buglisting.py'
--- lib/lp/bugs/browser/tests/test_buglisting.py 2014-11-29 04:55:45 +0000
+++ lib/lp/bugs/browser/tests/test_buglisting.py 2014-11-29 06:51:34 +0000
@@ -311,12 +311,6 @@
bug_target.ubuntu_packages[0], force_local_path=True)
self.assertEqual(link, content.a['href'])
- def test_product_index_title(self):
- bug_target = self._makeBugTargetProduct(
- bug_tracker='launchpad', product_name="testproduct")
- view = create_initialized_view(bug_target, '+bugs')
- self.assertEqual(u'Bugs for Testproduct', view.page_title)
-
def test_ask_question_does_not_use_launchpad(self):
bug_target = self._makeBugTargetProduct(
bug_tracker='launchpad', packaging=True)
=== modified file 'lib/lp/bugs/stories/bugs/xx-distribution-bugs-page.txt'
--- lib/lp/bugs/stories/bugs/xx-distribution-bugs-page.txt 2012-10-02 06:36:44 +0000
+++ lib/lp/bugs/stories/bugs/xx-distribution-bugs-page.txt 2014-11-29 06:51:34 +0000
@@ -79,7 +79,7 @@
>>> expirable_bugs_link.click()
>>> print anon_browser.title
- Bugs that can expire in Ubuntu...
+ Expirable bugs : Bugs : Ubuntu
Debian does not use Launchpad to track bugs; the anonymous user cannot
see any link reporting that bugs can expire.
=== modified file 'lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt'
--- lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt 2014-11-24 09:16:35 +0000
+++ lib/lp/bugs/stories/bugs/xx-distrorelease-bugs-page.txt 2014-11-29 06:51:34 +0000
@@ -59,5 +59,5 @@
>>> expirable_bugs_link.click()
>>> print anon_browser.title
- Bugs that can expire in The...
+ Expirable bugs : Warty (4.10) : Bugs : Ubuntu
=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-search.txt'
--- lib/lp/bugs/stories/bugs/xx-front-page-search.txt 2012-12-10 13:43:47 +0000
+++ lib/lp/bugs/stories/bugs/xx-front-page-search.txt 2014-11-29 06:51:34 +0000
@@ -26,7 +26,7 @@
>>> anon_browser.getControl(name='field.searchtext').value = 'test bug'
>>> anon_browser.getControl('Search Bug Reports').click()
>>> print anon_browser.title
- Search
+ Search all bug reports
>>> print_bugtasks(anon_browser.contents)
3 Bug Title Test
mozilla-firefox (Debian) Unknown New
@@ -48,7 +48,7 @@
>>> anon_browser.getControl(name='field.scope.target').value = 'evolution'
>>> anon_browser.getControl('Search Bug Reports').click()
>>> anon_browser.title
- 'Search'
+ 'Search all bug reports'
The same is of course true if the target widget contains a non-existant
project name.
@@ -59,7 +59,7 @@
>>> anon_browser.getControl(name='field.scope.target').value = 'invalid'
>>> anon_browser.getControl('Search Bug Reports').click()
>>> anon_browser.title
- 'Search'
+ 'Search all bug reports'
It's also possible to go to the search page directly, without submitting
the form at the front page.
@@ -67,7 +67,7 @@
>>> search_url, query = anon_browser.url.split('?', 1)
>>> anon_browser.open(search_url)
>>> anon_browser.title
- 'Search'
+ 'Search all bug reports'
== Searching one project ==
=== modified file 'lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt'
--- lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt 2012-10-02 06:36:44 +0000
+++ lib/lp/bugs/stories/bugs/xx-incomplete-bugs.txt 2014-11-29 06:51:34 +0000
@@ -154,7 +154,7 @@
>>> expirable_bugs_link.click()
>>> print user_browser.title
- Bugs that can expire in Jokosher...
+ Expirable bugs : Bugs : Jokosher
>>> contents = find_main_content(user_browser.contents)
>>> print_batch_header(contents)
=== modified file 'lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt'
--- lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2012-10-02 06:36:44 +0000
+++ lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2014-11-29 06:51:34 +0000
@@ -82,7 +82,7 @@
>>> expirable_bugs_link.click()
>>> print anon_browser.title
- Bugs that can expire in Jokosher...
+ Expirable bugs : Bugs : Jokosher
Product series may also have a link to expirable bugs. Jokosher's trunk
series has the link because Jokosher has enabled bug expiration.
@@ -91,7 +91,7 @@
>>> expirable_bugs_link = anon_browser.getLink('Incomplete bugs')
>>> expirable_bugs_link.click()
>>> print anon_browser.title
- Bugs that can expire in Jokosher...
+ Expirable bugs : Series trunk : Bugs : Jokosher
Thunderbird has not enabled bug expiration; the anonymous user
cannot see any link reporting that bugs can expire.
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt 2014-11-14 23:21:57 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt 2014-11-29 06:51:34 +0000
@@ -188,7 +188,8 @@
>>> anon_browser.getControl('Subscriber').value = subscriber
>>> anon_browser.getControl('Search', index=0).click()
>>> print extract_text(find_main_content(anon_browser.contents))
- Bugs for Mozilla Firefox ...
+ Advanced search
+ ...
No results for search
We'll continue by subscribing the same user to a couple of bugs.
=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-productseries-guided-filebug.txt'
--- lib/lp/bugs/stories/guided-filebug/xx-productseries-guided-filebug.txt 2009-09-18 15:24:30 +0000
+++ lib/lp/bugs/stories/guided-filebug/xx-productseries-guided-filebug.txt 2014-11-29 06:51:34 +0000
@@ -14,4 +14,4 @@
>>> user_browser.url
'http://bugs.launchpad.dev/firefox/+filebug'
>>> print user_browser.title
- Report a bug about Mozilla Firefox...
+ Report a bug : Bugs : Mozilla Firefox
=== modified file 'lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt'
--- lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt 2012-08-16 05:18:54 +0000
+++ lib/lp/bugs/stories/guided-filebug/xx-ubuntu-filebug.txt 2014-11-29 06:51:34 +0000
@@ -27,7 +27,7 @@
>>> user_browser.open(
... 'http://bugs.launchpad.dev/ubuntu/+filebug?no-redirect')
>>> print user_browser.title
- Report a bug about Ubuntu...
+ Report a bug : Bugs : Ubuntu
The no-redirect parameter is retained when we redirect a user to the bug
filing view of another context.
@@ -58,7 +58,7 @@
>>> admin_browser.open('http://bugs.launchpad.dev/ubuntu/+filebug')
>>> print admin_browser.title
- Report a bug about Ubuntu...
+ Report a bug : Bugs : Ubuntu
Filing bugs with Apport also allows us to get to the bug filing interface.
=== modified file 'lib/lp/bugs/stories/patches-view/patches-view.txt'
--- lib/lp/bugs/stories/patches-view/patches-view.txt 2014-11-27 07:48:25 +0000
+++ lib/lp/bugs/stories/patches-view/patches-view.txt 2014-11-29 06:51:34 +0000
@@ -90,7 +90,7 @@
>>> print_location(anon_browser.contents)
Hierarchy: Patchy 1
Tabs: ...
- Main heading: Patch attachments in Patchy 1
+ Main heading: Patch attachments
After creating some more bugs, with some non-patch and some patch
attachments, and various statuses...
@@ -276,6 +276,6 @@
The page title and other wording in the page reflects the contents.
>>> print_location(anon_browser.contents)
- Hierarchy: Patchy 1 > Series trunk > Patch attachments in trunk
+ Hierarchy: Patchy 1 > Series trunk > Patch attachments
Tabs: ...
Main heading: Patch attachments in trunk
=== modified file 'lib/lp/bugs/templates/bug-listing-expirable.pt'
--- lib/lp/bugs/templates/bug-listing-expirable.pt 2010-06-29 15:48:57 +0000
+++ lib/lp/bugs/templates/bug-listing-expirable.pt 2014-11-29 06:51:34 +0000
@@ -10,17 +10,11 @@
<body>
<tal:main metal:fill-slot="main">
<div class="top-portlet">
- <h1>
- Bugs that can expire in
- <tal:target replace="context/displayname" />
- </h1>
-
<p tal:condition="not: view/can_show_expirable_bugs">
This project has not enabled bug expiration. No bugs can expire.
Project administrator's may choose to enable bug expiration by
updating the project's details. See
<a href="https://help.launchpad.net/Bugs/Expiry">Bugs/Expiry.</a>
-
</p>
<tal:expirable-bugs condition="view/can_show_expirable_bugs">
=== modified file 'lib/lp/bugs/templates/bugtarget-macros-search.pt'
--- lib/lp/bugs/templates/bugtarget-macros-search.pt 2014-11-29 00:17:45 +0000
+++ lib/lp/bugs/templates/bugtarget-macros-search.pt 2014-11-29 06:51:34 +0000
@@ -80,9 +80,9 @@
<metal:block define-macro="simple-search-form">
<div id="bugs-search-form"
class="dynamic_bug_listing"
- tal:attributes="action search_url|string:">
+ tal:attributes="action string:">
<form method="get" name="search" class="primary search dynamic_bug_listing"
- tal:attributes="action search_url|string:">
+ tal:attributes="action string:">
<p>
<tal:searchbox replace="structure view/widgets/searchtext" />
<input type="submit" name="search" value="Search" />
@@ -95,9 +95,7 @@
<tal:widget replace="structure view/widgets/has_patch/hidden" />
<tal:widget replace="structure view/widgets/component/hidden" />
<tal:widget replace="structure view/widgets/has_no_package/hidden" />
- </p>
- <p>
- <a tal:attributes="href advanced_search_url|string:?advanced=1"
+ <a tal:attributes="href string:?advanced=1"
>Advanced search</a>
</p>
=== modified file 'lib/lp/bugs/templates/bugtask-index.pt'
--- lib/lp/bugs/templates/bugtask-index.pt 2012-08-16 15:39:56 +0000
+++ lib/lp/bugs/templates/bugtask-index.pt 2014-11-29 06:51:34 +0000
@@ -70,7 +70,7 @@
</metal:side>
<tal:registering metal:fill-slot="registering">
- Reported by
+ Bug #<tal:id replace="context/bug/id">1</tal:id> reported by
<tal:reporter replace="structure context/bug/owner/fmt:link" />
<span
tal:attributes="title context/bug/datecreated/fmt:datetime"
=== modified file 'lib/lp/bugs/templates/bugtask-macros-tableview.pt'
--- lib/lp/bugs/templates/bugtask-macros-tableview.pt 2014-11-29 00:49:24 +0000
+++ lib/lp/bugs/templates/bugtask-macros-tableview.pt 2014-11-29 06:51:34 +0000
@@ -16,7 +16,7 @@
<tal:searchbox replace="structure view/widgets/searchtext" />
<metal:widget use-macro="context/@@+bugtarget-macros-search/sortwidget" />
<input type="submit" name="search" value="Search" />
- <a tal:attributes="href view/getSimpleSearchURL">Simple search</a>
+ <a tal:attributes="href string:?">Simple search</a>
<fieldset>
<legend>Status and importance</legend>
=== modified file 'lib/lp/bugs/templates/person-packagebugs-overview.pt'
--- lib/lp/bugs/templates/person-packagebugs-overview.pt 2009-09-09 14:00:10 +0000
+++ lib/lp/bugs/templates/person-packagebugs-overview.pt 2014-11-29 06:51:34 +0000
@@ -10,18 +10,11 @@
i18n:domain="launchpad"
>
<body>
-
<metal:side fill-slot="side">
<tal:menu replace="structure context/@@+global-actions" />
</metal:side>
<div metal:fill-slot="main">
- <h1>Package bugs</h1>
-
- <p>
- <tal:person content="context/fmt:displayname">Sample Person</tal:person>
- is subscribed to these packages.
- </p>
<table class="listing">
<thead>
<tr>
Follow ups