Code review comment for lp:~edwin-grubbs/launchpad/bug-412519-team-page

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Summary
-------

Convert the $team/+index page to LP3.0.

I've uploaded before and after screenshots here:
  https://dev.launchpad.net/TeamIndexPage

This branch does not address the following feedback items, which will be
taken care of in a followup branch:
 * List all members.
 * Show members' timezones.
 * Recently approved query shouldn't show users approved a long time ago
 * even if they are the most recent.
 * "Contact this team" link should be moved into the action menu.
 * Add portlet with info from the karmacache.

Implementation details
----------------------

Moved the contact-details and subteam-of portlets into macros
and moved the mailinglist and membership portlets into separate
templates to make reorganizing the portlets easier. I started off
making new templates, but then switched to macros which were quicker
to edit.
    lib/lp/registry/templates/person-macros.pt
    lib/lp/registry/templates/team-portlet-mailinglist.pt
    lib/lp/registry/templates/team-portlet-membership.pt
    lib/lp/registry/templates/team-index.pt

The map wouldn't load because the base layout wouldn't include the js
even when needs_gmap2 was set to True.
    lib/lp/app/templates/base-layout.pt

The $team/+index page now uses a subclass of PersonIndexView instead
of PersonIndexView directly, since that makes it possible to customize
the menu items in it. Also separated two portlets into their own files.
    lib/lp/registry/browser/configure.zcml

Moved a bunch of menu items up to CommonMenuLinks or TeamMenuMixin.
Added the 'team' attribute to the TeamMenuMixin, since some of the
menus have the view as the context object. Added TeamIndexView and
the TeamIndexMenu.
    lib/lp/registry/browser/person.py

Fixed tests.
    lib/lp/registry/browser/tests/team-views.txt
    lib/lp/registry/stories/foaf/xx-reassign-team.txt
    lib/lp/registry/stories/foaf/xx-team-claim.txt
    lib/lp/registry/stories/foaf/xx-team-home.txt
    lib/lp/registry/stories/teammembership/private-team.txt
    lib/lp/registry/stories/teammembership/xx-private-membership.txt
    lib/lp/soyuz/stories/ppa/xx-ppa-private-teams.txt

Removed the header for the map. I can't remember who wanted that.
    lib/lp/registry/templates/team-portlet-map.pt

Added info icon to link.
    lib/lp/registry/templates/person-portlet-related-projects.pt

Added maintained-packages link and reformatted.
    lib/lp/soyuz/templates/person-portlet-ppas.pt

Fixed font size of ppa names.
    lib/lp/soyuz/templates/person-ppas.pt

Tests
-----

./bin/test -vv -t 'team-views.txt|xx-reassign-team.txt|xx-team-claim.txt|xx-team-home.txt|private-team.txt|xx-private-membership.txt|xx-ppa-private-teams.txt'

Demo and Q/A
------------

SQL to insert test data for the ~guadalinux user on launchpad.dev:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /* For homepage content and description at the top of the page. */
    UPDATE Person
    SET homepage_content = 'Homepage content. Testing.',
        teamdescription = 'Team description. Testing.'
    WHERE id = 32;

    /* For related projects portlet. */
    UPDATE Product SET owner = 32;

Q/A
~~~
* Open http://launchpad.dev/~guadamen
    * Verify all the portlets:
        * Sidebar:
            * Public/Private indicator
            * Action menu
            * Polls
        * Main area:
            * Members
            * Personal package archives
            * Subteam of
            * Related projects
            * Team details
            * Mailing list
        * Bottom:
            * Location map

« Back to merge proposal