Merge lp:~sinzui/launchpad/lp-layout-0 into lp:launchpad

Proposed by Curtis Hovey on 2010-06-13
Status: Merged
Approved by: Curtis Hovey on 2010-06-13
Approved revision: no longer in the source branch.
Merged at revision: 11005
Proposed branch: lp:~sinzui/launchpad/lp-layout-0
Merge into: lp:launchpad
Diff against target: 82 lines (+16/-16)
2 files modified
lib/lp/app/browser/tests/base-layout.txt (+6/-7)
lib/lp/app/templates/base-layout.pt (+10/-9)
To merge this branch: bzr merge lp:~sinzui/launchpad/lp-layout-0
Reviewer Review Type Date Requested Status
Paul Hummer (community) code 2010-06-13 Approve on 2010-06-13
Review via email: mp+27444@code.launchpad.net

Description of the Change

This is my branch to fix the layout of the main_side layout.

    lp:~sinzui/launchpad/lp-layout-0
    Diff size: 83
    Launchpad bug:
          https://bugs.launchpad.net/bugs/593283
    Test command: ./bin/test -vv \
          -t base-layout
    Pre-implementation: no one
    Target release: 10.06

Fix the layout of the main_side layout
--------------------------------------

The main content goes underneath the side portlets. The main content
sits in a div yui-b combination, but I ended that tag prematurely in a recent
branch. This was caused my an errant move of the notifications markup
to avoid broken headers. I did not notice my mistake because I was only
looking at main_only pages. This bug affect main_side layouts.

Rules
-----

    * Moved <metal:main define-slot="main" /> tag before the closing
      tag of the div yui-b. The notifications will move too because they
      must appear directly above the content.

QA
--

    * Visit a main_side page layout on edge, such as a project +index
      or its bug's page.
    * Verify the main content does not appear under the side portlets.

Lint
----

Linting changed files:
  lib/lp/app/browser/tests/base-layout.txt
  lib/lp/app/templates/base-layout.pt

Test
----

    * lib/lp/app/browser/tests/base-layout.txt
      * Updated the tests to verify that the the div yui-b is closed
        after the main content.

Implementation
--------------

    * lib/lp/app/templates/base-layout.pt
      * Moved the closing tag of the div yui-b after the main content slot.

To post a comment you must log in.
Paul Hummer (rockstar) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/app/browser/tests/base-layout.txt'
2--- lib/lp/app/browser/tests/base-layout.txt 2010-06-10 21:23:02 +0000
3+++ lib/lp/app/browser/tests/base-layout.txt 2010-06-13 15:35:43 +0000
4@@ -189,7 +189,6 @@
5 </ol>
6 <BLANKLINE>
7 </div>
8- </div><!-- yui-b -->
9 <BLANKLINE>
10 <BLANKLINE>
11 <BLANKLINE>
12@@ -203,6 +202,7 @@
13 Main content of the page.
14 </p>
15 </div>
16+ </div><!-- yui-b -->
17 </div>
18
19 Global search.
20@@ -315,10 +315,9 @@
21 Main content of the page.
22 </p>
23 </div>
24- <BLANKLINE>
25- </div><!-- yui-main -->
26- <BLANKLINE>
27- <!-- yui-b side -->
28+ </div><!-- yui-b -->
29+ </div><!-- yui-main -->
30+ <!-- yui-b side -->
31 <!-- yui-t4 -->
32 ...
33
34@@ -381,8 +380,7 @@
35
36 >>> print str(find_tag_by_id(body_tag, 'maincontent'))
37 <div id="maincontent" class="yui-main">
38- <div class="yui-b" dir="ltr">
39- </div><!-- yui-b -->
40+ <div class="yui-b" dir="ltr">
41 <div class="top-portlet">
42 <h1>Heading</h1>
43 <p class="registered">
44@@ -393,6 +391,7 @@
45 Main content of the page.
46 </p>
47 </div>
48+ </div><!-- yui-b -->
49 </div>
50
51 Footer.
52
53=== modified file 'lib/lp/app/templates/base-layout.pt'
54--- lib/lp/app/templates/base-layout.pt 2010-06-10 20:25:19 +0000
55+++ lib/lp/app/templates/base-layout.pt 2010-06-13 15:35:43 +0000
56@@ -118,16 +118,17 @@
57 ProjectName > Branches > Merge Proposals > fix-for-navigation
58 </tal:breadcrumbs>
59 </div>
60+
61+ <tal:maintenance
62+ replace="structure context/@@+maintenancemessage" />
63+ <tal:notifications
64+ define="notifications request/notifications"
65+ condition="notifications">
66+ <metal:notifications
67+ use-macro="context/@@+base-layout-macros/notifications"/>
68+ </tal:notifications>
69+ <metal:main define-slot="main" />
70 </div><!-- yui-b -->
71- <tal:maintenance
72- replace="structure context/@@+maintenancemessage" />
73- <tal:notifications
74- define="notifications request/notifications"
75- condition="notifications">
76- <metal:notifications
77- use-macro="context/@@+base-layout-macros/notifications"/>
78- </tal:notifications>
79- <metal:main define-slot="main" />
80 </div><!-- yui-main -->
81
82 <div class="yui-b side"