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
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-10-15 12:39:00 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-10-16 11:25:33 +0000
@@ -5,6 +5,7 @@
55
6*/6*/
7#maincontent {7#maincontent {
8 clear: both;
8 float: left;9 float: left;
9 width: 100%;10 width: 100%;
10 margin-right: -25%;11 margin-right: -25%;
@@ -770,7 +771,7 @@
770771
771form.translations div.actions {772form.translations div.actions {
772 padding: 1em;773 padding: 1em;
773 text-align: right;774 text-align: left;
774 clear:both;775 clear:both;
775}776}
776777
@@ -852,6 +853,22 @@
852 text-align:center;853 text-align:center;
853}854}
854855
856/* Translations help links.
857 *
858 * Examples:
859 * https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/
860 * https://translations.launchpad.dev/ubuntu/hoary/+source/evolution/+translations
861 * https://translations.launchpad.dev/ubuntu/hoary/
862 *
863 */
864div.translation-help-links a {
865 float: right;
866}
867div.translation-help-links div {
868 clear: both;
869}
870
871
855/* Home page */872/* Home page */
856.homepage {873.homepage {
857 margin: auto;874 margin: auto;
858875
=== modified file 'lib/canonical/launchpad/icing/style.css'
--- lib/canonical/launchpad/icing/style.css 2009-10-15 12:39:00 +0000
+++ lib/canonical/launchpad/icing/style.css 2009-10-16 11:25:33 +0000
@@ -2312,12 +2312,6 @@
2312body.applicationhome ul.buttons li {display: block; margin-right: 0;}2312body.applicationhome ul.buttons li {display: block; margin-right: 0;}
2313ul.cross-reference {font-size: 1.25em;}2313ul.cross-reference {font-size: 1.25em;}
23142314
2315ul.helplinks {float: right; margin: 0.5em;}
2316/* We set `display: block` to lose the bullets. We should use
2317 * `list-style-type:none` but this is what our existing code does.
2318 */
2319ul.helplinks li {display: block; margin: 0 0 0 0;}
2320
2321/*2315/*
2322li {2316li {
2323 margin-bottom: 0.75em;2317 margin-bottom: 0.75em;
23242318
=== modified file 'lib/lp/translations/templates/distribution-translations.pt'
--- lib/lp/translations/templates/distribution-translations.pt 2009-09-17 11:10:49 +0000
+++ lib/lp/translations/templates/distribution-translations.pt 2009-10-16 11:25:33 +0000
@@ -1,3 +1,4 @@
1
1<html2<html
2 xmlns="http://www.w3.org/1999/xhtml"3 xmlns="http://www.w3.org/1999/xhtml"
3 xmlns:tal="http://xml.zope.org/namespaces/tal"4 xmlns:tal="http://xml.zope.org/namespaces/tal"
@@ -8,14 +9,13 @@
89
9 <body>10 <body>
10 <div metal:fill-slot="main">11 <div metal:fill-slot="main">
11 <ul class="helplinks">12 <div class="translation-help-links">
12 <li>13 <a href="https://help.launchpad.net/Translations"
13 <a href="https://help.launchpad.net/Translations"14 id="link-to-translations-help"
14 id="link-to-translations-help"15 >Help for translations
15 >Help for translations16 </a>
16 </a>17 <div></div><!-- to clear-up all floats -->
17 </li>18 </div>
18 </ul>
19 <tal:translation_focus condition="view/translation_focus"19 <tal:translation_focus condition="view/translation_focus"
20 define="target view/translation_focus">20 define="target view/translation_focus">
2121
2222
=== modified file 'lib/lp/translations/templates/distroseries-translations.pt'
--- lib/lp/translations/templates/distroseries-translations.pt 2009-09-17 11:10:49 +0000
+++ lib/lp/translations/templates/distroseries-translations.pt 2009-10-16 11:25:32 +0000
@@ -6,14 +6,13 @@
66
7 <body>7 <body>
8 <div metal:fill-slot="main">8 <div metal:fill-slot="main">
9 <ul class="helplinks">9 <div class="translation-help-links">
10 <li>10 <a href="https://help.launchpad.net/Translations"
11 <a href="https://help.launchpad.net/Translations"11 id="link-to-translations-help"
12 id="link-to-translations-help"12 >Help for translations
13 >Help for translations13 </a>
14 </a>14 <div></div><!-- to clear-up all floats -->
15 </li>15 </div>
16 </ul>
17 <div class="top-portlet">16 <div class="top-portlet">
18 <p tal:condition="not:view/is_translation_focus">17 <p tal:condition="not:view/is_translation_focus">
19 Launchpad currently recommends translating18 Launchpad currently recommends translating
2019
=== modified file 'lib/lp/translations/templates/object-templates.pt'
--- lib/lp/translations/templates/object-templates.pt 2009-09-17 11:10:49 +0000
+++ lib/lp/translations/templates/object-templates.pt 2009-10-16 11:25:32 +0000
@@ -53,14 +53,13 @@
53 </script>53 </script>
54 </div>54 </div>
55 <div metal:fill-slot="main">55 <div metal:fill-slot="main">
56 <ul class="helplinks">56 <div class="translation-help-links">
57 <li>57 <a href="https://help.launchpad.net/Translations"
58 <a href="https://help.launchpad.net/Translations"58 id="link-to-translations-help"
59 id="link-to-translations-help"59 >Help for translations
60 >Help for translations60 </a>
61 </a>61 <div></div><!-- to clear-up all floats -->
62 </li>62 </div>
63 </ul>
6463
65 <div class="yui-b top-portlet">64 <div class="yui-b top-portlet">
66 <p>65 <p>
6766
=== modified file 'lib/lp/translations/templates/potemplate-index.pt'
--- lib/lp/translations/templates/potemplate-index.pt 2009-09-17 13:24:05 +0000
+++ lib/lp/translations/templates/potemplate-index.pt 2009-10-16 11:25:32 +0000
@@ -8,14 +8,13 @@
8<body>8<body>
99
10<div metal:fill-slot="main">10<div metal:fill-slot="main">
11 <ul class="helplinks">11 <div class="translation-help-links">
12 <li>12 <a href="https://help.launchpad.net/Translations/StartingToTranslate"
13 <a href="https://help.launchpad.net/Translations/StartingToTranslate"13 id="link-to-translations-help"
14 id="link-to-translations-help"14 >Help for translations
15 >Help for translations15 </a>
16 </a>16 <div></div><!-- to clear-up all floats -->
17 </li>17 </div>
18 </ul>
1918
20 <div class="yui-b top-portlet">19 <div class="yui-b top-portlet">
21 <p tal:condition="context/description">20 <p tal:condition="context/description">
2221
=== modified file 'lib/lp/translations/templates/product-translations.pt'
--- lib/lp/translations/templates/product-translations.pt 2009-09-17 12:45:52 +0000
+++ lib/lp/translations/templates/product-translations.pt 2009-10-16 11:25:33 +0000
@@ -9,27 +9,23 @@
9 <div metal:fill-slot="main"9 <div metal:fill-slot="main"
10 tal:define="uses_translations view/uses_translations;10 tal:define="uses_translations view/uses_translations;
11 admin_user context/required:launchpad.TranslationsAdmin">11 admin_user context/required:launchpad.TranslationsAdmin">
12 <ul class="helplinks">12 <div class="translation-help-links">
13 <li>13 <a href="https://help.launchpad.net/Translations"
14 <a href="https://help.launchpad.net/Translations"14 id="link-to-translations-help"
15 id="link-to-translations-help"15 >Help for translations
16 >Help for translations16 </a>
17 </a>17 <div></div><!-- to clear-up all floats -->
18 </li>18 </div>
19 </ul>
20 <tal:uses-translations condition="uses_translations">19 <tal:uses-translations condition="uses_translations">
21 <tal:translatable define="target context/primary_translatable">20 <tal:translatable define="target context/primary_translatable">
2221
23 <div class="top-portlet">
24 </div>
25
26 <div class="yui-g">22 <div class="yui-g">
27 <div class="yui-u first">23 <div class="yui-u first">
28 <div class="portlet">24 <div class="portlet">
29 <h3>Translation details</h3>25 <h3>Translation details</h3>
30 <p>26 <p>
31 Launchpad currently recommends translating27 Launchpad currently recommends translating
32 <tal:target replace="structure target/fmt:link/+translations"28 <tal:target replace="structure target/fmt:link"
33 >trunk</tal:target>.29 >trunk</tal:target>.
34 <tal:admins condition="context/required:launchpad.AnyPerson">30 <tal:admins condition="context/required:launchpad.AnyPerson">
35 You can also31 You can also
3632
=== modified file 'lib/lp/translations/templates/productseries-translations.pt'
--- lib/lp/translations/templates/productseries-translations.pt 2009-09-17 12:45:52 +0000
+++ lib/lp/translations/templates/productseries-translations.pt 2009-10-16 11:25:33 +0000
@@ -6,15 +6,13 @@
6>6>
7 <body>7 <body>
8 <div metal:fill-slot="main">8 <div metal:fill-slot="main">
9 <ul class="helplinks">9 <div class="translation-help-links">
10 <li>10 <a href="https://help.launchpad.net/Translations"
11 <a href="https://help.launchpad.net/Translations"11 id="link-to-translations-help"
12 id="link-to-translations-help"12 >Help for translations
13 >Help for translations13 </a>
14 </a>14 <div></div><!-- to clear-up all floats -->
15 </li>15 </div>
16 </ul>
17 <div style="clear:both;"></div>
1816
19 <tal:no-languages condition="not:view/productserieslanguages">17 <tal:no-languages condition="not:view/productserieslanguages">
20 <div class="yui-b top-portlet">18 <div class="yui-b top-portlet">
@@ -122,14 +120,16 @@
122 <p>This project is currently not using any synchronization120 <p>This project is currently not using any synchronization
123 with bazaar branches.</p>121 with bazaar branches.</p>
124 <tal:branch condition="context/branch">122 <tal:branch condition="context/branch">
125 <p>123 <p tal:condition="context/required:launchpad.Edit">
126 <a tal:attributes="124 <a tal:attributes="
127 href context/menu:navigation/requestbzrimport/url"125 href context/menu:navigation/requestbzrimport/url"
128 tal:condition="context/required:launchpad.Edit"
129 class="add sprite">126 class="add sprite">
130 Request an import from bazaar127 Request an import from bazaar
131 </a> to do a one time import of all the templates and128 </a> to do a one time import of all the templates and
132 translations.129 translations from
130 <a tal:replace="structure context/branch/fmt:link">
131 branch
132 </a>.
133 </p>133 </p>
134 </tal:branch>134 </tal:branch>
135 <div tal:condition="context/required:launchpad.Edit">135 <div tal:condition="context/required:launchpad.Edit">
136136
=== modified file 'lib/lp/translations/templates/sourcepackage-translations.pt'
--- lib/lp/translations/templates/sourcepackage-translations.pt 2009-09-17 15:27:58 +0000
+++ lib/lp/translations/templates/sourcepackage-translations.pt 2009-10-16 11:25:32 +0000
@@ -6,14 +6,13 @@
6>6>
7 <body>7 <body>
8 <div metal:fill-slot="main">8 <div metal:fill-slot="main">
9 <ul class="helplinks">9 <div class="translation-help-links">
10 <li>10 <a href="https://help.launchpad.net/Translations"
11 <a href="https://help.launchpad.net/Translations"11 id="link-to-translations-help"
12 id="link-to-translations-help"12 >Help for translations
13 >Help for translations13 </a>
14 </a>14 <div></div><!-- to clear-up all floats -->
15 </li>15 </div>
16 </ul>
1716
18 <div class="yui-g">17 <div class="yui-g">
19 <div class="yui-u first">18 <div class="yui-u first">