Code review comment for lp:~henninge/launchpad/bug-467079

Revision history for this message
Henning Eggers (henninge) wrote :

=== modified file 'lib/canonical/launchpad/templates/root-index.pt'
--- lib/canonical/launchpad/templates/root-index.pt 2009-11-13 18:03:35 +0000
+++ lib/canonical/launchpad/templates/root-index.pt 2009-11-18 11:03:37 +0000
@@ -51,14 +51,14 @@
           margin-top: 1em;
           font-size: 161%;
           }
- .featured-project h3 {
+ .featured-project-top h3 {
           font-size: 131%;
           font-weight: bold;
           }
- .featured-project h3 img {
+ .featured-project-top h3 img {
           vertical-align: middle;
           }
- .featured-project p {
+ .featured-project-top p {
           margin-top: 0.5em;
           margin-bottom: 1em;
           border-bottom: 1px solid #888888;
@@ -226,7 +226,7 @@
             <div id="homepage-featured" class="homepage-portlet">
               <h2>Featured projects</h2>

- <div class="featured-project"
+ <div class="featured-project-top"
                    tal:define="topproject view/featured_projects_top"
                    tal:condition="topproject">
                 <h3>
@@ -241,7 +241,7 @@
               </div>

               <div class="two-column-list">
- <ul id="homepage-featured">
+ <ul class="featured-projects-list">
                   <li tal:repeat="project view/featured_projects">
                     <a tal:replace="structure project/fmt:link" />
                   </li>

=== modified file 'lib/lp/registry/stories/launchpad-root/xx-featuredprojects.txt'
--- lib/lp/registry/stories/launchpad-root/xx-featuredprojects.txt 2009-10-31 18:32:05 +0000
+++ lib/lp/registry/stories/launchpad-root/xx-featuredprojects.txt 2009-11-18 11:22:40 +0000
@@ -19,33 +19,26 @@
     >>> from lp.registry.browser.root import LaunchpadRootIndexView
     >>> LaunchpadRootIndexView._get_day_of_year = staticmethod(
     ... fake_get_day_of_year)
+
+Anonymous users will see the list of featured projects with links to the
+projects' pages in Launchpad. The "project of the day" is listed separately.
+
     >>> anon_browser.open('http://launchpad.dev/')
     >>> featured = find_tag_by_id(anon_browser.contents, 'homepage-featured')
     >>> print extract_text(featured.h2)
     Featured projects

-We show the featured projects in our sample data. The "project of the day"
-is "GNOME" and it is listed separately:
-
- >>> top_project = find_tag_by_id(featured, 'homepage-featured-top-title')
- >>> print extract_text(top_project)
+ >>> top_project = featured.find('', 'featured-project-top')
+ >>> print extract_text(top_project.h3)
     GNOME

-These are the projects in the left column.
-
- >>> def print_column(column_id):
- ... column = find_tag_by_id(featured, column_id)
- ... for link in column.findAll('a'):
- ... print extract_text(link)
- >>> print_column('homepage-featured-left')
+ >>> featured_list = featured.find('', 'featured-projects-list')
+ >>> for link in featured_list.findAll('a'):
+ ... print extract_text(link)
     Gnome Applets
     Bazaar
     Mozilla Firefox
     Gentoo
-
-These are the projects in the right column.
-
- >>> print_column('homepage-featured-right')
     GNOME Terminal
     the Mozilla Project
     Mozilla Thunderbird
@@ -99,29 +92,23 @@

     >>> anon_browser.open('http://launchpad.dev/')
     >>> featured = find_tag_by_id(anon_browser.contents, 'homepage-featured')
- >>> top_project = find_tag_by_id(featured, 'homepage-featured-top-title')
- >>> print extract_text(top_project)
+ >>> top_project = featured.find('', 'featured-project-top')
+ >>> print extract_text(top_project.h3)
     Gentoo

-These are the projects in the left column. Because the number of projects in
-the columns is odd, the first column is longer.
-
- >>> print_column('homepage-featured-left')
+ >>> featured_list = featured.find('', 'featured-projects-list')
+ >>> for link in featured_list.findAll('a'):
+ ... print extract_text(link)
     Apache
     Gnome Applets
     Bazaar
     Mozilla Firefox
     GNOME
-
-These are the projects in the right column.
-
- >>> print_column('homepage-featured-right')
     GNOME Terminal
     the Mozilla Project
     Mozilla Thunderbird
     Ubuntu

-
 == Removing a project ==

     >>> admin_browser.getLink(MANAGE_LINK).click()

« Back to merge proposal