Merge lp:~sinzui/launchpad/launchpad-header-1 into lp:launchpad

Proposed by Curtis Hovey on 2010-08-06
Status: Merged
Merged at revision: 11315
Proposed branch: lp:~sinzui/launchpad/launchpad-header-1
Merge into: lp:launchpad
Diff against target: 250 lines (+18/-24)
12 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+1/-1)
lib/lp/answers/templates/faq-index.pt (+2/-2)
lib/lp/answers/templates/question-index.pt (+2/-2)
lib/lp/app/templates/base-layout.pt (+3/-3)
lib/lp/blueprints/templates/sprint-index.pt (+2/-3)
lib/lp/code/browser/tests/test_sourcepackagerecipe.py (+2/-0)
lib/lp/code/templates/sourcepackagerecipebuild-index.pt (+0/-2)
lib/lp/registry/templates/distribution-index.pt (+0/-2)
lib/lp/registry/templates/distributionmirror-index.pt (+4/-4)
lib/lp/registry/templates/distroseries-index.pt (+0/-2)
lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+2/-1)
lib/lp/soyuz/templates/build-index.pt (+0/-2)
To merge this branch: bzr merge lp:~sinzui/launchpad/launchpad-header-1
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve on 2010-08-06
Paul Hummer (community) ui 2010-08-06 Approve on 2010-08-06
Review via email: mp+31975@code.launchpad.net

Description of the Change

This is my branch to clean up the content in the registration slot and move
it.

    lp:~sinzui/launchpad/launchpad-header-1
    Diff size: 214
    Launchpad bug:
          https://bugs.launchpad.net/bugs/610866
    Test command: ./bin/test -vv \
          ./bin/test -vvc -t stories/sprints -t xx-bug-heat-on-bug-page.txt \
          -t xx-malone-homepage.txt -t bugtrackers-index.txt -t cve-pages.txt \
          -t test_base_layout -t base-layout
    Pre-implementation: henninge via email
    Target release: 10.08

Clean up the content in the registration slot and move it
---------------------------------------------------------

Henning argues that aesthetics and reading bread crumbs is more important
than clearly knowing the context that the registration slot pertains too.

distroseries page places blocks in registration slot. The a <p> is inserted
into the slot and that creates extra spaces. This may be true for other pages.

Rules
-----

    * Move the slot below the bread crumbs
    * Remove all block content from the registration slot.
    * ADDENDUM: distributionmirror-index.pt has invalid markup

QA
--

The expected layout looks like this:
    http://people.canonical.com/~curtis/regitration-slot.png

    * Visit https://edge.launchpad.net/ubuntu/maverick
    * Verify the registration information is below the breadcrumbs with
      about .5m separate between them

Lint
----

Linting changed files:
  lib/canonical/launchpad/icing/style-3-0.css.in
  lib/lp/answers/templates/faq-index.pt
  lib/lp/answers/templates/question-index.pt
  lib/lp/app/templates/base-layout.pt
  lib/lp/blueprints/templates/sprint-index.pt
  lib/lp/code/templates/sourcepackagerecipebuild-index.pt
  lib/lp/registry/templates/distribution-index.pt
  lib/lp/registry/templates/distributionmirror-index.pt
  lib/lp/registry/templates/distroseries-index.pt
  lib/lp/soyuz/templates/build-index.pt

Test
----

No tests changed. This is expected. This is the second branch dealing with
the header and we knew we wanted to move the registration slot. The tests
in the previous branch (all listed above) were updated to not break with
the next move.

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

The registration slot move.
    * lib/canonical/launchpad/icing/style-3-0.css.in
      * Henning suggest 1em between the bread crumbs and the registration
        slot, I made it half an em so that it was closer to the name than the
        narrative.
    * lib/lp/app/templates/base-layout.pt
      * Move the registration slot

Remove the <p> that created extra white space before and after the
registration text.

    * lib/lp/answers/templates/faq-index.pt
    * lib/lp/answers/templates/question-index.pt
    * lib/lp/blueprints/templates/sprint-index.pt
    * lib/lp/code/templates/sourcepackagerecipebuild-index.pt
    * lib/lp/registry/templates/distribution-index.pt
    * lib/lp/registry/templates/distroseries-index.pt
    * lib/lp/soyuz/templates/build-index.pt
    * lib/lp/registry/templates/distributionmirror-index.pt
      * lint reported invalid markup. The template was missing two closing
        divs.

To post a comment you must log in.
Paul Hummer (rockstar) wrote :

This looks fine. I'd still like to question the general worth of it going at the top of the page, but only in passing...

review: Approve (ui)
Brad Crittenden (bac) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
2--- lib/canonical/launchpad/icing/style-3-0.css.in 2010-08-06 12:57:33 +0000
3+++ lib/canonical/launchpad/icing/style-3-0.css.in 2010-08-06 21:31:47 +0000
4@@ -1199,7 +1199,7 @@
5 }
6 .registering {
7 /* Registered slot */
8- margin: 0 0 0.2em 0;
9+ margin: .5em 0 1em 0;
10 font-style: italic;
11 font-size: 77%;
12 color: #666;
13
14=== modified file 'lib/lp/answers/templates/faq-index.pt'
15--- lib/lp/answers/templates/faq-index.pt 2009-11-14 16:30:47 +0000
16+++ lib/lp/answers/templates/faq-index.pt 2010-08-06 21:31:47 +0000
17@@ -9,8 +9,8 @@
18 <body>
19 <metal:registering fill-slot="registering">
20 Created by <a tal:replace="structure context/owner/fmt:link" />
21- on
22- <span
23+ on
24+ <span
25 tal:attributes="title context/date_created/fmt:datetime"
26 tal:content="context/date_created/fmt:displaydate">2005-10-05</span>
27 </metal:registering>
28
29=== modified file 'lib/lp/answers/templates/question-index.pt'
30--- lib/lp/answers/templates/question-index.pt 2009-11-14 16:07:33 +0000
31+++ lib/lp/answers/templates/question-index.pt 2010-08-06 21:31:47 +0000
32@@ -59,7 +59,7 @@
33 </p>
34
35 <ul class="horizontal">
36- <li
37+ <li
38 tal:define="link context/menu:answers/linkbug"
39 tal:content="structure link/fmt:link" />
40 <li tal:condition="context/bugs"
41@@ -69,7 +69,7 @@
42
43 <div id="related-faq" style="margin-top: 1em;">
44 <h2>Related FAQ:</h2>
45-
46+
47 <p>
48 <a class="sprite question"
49 tal:condition="context/faq"
50
51=== modified file 'lib/lp/app/templates/base-layout.pt'
52--- lib/lp/app/templates/base-layout.pt 2010-07-23 15:03:41 +0000
53+++ lib/lp/app/templates/base-layout.pt 2010-08-06 21:31:47 +0000
54@@ -117,12 +117,12 @@
55 metal:define-slot="heading"
56 >Page Label
57 </h1>
58+ <tal:breadcrumbs replace="structure context/@@+hierarchy">
59+ ProjectName > Branches > Merge Proposals > fix-for-navigation
60+ </tal:breadcrumbs>
61 <div id="registration" class="registering">
62 <metal:registering define-slot="registering" />
63 </div>
64- <tal:breadcrumbs replace="structure context/@@+hierarchy">
65- ProjectName > Branches > Merge Proposals > fix-for-navigation
66- </tal:breadcrumbs>
67 </div>
68
69 <tal:maintenance
70
71=== modified file 'lib/lp/blueprints/templates/sprint-index.pt'
72--- lib/lp/blueprints/templates/sprint-index.pt 2009-09-19 04:50:52 +0000
73+++ lib/lp/blueprints/templates/sprint-index.pt 2010-08-06 21:31:47 +0000
74@@ -10,11 +10,10 @@
75 <body>
76
77 <tal:registering metal:fill-slot="registering">
78- <p>Registered by <a tal:replace="structure context/owner/fmt:link" />
79+ Registered by <a tal:replace="structure context/owner/fmt:link" />
80 on <span tal:content="context/datecreated/fmt:displaydate"
81 tal:attributes="title context/datecreated/fmt:datetime"
82 >on 2005-01-01</span>
83- </p>
84 </tal:registering>
85
86 <div metal:fill-slot="main"
87@@ -107,7 +106,7 @@
88 <tal:proposed define="proposed view/proposed_count"
89 condition="proposed">
90 There are <span tal:replace="proposed">7</span>
91- specifications
92+ specifications
93 <a tal:omit-tag="not: context/required:launchpad.Driver" href="+settopics">
94 proposed
95 </a> which the organisers will review.
96
97=== modified file 'lib/lp/code/browser/tests/test_sourcepackagerecipe.py'
98--- lib/lp/code/browser/tests/test_sourcepackagerecipe.py 2010-08-05 20:08:09 +0000
99+++ lib/lp/code/browser/tests/test_sourcepackagerecipe.py 2010-08-06 21:31:47 +0000
100@@ -787,6 +787,7 @@
101 self.assertTextMatchesExpressionIgnoreWhitespace("""\
102 Code
103 my-recipe
104+ created .*
105 Build status
106 Needs building
107 Start in .* \\(9876\\) What's this?.*
108@@ -816,6 +817,7 @@
109 self.assertTextMatchesExpressionIgnoreWhitespace("""\
110 Code
111 my-recipe
112+ created .*
113 Build status
114 Successfully built
115 Started on .*
116
117=== modified file 'lib/lp/code/templates/sourcepackagerecipebuild-index.pt'
118--- lib/lp/code/templates/sourcepackagerecipebuild-index.pt 2010-07-28 17:10:58 +0000
119+++ lib/lp/code/templates/sourcepackagerecipebuild-index.pt 2010-08-06 21:31:47 +0000
120@@ -10,12 +10,10 @@
121 <body>
122
123 <tal:registering metal:fill-slot="registering">
124- <p>
125 created
126 <span tal:content="context/datecreated/fmt:displaydate"
127 tal:attributes="title context/datecreated/fmt:datetime"
128 >on 2005-01-01</span>
129- </p>
130 </tal:registering>
131
132 <div metal:fill-slot="main">
133
134=== modified file 'lib/lp/registry/templates/distribution-index.pt'
135--- lib/lp/registry/templates/distribution-index.pt 2009-09-15 22:12:44 +0000
136+++ lib/lp/registry/templates/distribution-index.pt 2010-08-06 21:31:47 +0000
137@@ -11,13 +11,11 @@
138 </tal:heading>
139
140 <tal:registering metal:fill-slot="registering">
141- <p>
142 registered by
143 <a tal:replace="structure context/owner/fmt:link" />
144 <span tal:content="context/date_created/fmt:displaydate"
145 tal:attributes="title context/date_created/fmt:datetime"
146 >on 2005-01-01</span>
147- </p>
148 </tal:registering>
149
150 <tal:main metal:fill-slot="main"
151
152=== modified file 'lib/lp/registry/templates/distributionmirror-index.pt'
153--- lib/lp/registry/templates/distributionmirror-index.pt 2010-02-09 21:38:03 +0000
154+++ lib/lp/registry/templates/distributionmirror-index.pt 2010-08-06 21:31:47 +0000
155@@ -13,17 +13,15 @@
156 </tal:heading>
157
158 <tal:registering metal:fill-slot="registering">
159- <p>
160 Registered
161 <span tal:content="context/date_created/fmt:displaydate">
162 on 2005-01-01</span>
163- </p>
164 </tal:registering>
165
166 <tal:main
167 metal:fill-slot="main"
168 define="overview_menu context/menu:overview">
169-
170+
171 <div class="top-portlet" tal:condition="context/description">
172 <p tal:content="structure context/description/fmt:text-to-html" />
173 </div>
174@@ -63,7 +61,7 @@
175
176 <div class="yui-u">
177 <div class="two-column-list">
178- <dl id="speed">
179+ <dl id="speed">
180 <dt>Speed:</dt>
181 <dd tal:content="context/speed/title" />
182 </dl>
183@@ -83,6 +81,7 @@
184 </dl>
185 </div>
186 </div>
187+ </div>
188
189 <div class="portlet"
190 id="last-probe"
191@@ -152,6 +151,7 @@
192 </tal:cdimage-mirror>
193 </tal:has-last-probe>
194 </div>
195+ </div>
196 </tal:main>
197
198 <tal:side metal:fill-slot="side" condition="context/required:launchpad.Edit">
199
200=== modified file 'lib/lp/registry/templates/distroseries-index.pt'
201--- lib/lp/registry/templates/distroseries-index.pt 2010-02-18 23:38:31 +0000
202+++ lib/lp/registry/templates/distroseries-index.pt 2010-08-06 21:31:47 +0000
203@@ -19,13 +19,11 @@
204 </tal:heading>
205
206 <tal:registering metal:fill-slot="registering">
207- <p>
208 registered by
209 <a tal:replace="structure context/owner/fmt:link" />
210 <span tal:content="context/date_created/fmt:displaydate"
211 tal:attributes="title context/date_created/fmt:datetime"
212 >on 2005-01-01</span>
213- </p>
214 </tal:registering>
215
216 <div metal:fill-slot="main">
217
218=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
219--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-07-27 12:58:32 +0000
220+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-08-06 21:31:47 +0000
221@@ -295,10 +295,11 @@
222 i386 build of pmount 0.1-1 : PPA for James Blackwell : James Blackwell
223
224 >>> print extract_text(find_main_content(jblack_browser.contents))
225- i386 build of pmount 0.1-1 in ubuntu hoary RELEASE ...
226+ i386 build of pmount 0.1-1 in ubuntu hoary RELEASE
227 James Blackwell
228 PPA for James Blackwell
229 i386 build of pmount 0.1-1
230+ ...
231 Build status Needs building
232 Start (2505) What's this?
233 Build details
234
235=== modified file 'lib/lp/soyuz/templates/build-index.pt'
236--- lib/lp/soyuz/templates/build-index.pt 2010-06-05 05:05:43 +0000
237+++ lib/lp/soyuz/templates/build-index.pt 2010-08-06 21:31:47 +0000
238@@ -10,12 +10,10 @@
239 <body>
240
241 <tal:registering metal:fill-slot="registering">
242- <p>
243 created
244 <span tal:content="context/date_created/fmt:displaydate"
245 tal:attributes="title context/date_created/fmt:datetime"
246 >on 2005-01-01</span>
247- </p>
248 </tal:registering>
249
250 <div metal:fill-slot="main">