Code review comment for lp:~barry/launchpad/416703-sprints

Revision history for this message
Barry Warsaw (barry) wrote :

= Summary =

Bug 416703 describes the conversion of the top level /sprints page to UI 3.0.
This was a fairly mechanical change given that this is the fifth such related
branch I've done.

NOTE: This branch is dependent on one that has not yet landed. Please use the
attached diff if the generated one does not take the branch dependencies into
account.

== Proposed fix ==

Fiddle with templates, etc.

== Pre-implementation notes ==

Not much, except that after a discussion on irc, it was decided to restore the
'info' icons and the 'View...' prefix in the navmenu, for consistency with the
rest of the ui.

== Implementation details ==

Not much extra.

== Tests ==

Will run through ec2 before landing.

== Demo and Q/A ==

* Visit http://launchpad.dev/sprints

= 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/registry/browser/configure.zcml
  lib/lp/blueprints/templates/sprints-index.pt
  lib/lp/registry/browser/menu.py
  lib/canonical/launchpad/pagetitles.py
  lib/lp/registry/browser/product.py
  lib/lp/blueprints/browser/sprint.py
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/blueprints/browser/configure.zcml
  lib/lp/registry/templates/projects-index.pt
  lib/lp/registry/templates/distros-index.pt
  lib/lp/registry/templates/products-index.pt
  lib/lp/registry/browser/distribution.py
  lib/lp/registry/browser/project.py

== diff ==

=== modified file 'lib/canonical/launchpad/pagetitles.py'
--- lib/canonical/launchpad/pagetitles.py 2009-08-21 15:19:02 +0000
+++ lib/canonical/launchpad/pagetitles.py 2009-08-21 20:04:25 +0000
@@ -1284,8 +1284,6 @@

 sprints_all = 'All sprints and meetings registered in Launchpad'

-sprints_index = 'Meetings and sprints registered in Launchpad'
-
 sprintspecification_decide = 'Consider spec for sprint agenda'

 sprintspecification_admin = 'Approve blueprint for sprint agenda'

=== modified file 'lib/lp/blueprints/browser/configure.zcml'
--- lib/lp/blueprints/browser/configure.zcml 2009-08-03 14:38:55 +0000
+++ lib/lp/blueprints/browser/configure.zcml 2009-08-21 20:04:25 +0000
@@ -147,9 +147,6 @@
         <browser:page
             name="+all"
             template="../templates/sprints-all.pt"/>
- <browser:page
- name="+portlet-details"
- template="../templates/sprints-portlet-details.pt"/>
     </browser:pages>
     <browser:page
         name="+new"

=== modified file 'lib/lp/blueprints/browser/sprint.py'
--- lib/lp/blueprints/browser/sprint.py 2009-06-25 00:00:26 +0000
+++ lib/lp/blueprints/browser/sprint.py 2009-08-21 20:04:25 +0000
@@ -28,8 +28,9 @@
 import pytz
 from StringIO import StringIO

+from zope.app.form.browser import TextAreaWidget
 from zope.component import getUtility
-from zope.app.form.browser import TextAreaWidget
+from zope.interface import implements

 from canonical.launchpad import _
 from canonical.cachedproperty import cachedproperty
@@ -40,6 +41,8 @@
     SpecificationDefinitionStatus, SpecificationFilter, SpecificationPriority,
     SpecificationSort)
 from lp.blueprints.interfaces.sprint import ISprint, ISprintSet
+from lp.registry.browser.menu import (
+ IRegistryCollectionNavigationMenu, RegistryCollectionActionMenuBase)
 from canonical.launchpad.webapp import (
     ApplicationMenu, ContextMenu, GetitemNavigation, LaunchpadEditFormView,
     LaunchpadFormView, LaunchpadView, Link, Navigation,
@@ -488,7 +491,22 @@
         return body.encode('utf-8')

+class SprintSetNavigationMenu(RegistryCollectionActionMenuBase):
+ """Action menu for sprints index."""
+ usedfor = ISprintSet
+ links = [
+ 'register_team',
+ 'register_project',
+ 'create_account',
+ ]
+
+
 class SprintSetView(LaunchpadView):
+ """View for the /sprints top level collection page."""
+
+ implements(IRegistryCollectionNavigationMenu)
+
+ page_title = 'Meetings and sprints registered in Launchpad'

     def all_batched(self):
         return BatchNavigator(self.context.all, self.request)

=== modified file 'lib/lp/blueprints/templates/sprints-index.pt'
--- lib/lp/blueprints/templates/sprints-index.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprints-index.pt 2009-08-21 20:07:57 +0000
@@ -6,34 +6,37 @@
   xml:lang="en"
   lang="en"
   dir="ltr"
- metal:use-macro="view/macro:page/pillarindex"
+ metal:use-macro="view/macro:page/main_side"
   i18n:domain="launchpad">
+
   <body>
     <h1 metal:fill-slot="heading">Coming events</h1>

-<metal:rightportlets fill-slot="portlets_two">
- <div tal:replace="structure context/@@+portlet-details" />
-</metal:rightportlets>
-
-<div metal:fill-slot="main">
-
- <p id="application-summary">
- Launchpad can help you organise your developer sprints, summits and
- gatherings. Register the meeting here, then you can invite people to
- nominate blueprints for discussion at the event. The meeting drivers
- control the agenda, but everyone can see what's proposed and what's
- been accepted.
- </p>
-
- <table>
- <tbody>
- <tal:sprint
- repeat="sprint context"
- replace="structure sprint/@@+listing-detailed"
- />
- </tbody>
- </table>
-
-</div>
-</body>
+ <tal:side metal:fill-slot="side">
+ <tal:menu replace="structure view/@@+global-actions" />
+ <tal:menu replace="structure context/@@+related-pages" />
+ </tal:side>
+
+ <div metal:fill-slot="main">
+
+ <table class="listing">
+ <tbody>
+ <tal:sprint
+ repeat="sprint context"
+ replace="structure sprint/@@+listing-detailed"
+ />
+ </tbody>
+ </table>
+
+ <p/>
+ <p id="application-summary">
+ Launchpad can help you organise your developer sprints, summits and
+ gatherings. Register the meeting here, then you can invite people to
+ nominate blueprints for discussion at the event. The meeting drivers
+ control the agenda, but everyone can see what's proposed and what's
+ been accepted.
+ </p>
+
+ </div>
+ </body>
 </html>

=== removed file 'lib/lp/blueprints/templates/sprints-portlet-details.pt'
--- lib/lp/blueprints/templates/sprints-portlet-details.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprints-portlet-details.pt 1970-01-01 00:00:00 +0000
@@ -1,22 +0,0 @@
-<tal:root
- xmlns:tal="http://xml.zope.org/namespaces/tal"
- xmlns:metal="http://xml.zope.org/namespaces/metal"
- xmlns:i18n="http://xml.zope.org/namespaces/i18n"
- omit-tag="">
-
-<div class="portlet" id="portlet-details">
-
- <h2>About these meetings</h2>
-
- <div class="portletBody portletContent">
-
- <img src="/@@/info" />
- You can register a meeting, and
- then easily manage the agenda of the meeting. Anybody can propose a
- blueprint for discussion at the meeting, but only the meeting
- organisers (the "drivers") can approve a topic on the meeting agenda.
-
- </div>
-
-</div>
-</tal:root>

=== modified file 'lib/lp/registry/browser/menu.py'
--- lib/lp/registry/browser/menu.py 2009-08-20 16:28:54 +0000
+++ lib/lp/registry/browser/menu.py 2009-08-21 20:04:25 +0000
@@ -22,19 +22,19 @@
     """Menu shared by top level collection objects."""

     def projects(self):
- return Link('/projects/', 'Projects')
+ return Link('/projects/', 'View projects', icon='info')

     def distributions(self):
- return Link('/distros/', 'Distributions')
+ return Link('/distros/', 'View distributions', icon='info')

     def people(self):
- return Link('/people/', 'People')
+ return Link('/people/', 'View people', icon='info')

     def meetings(self):
- return Link('/sprints/', 'Meetings')
+ return Link('/sprints/', 'View meetings', icon='info')

     def project_groups(self):
- return Link('/projectgroups', 'Project groups')
+ return Link('/projectgroups', 'View project groups', icon='info')

     def register_project(self):
         text = 'Register a project'

« Back to merge proposal