Merge lp:~michael.nelson/launchpad/sprint-index-should-hide-heading-db-devel into lp:launchpad/db-devel

Proposed by Michael Nelson
Status: Merged
Merged at revision: not available
Proposed branch: lp:~michael.nelson/launchpad/sprint-index-should-hide-heading-db-devel
Merge into: lp:launchpad/db-devel
Diff against target: 73 lines
3 files modified
lib/lp/blueprints/browser/sprint.py (+7/-2)
lib/lp/blueprints/stories/sprints/05-sprint-creation.txt (+20/-0)
lib/lp/blueprints/templates/sprint-portlet-attendees.pt (+1/-2)
To merge this branch: bzr merge lp:~michael.nelson/launchpad/sprint-index-should-hide-heading-db-devel
Reviewer Review Type Date Requested Status
Brad Crittenden (community) release-critical Approve
Gavin Panella (community) Approve
Review via email: mp+12284@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 435269.

I landed the sprint-index update the other day, but subsequently a
view.label was added to a parent class of SprintView. It was my fault
for not have a test that explicitly ensured no h1 was included below the
app-tabs.

== Proposed fix ==

Specifically set the view.label to None for the SprintView. This is a
workaround for bug 435255.

== Pre-implementation notes ==

== Implementation details ==

== Tests ==
bin/test -vvt stories/sprints

== Demo and Q/A ==
Screenshots:
http://people.canonical.com/~michaeln/tmp/sprint-index-heading-before.png
http://people.canonical.com/~michaeln/tmp/sprint-index-should-hide-heading-after.png

QA: https://edge.launchpad.net/sprints/uds-l

Demo: https://launchpad.dev/sprints/uds-guacamole

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/blueprints/stories/sprints/05-sprint-creation.txt
  lib/lp/blueprints/browser/sprint.py
  lib/lp/blueprints/templates/sprint-portlet-attendees.pt

== Pyflakes notices ==

lib/lp/blueprints/browser/sprint.py
    35: 'Hierarchy' imported but unused
    37: 'ApplicationMenu' imported but unused

== Pylint notices ==

lib/lp/blueprints/browser/sprint.py
    37: [W0611] Unused import ApplicationMenu
    35: [W0611] Unused import Hierarchy

I removed this lint with r8503.

--
Michael

Revision history for this message
Michael Nelson (michael.nelson) wrote :

I forgot to mention two things:

(1) the second h1 heading that is displayed is actually incorrect - it refers to blueprints (a default heading of the base-class :/ ).

(2) I also fixed the icon issues for attendees as you'll see in the screenshots.

Revision history for this message
Gavin Panella (allenap) :
review: Approve
Revision history for this message
Brad Crittenden (bac) :
review: Approve (release-critical)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/blueprints/browser/sprint.py'
2--- lib/lp/blueprints/browser/sprint.py 2009-09-22 15:02:41 +0000
3+++ lib/lp/blueprints/browser/sprint.py 2009-09-24 14:15:25 +0000
4@@ -32,10 +32,9 @@
5
6 from canonical.cachedproperty import cachedproperty
7 from canonical.launchpad import _
8-from canonical.launchpad.browser import Hierarchy
9 from canonical.launchpad.helpers import shortlist
10 from canonical.launchpad.webapp import (
11- ApplicationMenu, GetitemNavigation, LaunchpadEditFormView,
12+ GetitemNavigation, LaunchpadEditFormView,
13 LaunchpadFormView, LaunchpadView, Link, Navigation, NavigationMenu,
14 StandardLaunchpadFacets, action, canonical_url, custom_widget,
15 enabled_with_permission)
16@@ -145,6 +144,12 @@
17
18 implements(IMajorHeadingView)
19
20+ # XXX Michael Nelson 20090923 bug=435255
21+ # This class inherits a label from HasSpecificationsView, which causes
22+ # a second h1 to display. But as this view implements IMajorHeadingView
23+ # it should not include an h1 below the app buttons.
24+ label = None
25+
26 def initialize(self):
27 self.notices = []
28 self.latest_specs_limit = 5
29
30=== modified file 'lib/lp/blueprints/stories/sprints/05-sprint-creation.txt'
31--- lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-21 07:13:45 +0000
32+++ lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-24 14:15:25 +0000
33@@ -77,6 +77,26 @@
34 >>> user_browser.url
35 'http://launchpad.dev/sprints/ltsponsteroids'
36
37+Because sprints are root contexts, an h1 heading is used to display
38+the main heading above the application buttons) and the breadcrumbs
39+are not displayed.
40+
41+ >>> print_location(user_browser.contents)
42+ Hierarchy: None displayed
43+ Tabs:
44+ * Overview (selected) - not linked
45+ ...
46+ * Bugs - not linked
47+ * Blueprints - http://blueprints.launchpad.dev/sprints/ltsponsteroids
48+ * Translations - not linked
49+ * Answers - not linked
50+ Main heading: LTSP On Steroids
51+
52+There is no h1 heading in the main content.
53+
54+ >>> print find_main_content(user_browser.contents).find('h1')
55+ None
56+
57 Since the sprint's time zone was set to UTC, the dates are displayed in
58 that time zone:
59
60
61=== modified file 'lib/lp/blueprints/templates/sprint-portlet-attendees.pt'
62--- lib/lp/blueprints/templates/sprint-portlet-attendees.pt 2009-07-17 17:59:07 +0000
63+++ lib/lp/blueprints/templates/sprint-portlet-attendees.pt 2009-09-24 14:15:25 +0000
64@@ -12,8 +12,7 @@
65
66 <ul>
67 <li class="person" tal:repeat="attendance context/attendances">
68- <a tal:attributes="href attendance/attendee/fmt:url"
69- tal:content="attendance/attendee/displayname">Foo Bar</a><br />
70+ <a tal:replace="structure attendance/attendee/fmt:link">Foo Bar</a><br />
71 <div class="discreet">
72 <span tal:replace="python:view.formatDate(attendance.time_starts)">
73 2005-08-05</span> till

Subscribers

People subscribed via source and target branches

to status/vote changes: