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

Proposed by Michael Nelson
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~michael.nelson/launchpad/sprint-index-should-hide-heading-db-devel
Merge into: lp://staging/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://staging/~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.staging.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
=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py 2009-09-22 15:02:41 +0000
+++ lib/lp/blueprints/browser/sprint.py 2009-09-24 14:15:25 +0000
@@ -32,10 +32,9 @@
3232
33from canonical.cachedproperty import cachedproperty33from canonical.cachedproperty import cachedproperty
34from canonical.launchpad import _34from canonical.launchpad import _
35from canonical.launchpad.browser import Hierarchy
36from canonical.launchpad.helpers import shortlist35from canonical.launchpad.helpers import shortlist
37from canonical.launchpad.webapp import (36from canonical.launchpad.webapp import (
38 ApplicationMenu, GetitemNavigation, LaunchpadEditFormView,37 GetitemNavigation, LaunchpadEditFormView,
39 LaunchpadFormView, LaunchpadView, Link, Navigation, NavigationMenu,38 LaunchpadFormView, LaunchpadView, Link, Navigation, NavigationMenu,
40 StandardLaunchpadFacets, action, canonical_url, custom_widget,39 StandardLaunchpadFacets, action, canonical_url, custom_widget,
41 enabled_with_permission)40 enabled_with_permission)
@@ -145,6 +144,12 @@
145144
146 implements(IMajorHeadingView)145 implements(IMajorHeadingView)
147146
147 # XXX Michael Nelson 20090923 bug=435255
148 # This class inherits a label from HasSpecificationsView, which causes
149 # a second h1 to display. But as this view implements IMajorHeadingView
150 # it should not include an h1 below the app buttons.
151 label = None
152
148 def initialize(self):153 def initialize(self):
149 self.notices = []154 self.notices = []
150 self.latest_specs_limit = 5155 self.latest_specs_limit = 5
151156
=== modified file 'lib/lp/blueprints/stories/sprints/05-sprint-creation.txt'
--- lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-21 07:13:45 +0000
+++ lib/lp/blueprints/stories/sprints/05-sprint-creation.txt 2009-09-24 14:15:25 +0000
@@ -77,6 +77,26 @@
77 >>> user_browser.url77 >>> user_browser.url
78 'http://launchpad.dev/sprints/ltsponsteroids'78 'http://launchpad.dev/sprints/ltsponsteroids'
7979
80Because sprints are root contexts, an h1 heading is used to display
81the main heading above the application buttons) and the breadcrumbs
82are not displayed.
83
84 >>> print_location(user_browser.contents)
85 Hierarchy: None displayed
86 Tabs:
87 * Overview (selected) - not linked
88 ...
89 * Bugs - not linked
90 * Blueprints - http://blueprints.launchpad.dev/sprints/ltsponsteroids
91 * Translations - not linked
92 * Answers - not linked
93 Main heading: LTSP On Steroids
94
95There is no h1 heading in the main content.
96
97 >>> print find_main_content(user_browser.contents).find('h1')
98 None
99
80Since the sprint's time zone was set to UTC, the dates are displayed in100Since the sprint's time zone was set to UTC, the dates are displayed in
81that time zone:101that time zone:
82102
83103
=== modified file 'lib/lp/blueprints/templates/sprint-portlet-attendees.pt'
--- lib/lp/blueprints/templates/sprint-portlet-attendees.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprint-portlet-attendees.pt 2009-09-24 14:15:25 +0000
@@ -12,8 +12,7 @@
1212
13 <ul>13 <ul>
14 <li class="person" tal:repeat="attendance context/attendances">14 <li class="person" tal:repeat="attendance context/attendances">
15 <a tal:attributes="href attendance/attendee/fmt:url"15 <a tal:replace="structure attendance/attendee/fmt:link">Foo Bar</a><br />
16 tal:content="attendance/attendee/displayname">Foo Bar</a><br />
17 <div class="discreet">16 <div class="discreet">
18 <span tal:replace="python:view.formatDate(attendance.time_starts)">17 <span tal:replace="python:view.formatDate(attendance.time_starts)">
19 2005-08-05</span> till18 2005-08-05</span> till

Subscribers

People subscribed via source and target branches

to status/vote changes: