Merge lp:~danilo/launchpad/bug-435398 into lp:launchpad

Proposed by Данило Шеган
Status: Merged
Merged at revision: not available
Proposed branch: lp:~danilo/launchpad/bug-435398
Merge into: lp:launchpad
Diff against target: 282 lines
9 files modified
lib/canonical/launchpad/icing/style-3-0.css (+18/-1)
lib/canonical/launchpad/icing/style.css (+0/-6)
lib/lp/translations/templates/distribution-translations.pt (+8/-8)
lib/lp/translations/templates/distroseries-translations.pt (+7/-8)
lib/lp/translations/templates/object-templates.pt (+7/-8)
lib/lp/translations/templates/potemplate-index.pt (+7/-8)
lib/lp/translations/templates/product-translations.pt (+8/-12)
lib/lp/translations/templates/productseries-translations.pt (+12/-12)
lib/lp/translations/templates/sourcepackage-translations.pt (+7/-8)
To merge this branch: bzr merge lp:~danilo/launchpad/bug-435398
Reviewer Review Type Date Requested Status
Abel Deuring (community) Approve
Review via email: mp+13462@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

= Bug #435346 and bug #435398 =

This improves main content div CSS to include "clear:both" to make sure
sidebars are positioned correctly with very small default font sizes or
with epiphany (bug #435346).

It also reworks the entire 'help for translations' linking CSS to be a
lot nicer and semantical (i.e. drops usage of <ul> and <li> tags),
while at the same time making sure it's not causing ugly layout bugs
(again, a missing clear:both after a floated link).

== Proposed fix ==

Introduce "clear:both" CSS where appropriate.

== Tests ==

bin/test -vvt translation-help

== Demo and Q/A ==

For #435346:

Any launchpad page with sidebars, eg. https://launchpad.dev/firefox and then decrease the font size.

For #435398:

 * https://translations.launchpad.dev/evolution/+translations
 * https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/

= 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/translations/templates/sourcepackage-translations.pt
  lib/lp/translations/templates/object-templates.pt
  lib/lp/translations/templates/potemplate-index.pt
  lib/lp/translations/templates/distroseries-translations.pt
  lib/canonical/launchpad/icing/style.css
  lib/lp/translations/templates/distribution-translations.pt
  lib/canonical/launchpad/icing/style-3-0.css
  lib/lp/translations/templates/productseries-translations.pt
  lib/lp/translations/templates/product-translations.pt

Revision history for this message
Abel Deuring (adeuring) :
review: Approve

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'
2--- lib/canonical/launchpad/icing/style-3-0.css 2009-10-15 12:39:00 +0000
3+++ lib/canonical/launchpad/icing/style-3-0.css 2009-10-16 11:25:33 +0000
4@@ -5,6 +5,7 @@
5
6 */
7 #maincontent {
8+ clear: both;
9 float: left;
10 width: 100%;
11 margin-right: -25%;
12@@ -770,7 +771,7 @@
13
14 form.translations div.actions {
15 padding: 1em;
16- text-align: right;
17+ text-align: left;
18 clear:both;
19 }
20
21@@ -852,6 +853,22 @@
22 text-align:center;
23 }
24
25+/* Translations help links.
26+ *
27+ * Examples:
28+ * https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/
29+ * https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+translations
30+ * https://translations.launchpad.dev/ubuntu/hoary/
31+ *
32+ */
33+div.translation-help-links a {
34+ float: right;
35+}
36+div.translation-help-links div {
37+ clear: both;
38+}
39+
40+
41 /* Home page */
42 .homepage {
43 margin: auto;
44
45=== modified file 'lib/canonical/launchpad/icing/style.css'
46--- lib/canonical/launchpad/icing/style.css 2009-10-15 12:39:00 +0000
47+++ lib/canonical/launchpad/icing/style.css 2009-10-16 11:25:33 +0000
48@@ -2312,12 +2312,6 @@
49 body.applicationhome ul.buttons li {display: block; margin-right: 0;}
50 ul.cross-reference {font-size: 1.25em;}
51
52-ul.helplinks {float: right; margin: 0.5em;}
53-/* We set `display: block` to lose the bullets. We should use
54- * `list-style-type:none` but this is what our existing code does.
55- */
56-ul.helplinks li {display: block; margin: 0 0 0 0;}
57-
58 /*
59 li {
60 margin-bottom: 0.75em;
61
62=== modified file 'lib/lp/translations/templates/distribution-translations.pt'
63--- lib/lp/translations/templates/distribution-translations.pt 2009-09-17 11:10:49 +0000
64+++ lib/lp/translations/templates/distribution-translations.pt 2009-10-16 11:25:33 +0000
65@@ -1,3 +1,4 @@
66+
67 <html
68 xmlns="http://www.w3.org/1999/xhtml"
69 xmlns:tal="http://xml.zope.org/namespaces/tal"
70@@ -8,14 +9,13 @@
71
72 <body>
73 <div metal:fill-slot="main">
74- <ul class="helplinks">
75- <li>
76- <a href="https://help.launchpad.net/Translations"
77- id="link-to-translations-help"
78- >Help for translations
79- </a>
80- </li>
81- </ul>
82+ <div class="translation-help-links">
83+ <a href="https://help.launchpad.net/Translations"
84+ id="link-to-translations-help"
85+ >Help for translations
86+ </a>
87+ <div></div><!-- to clear-up all floats -->
88+ </div>
89 <tal:translation_focus condition="view/translation_focus"
90 define="target view/translation_focus">
91
92
93=== modified file 'lib/lp/translations/templates/distroseries-translations.pt'
94--- lib/lp/translations/templates/distroseries-translations.pt 2009-09-17 11:10:49 +0000
95+++ lib/lp/translations/templates/distroseries-translations.pt 2009-10-16 11:25:32 +0000
96@@ -6,14 +6,13 @@
97
98 <body>
99 <div metal:fill-slot="main">
100- <ul class="helplinks">
101- <li>
102- <a href="https://help.launchpad.net/Translations"
103- id="link-to-translations-help"
104- >Help for translations
105- </a>
106- </li>
107- </ul>
108+ <div class="translation-help-links">
109+ <a href="https://help.launchpad.net/Translations"
110+ id="link-to-translations-help"
111+ >Help for translations
112+ </a>
113+ <div></div><!-- to clear-up all floats -->
114+ </div>
115 <div class="top-portlet">
116 <p tal:condition="not:view/is_translation_focus">
117 Launchpad currently recommends translating
118
119=== modified file 'lib/lp/translations/templates/object-templates.pt'
120--- lib/lp/translations/templates/object-templates.pt 2009-09-17 11:10:49 +0000
121+++ lib/lp/translations/templates/object-templates.pt 2009-10-16 11:25:32 +0000
122@@ -53,14 +53,13 @@
123 </script>
124 </div>
125 <div metal:fill-slot="main">
126- <ul class="helplinks">
127- <li>
128- <a href="https://help.launchpad.net/Translations"
129- id="link-to-translations-help"
130- >Help for translations
131- </a>
132- </li>
133- </ul>
134+ <div class="translation-help-links">
135+ <a href="https://help.launchpad.net/Translations"
136+ id="link-to-translations-help"
137+ >Help for translations
138+ </a>
139+ <div></div><!-- to clear-up all floats -->
140+ </div>
141
142 <div class="yui-b top-portlet">
143 <p>
144
145=== modified file 'lib/lp/translations/templates/potemplate-index.pt'
146--- lib/lp/translations/templates/potemplate-index.pt 2009-09-17 13:24:05 +0000
147+++ lib/lp/translations/templates/potemplate-index.pt 2009-10-16 11:25:32 +0000
148@@ -8,14 +8,13 @@
149 <body>
150
151 <div metal:fill-slot="main">
152- <ul class="helplinks">
153- <li>
154- <a href="https://help.launchpad.net/Translations/StartingToTranslate"
155- id="link-to-translations-help"
156- >Help for translations
157- </a>
158- </li>
159- </ul>
160+ <div class="translation-help-links">
161+ <a href="https://help.launchpad.net/Translations/StartingToTranslate"
162+ id="link-to-translations-help"
163+ >Help for translations
164+ </a>
165+ <div></div><!-- to clear-up all floats -->
166+ </div>
167
168 <div class="yui-b top-portlet">
169 <p tal:condition="context/description">
170
171=== modified file 'lib/lp/translations/templates/product-translations.pt'
172--- lib/lp/translations/templates/product-translations.pt 2009-09-17 12:45:52 +0000
173+++ lib/lp/translations/templates/product-translations.pt 2009-10-16 11:25:33 +0000
174@@ -9,27 +9,23 @@
175 <div metal:fill-slot="main"
176 tal:define="uses_translations view/uses_translations;
177 admin_user context/required:launchpad.TranslationsAdmin">
178- <ul class="helplinks">
179- <li>
180- <a href="https://help.launchpad.net/Translations"
181- id="link-to-translations-help"
182- >Help for translations
183- </a>
184- </li>
185- </ul>
186+ <div class="translation-help-links">
187+ <a href="https://help.launchpad.net/Translations"
188+ id="link-to-translations-help"
189+ >Help for translations
190+ </a>
191+ <div></div><!-- to clear-up all floats -->
192+ </div>
193 <tal:uses-translations condition="uses_translations">
194 <tal:translatable define="target context/primary_translatable">
195
196- <div class="top-portlet">
197- </div>
198-
199 <div class="yui-g">
200 <div class="yui-u first">
201 <div class="portlet">
202 <h3>Translation details</h3>
203 <p>
204 Launchpad currently recommends translating
205- <tal:target replace="structure target/fmt:link/+translations"
206+ <tal:target replace="structure target/fmt:link"
207 >trunk</tal:target>.
208 <tal:admins condition="context/required:launchpad.AnyPerson">
209 You can also
210
211=== modified file 'lib/lp/translations/templates/productseries-translations.pt'
212--- lib/lp/translations/templates/productseries-translations.pt 2009-09-17 12:45:52 +0000
213+++ lib/lp/translations/templates/productseries-translations.pt 2009-10-16 11:25:33 +0000
214@@ -6,15 +6,13 @@
215 >
216 <body>
217 <div metal:fill-slot="main">
218- <ul class="helplinks">
219- <li>
220- <a href="https://help.launchpad.net/Translations"
221- id="link-to-translations-help"
222- >Help for translations
223- </a>
224- </li>
225- </ul>
226- <div style="clear:both;"></div>
227+ <div class="translation-help-links">
228+ <a href="https://help.launchpad.net/Translations"
229+ id="link-to-translations-help"
230+ >Help for translations
231+ </a>
232+ <div></div><!-- to clear-up all floats -->
233+ </div>
234
235 <tal:no-languages condition="not:view/productserieslanguages">
236 <div class="yui-b top-portlet">
237@@ -122,14 +120,16 @@
238 <p>This project is currently not using any synchronization
239 with bazaar branches.</p>
240 <tal:branch condition="context/branch">
241- <p>
242+ <p tal:condition="context/required:launchpad.Edit">
243 <a tal:attributes="
244 href context/menu:navigation/requestbzrimport/url"
245- tal:condition="context/required:launchpad.Edit"
246 class="add sprite">
247 Request an import from bazaar
248 </a> to do a one time import of all the templates and
249- translations.
250+ translations from
251+ <a tal:replace="structure context/branch/fmt:link">
252+ branch
253+ </a>.
254 </p>
255 </tal:branch>
256 <div tal:condition="context/required:launchpad.Edit">
257
258=== modified file 'lib/lp/translations/templates/sourcepackage-translations.pt'
259--- lib/lp/translations/templates/sourcepackage-translations.pt 2009-09-17 15:27:58 +0000
260+++ lib/lp/translations/templates/sourcepackage-translations.pt 2009-10-16 11:25:32 +0000
261@@ -6,14 +6,13 @@
262 >
263 <body>
264 <div metal:fill-slot="main">
265- <ul class="helplinks">
266- <li>
267- <a href="https://help.launchpad.net/Translations"
268- id="link-to-translations-help"
269- >Help for translations
270- </a>
271- </li>
272- </ul>
273+ <div class="translation-help-links">
274+ <a href="https://help.launchpad.net/Translations"
275+ id="link-to-translations-help"
276+ >Help for translations
277+ </a>
278+ <div></div><!-- to clear-up all floats -->
279+ </div>
280
281 <div class="yui-g">
282 <div class="yui-u first">