Merge lp:~sinzui/launchpad/css-ui-1 into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 12103
Proposed branch: lp:~sinzui/launchpad/css-ui-1
Merge into: lp:launchpad
Diff against target: 814 lines (+178/-162)
16 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+20/-10)
lib/canonical/launchpad/icing/style.css (+0/-19)
lib/canonical/launchpad/webapp/error.py (+1/-1)
lib/lp/answers/stories/project-add-question.txt (+105/-90)
lib/lp/answers/stories/questions-index.txt (+3/-3)
lib/lp/answers/templates/question-listing-detailed.pt (+2/-2)
lib/lp/registry/browser/distribution.py (+5/-4)
lib/lp/registry/browser/product.py (+5/-4)
lib/lp/registry/browser/tests/distribution-views.txt (+4/-4)
lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt (+18/-10)
lib/lp/registry/stories/productseries/xx-productseries-series.txt (+4/-4)
lib/lp/registry/templates/distributionmirror-macros.pt (+3/-3)
lib/lp/registry/templates/productreleasefile-macros.pt (+1/-1)
lib/lp/registry/templates/team-editproposed.pt (+2/-2)
lib/lp/soyuz/browser/sourcepackagerelease.py (+1/-1)
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py (+4/-4)
To merge this branch: bzr merge lp:~sinzui/launchpad/css-ui-1
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+44068@code.launchpad.net

Description of the change

Clean up the CSS.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/90502
        https://bugs.launchpad.net/bugs/415267
    Pre-implementation: no one
    Test command: ./bin/test -vv \
      -t distribution-views -t xx-productseries-series

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * Both classes use the base rules. There should be only one.
      The 3.0 eliminated most of the highlighted cases. polls are being
      removed, so distro mirrors are the only case

Bug #415267 [Table header cells should not be centered]
    ages with wide tables but narrow data, such as
    <https://code.launchpad.net/ubuntu/+source/hotssh>, demonstrate a mistake
    I made in designing Launchpad tables: the text in table header cells
    should not be centered.

--------------------------------------------------------------------

RULES

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * update distributionmirror-macros.pt to use highlight instead of
      highlighted
    * Remove the highligted rules from the CSS.
    * Rename dimmed to lowlight.

Bug #415267 [Table header cells should not be centered]
    * use text-align: left so that the left edge of the text in the th
      aligns with the text in the td.

QA

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    * Visit https://launchpad.net/ubuntu/+cdmirrors
    * Verify the country and total are highlighted.

Bug #415267 [Table header cells should not be centered]
    * Visit any table listing in lp and verify that the table headers
      have left-aligned text.

LINT

    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/lp/answers/templates/question-listing-detailed.pt
    lib/lp/registry/browser/distribution.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/browser/tests/distribution-views.txt
    lib/lp/registry/stories/productseries/xx-productseries-series.txt
    lib/lp/registry/templates/distributionmirror-macros.pt
    lib/lp/registry/templates/productreleasefile-macros.pt
    lib/lp/registry/templates/team-editproposed.pt

IMPLEMENTATION

Bug #90502 [class="highlight" and class="highlighted" shouldn't coexist]
    Update template to use highlight and removed highligted from css.
    Removed unhighlighted. Renamed dimmed to lowlight. Removed .series
    class because the rules are always superseded by other css rules.
    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/canonical/launchpad/icing/style.css
    lib/lp/registry/browser/distribution.py
    lib/lp/registry/browser/product.py
    lib/lp/registry/browser/tests/distribution-views.txt
    lib/lp/registry/stories/productseries/xx-productseries-series.txt
    lib/lp/registry/templates/distributionmirror-macros.pt

Bug #415267 [Table header cells should not be centered]
    Updated the style as mpt suggested.
    lib/canonical/launchpad/icing/style-3-0.css.in

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

The changes look good Curtis. But if I grep for 'class="highlighted"' I get six hits:

bzr ls -VR --kind=file --null | xargs -0 grep -In class\=\"highlighted\"
lib/canonical/launchpad/webapp/error.py:118: return ('<div class="highlighted" style="'
lib/lp/soyuz/browser/sourcepackagerelease.py:158: highlight = r'<span class="highlighted">\1</span>'
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:90: '<span class="highlighted">https://upstream.dom/fnord/no/</span> '
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:102: '<span class="highlighted">/usr/share/common-licenses/GPL</span>')
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:113: '<span class="highlighted">/usr/share/common-licenses/GPL</span> '
lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py:114: 'or <span class="highlighted">https://osi.org/mit</span>')

review: Approve (code)
Revision history for this message
Curtis Hovey (sinzui) wrote :

On Fri, 2010-12-17 at 18:31 +0000, Brad Crittenden wrote:
> Review: Approve code
> The changes look good Curtis. But if I grep for 'class="highlighted"' I get six hits:

I am incompetent. I wrote the spr code and test :(. I resolved the
conflict you point out too.

--
__Curtis C. Hovey_________
http://launchpad.net/

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-12-16 15:53:37 +0000
3+++ lib/canonical/launchpad/icing/style-3-0.css.in 2010-12-18 00:58:15 +0000
4@@ -537,7 +537,7 @@
5 vertical-align: baseline;
6 }
7 thead th, tr.thead th {
8- text-align: center;
9+ text-align: left;
10 vertical-align: bottom;
11 }
12 th.icon, td.icon {
13@@ -663,9 +663,6 @@
14 table.listing tfoot td {
15 border: 1px solid #d2d2d2;
16 }
17-table.listing tr.note {
18- font-size: 77%;
19- }
20 table.listing th, table.listing td {
21 padding: 0.25em;
22 }
23@@ -681,7 +678,7 @@
24 border: 1px #d2d2d2;
25 border-style: dotted none none none;
26 }
27-table.listing tr.note td {
28+table.listing .note td {
29 border-style: none;
30 }
31 table.listing img {
32@@ -1469,11 +1466,20 @@
33 Universal presentation
34 Colors and fonts
35 */
36-pre .highlighted {
37- border: none;
38- padding: 0em;
39- margin: 0em;
40- }
41+
42+.exception {
43+ color: #cc0000;
44+ }
45+.highlight {
46+ background: #ddd;
47+ border: 1px solid #ddd;
48+ }
49+.lowlight {
50+ opacity: .5;
51+ filter: alpha(opacity=50);
52+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
53+}
54+
55 .answers-stat {
56 color: #3840BE;
57 }
58@@ -1780,6 +1786,10 @@
59 .launchpad-gold {
60 color: #F8C300;
61 }
62+
63+.discreet, .lesser, .duplicate-details {
64+ font-size: 85%;
65+ }
66 pre.changelog, table.diff,
67 .bug-comment, .bug-activity, .codereviewcomment {
68 font-size: 93%;
69
70=== modified file 'lib/canonical/launchpad/icing/style.css'
71--- lib/canonical/launchpad/icing/style.css 2010-12-16 17:12:13 +0000
72+++ lib/canonical/launchpad/icing/style.css 2010-12-18 00:58:15 +0000
73@@ -25,13 +25,6 @@
74
75 /* === Fonts and colors === */
76
77-
78-
79-
80-
81-.exception {color: #cc0000;}
82-.discreet, .lesser, .duplicate-details {font-size: 90%;}
83-.extra-discreet {font-size: 75%;}
84 .unavailable {color: #999; background: none;}
85
86 .duplicate-details p { padding: 0em; margin-top: 0em; margin-bottom: 0.2em; }
87@@ -61,17 +54,6 @@
88 .notforscreen {display:none;}
89 }
90
91-.highlighted, tr.highlight {background: #ddd; border: 1px solid #ddd;}
92-.highlighted {padding: 0.5em;}
93-.highlighted h3 {margin-top: 0;}
94-.unhighlighted {padding: 0 0.5em;}
95-.dimmed {
96- padding: 0 0.5em;
97- opacity: .5;
98- filter: alpha(opacity=50);
99- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
100-}
101-
102 .debug {
103 background: none;
104 color: #f09;
105@@ -262,7 +244,6 @@
106 margin-top: 1em;
107 }
108
109-.product.series, .series {margin-bottom: 1em;}
110 #packages h1, #projects h1 {margin-top: 1.2em;}
111
112
113
114=== modified file 'lib/canonical/launchpad/webapp/error.py'
115--- lib/canonical/launchpad/webapp/error.py 2010-08-31 11:11:09 +0000
116+++ lib/canonical/launchpad/webapp/error.py 2010-12-18 00:58:15 +0000
117@@ -115,7 +115,7 @@
118 def inside_div(self, html):
119 """Returns the given HTML inside a div of an appropriate class."""
120
121- return ('<div class="highlighted" style="'
122+ return ('<div class="highlight" style="'
123 "font-family: 'UbuntuBeta Mono', 'Ubuntu Mono', monospace;"
124 ' font-size: smaller;">'
125 '%s'
126
127=== modified file 'lib/lp/answers/stories/project-add-question.txt'
128--- lib/lp/answers/stories/project-add-question.txt 2010-08-02 02:33:53 +0000
129+++ lib/lp/answers/stories/project-add-question.txt 2010-12-18 00:58:15 +0000
130@@ -1,18 +1,20 @@
131-= Asking a New Question from a ProjectGroup =
132+Asking a New Question from a ProjectGroup
133+=========================================
134
135-Even though project groups are not QuestionTargets, it is still possible to
136-create a question from a project group. There are some form and behaviour
137-difference from the regular process for asking a question (documented
138-in 35-question-add.txt). Firstly, we do not know the product the
139-product the question is about, so we ask the user to select one.
140+Even though project groups are not QuestionTargets, it is still possible
141+to create a question from a project group. There are some form and
142+behaviour difference from the regular process for asking a question
143+(documented in 35-question-add.txt). Firstly, we do not know the product
144+the product the question is about, so we ask the user to select one.
145 Secondly, without knowing the product, we cannot show the which of the
146 user's preferred languages are supported.
147
148
149-== Ask a question about a Product in a ProjectGroup ==
150+Ask a question about a Product in a ProjectGroup
151+------------------------------------------------
152
153-The user must be logged in to ask a question. When he attempts to ask
154-a question, without being logged in, he encounters an unauthorized
155+The user must be logged in to ask a question. When he attempts to ask a
156+question, without being logged in, he encounters an unauthorized
157 exception (and the user will be prompted to login from another page).
158 The logged user will see the Ask a Question page, for the Mozilla
159 Project in this case.
160@@ -28,11 +30,11 @@
161 >>> print user_browser.title
162 Ask a question...
163
164-The workflow is identical to the regular one, except that the user
165-must select one of the ProjectGroup's Products. The page displays a list of
166-products associated with the project. Note that the site policy is
167-to use the word 'Project' for 'Products' (and 'Distributions') so
168-that users do not have to learn our business' semantics.
169+The workflow is identical to the regular one, except that the user must
170+select one of the ProjectGroup's Products. The page displays a list of
171+products associated with the project. Note that the site policy is to
172+use the word 'Project' for 'Products' (and 'Distributions') so that
173+users do not have to learn our business' semantics.
174
175 >>> print user_browser.getControl('Project').displayOptions
176 ['Mozilla Firefox', 'Mozilla Thunderbird']
177@@ -70,7 +72,7 @@
178
179 >>> similar_questions = find_tag_by_id(
180 ... user_browser.contents, 'similar-questions')
181- >>> for row in similar_questions.fetch('tr', 'noted'):
182+ >>> for row in similar_questions.fetch('tr', 'lesser'):
183 ... print row.a.renderContents()
184 Problem showing the SVG demo on W3C site
185
186@@ -81,8 +83,8 @@
187 >>> user_browser.getControl('Mozilla Thunderbird').selected = True
188
189 If he empties the question summary, and submits the form he'll be
190-redirected to the first page. Let's assume he does this by accident
191-as he revises the summary after reading the similar questions.
192+redirected to the first page. Let's assume he does this by accident as
193+he revises the summary after reading the similar questions.
194
195 >>> user_browser.getControl('Summary').value = ''
196 >>> user_browser.getControl('Post Question').click()
197@@ -94,12 +96,13 @@
198 >>> print soup.first('div', 'message').renderContents()
199 You must enter a summary of your problem.
200
201-The product Thunderbird that he selected on the previous screen is
202-still selected. No Privileged Person re-enters his question summary,
203-and submits the form.
204+The product Thunderbird that he selected on the previous screen is still
205+selected. No Privileged Person re-enters his question summary, and
206+submits the form.
207
208 >>> print user_browser.getControl('Project').displayValue
209 ['Mozilla Thunderbird']
210+
211 >>> user_browser.getControl('Summary').value = (
212 ... 'Problem displaying complex SVG')
213 >>> user_browser.getControl('Continue').click()
214@@ -113,39 +116,43 @@
215 There are no existing FAQs or questions similar to the summary you
216 entered.
217
218-The user then elaborates upon his question by entering a description
219-of the problem. He submits the form using the 'Post Question' button.
220+The user then elaborates upon his question by entering a description of
221+the problem. He submits the form using the 'Post Question' button.
222
223 >>> user_browser.getControl('Description').value = (
224- ... "I received an HTML message containing an inlined SVG\n"
225- ... "representation of a chessboard. It didn't displayed properly.\n"
226- ... "Is there a way to configure Thunderbird to display SVG properly?\n")
227+ ... "I received an HTML message containing an inlined SVG\n"
228+ ... "representation of a chessboard. It didn't displayed properly.\n"
229+ ... "Is there a way to configure Thunderbird to display SVG properly?\n")
230 >>> user_browser.getControl('Post Question').click()
231
232-No Privileged Person is taken to page displaying his question. From
233-this point on, the user's interaction with the question follows to
234-regular workflow. (see 30-question-workflow.txt for the details).
235+No Privileged Person is taken to page displaying his question. From this
236+point on, the user's interaction with the question follows to regular
237+workflow. (see 30-question-workflow.txt for the details).
238
239 >>> user_browser.url
240 '.../thunderbird/+question/...'
241+
242 >>> print user_browser.title
243 Question #... : Questions : Mozilla Thunderbird
244
245
246-== Supported Language behaviour ==
247+Supported Language behaviour
248+----------------------------
249
250 Following a similar path as demonstrated above with a non-English
251-language speaker illustrates a less-than-ideal behaviour for
252-supported languages. (See xx-question-add-in-other-languages.txt
253-for the regular behaviour).
254-
255-=== Register a support contact who speaks a non-English language ===
256-
257-To illustrate the supported language behavior, we add an answer
258-contact to Thunderbird who has Japanese as a preferred language.
259-Japanese will be a supported language for Thunderbird Questions,
260-which allows us to test the supported languages behaviour for
261-non-English languages. Dafydd speaks Japanese, so we will use him.
262+language speaker illustrates a less-than-ideal behaviour for supported
263+languages. (See xx-question-add-in-other-languages.txt for the regular
264+behaviour).
265+
266+
267+Register a support contact who speaks a non-English language
268+............................................................
269+
270+To illustrate the supported language behavior, we add an answer contact
271+to Thunderbird who has Japanese as a preferred language. Japanese will
272+be a supported language for Thunderbird Questions, which allows us to
273+test the supported languages behaviour for non-English languages. Dafydd
274+speaks Japanese, so we will use him.
275
276 >>> daf_browser = setupBrowser(auth='Basic daf@canonical.com:daf')
277 >>> daf_browser.open('http://launchpad.dev/~daf/+editlanguages')
278@@ -169,10 +176,9 @@
279 You have been added as an answer contact for Mozilla Thunderbird.
280
281 And we add Japanese to No Privileges Person's preferred languages. We
282-then have a condition for certain products, Thunderbird in this
283-example, where the user's languages and the answer contact's languages
284-will match. This condition demonstrates the supported language
285-behaviour.
286+then have a condition for certain products, Thunderbird in this example,
287+where the user's languages and the answer contact's languages will
288+match. This condition demonstrates the supported language behaviour.
289
290 >>> user_browser.open(
291 ... 'http://launchpad.dev/~no-priv/+editlanguages')
292@@ -187,33 +193,36 @@
293
294 So if No Privileges Person were to visit the Ask a Question page for
295 Thunderbird directly, he will see that Japanese, as well English (the
296-default supported language), have asterisks next to them in
297-the Language list. This indicates that he can ask a question in
298-Japanese or English and expect someone to reply in the same language.
299+default supported language), have asterisks next to them in the Language
300+list. This indicates that he can ask a question in Japanese or English
301+and expect someone to reply in the same language.
302
303 >>> user_browser.open(
304- ... 'http://answers.launchpad.dev/thunderbird/+addquestion')
305+ ... 'http://answers.launchpad.dev/thunderbird/+addquestion')
306 >>> print user_browser.getControl('Language').displayOptions
307 ['English (en) *', 'Japanese (ja) *']
308
309-The supported languages will not be shown immediately when Sample
310-Person asks a question Thunderbird question from the context of the
311-Mozilla Project.
312-
313-
314-=== Ask a non-English question about a Product in a ProjectGroup ===
315+The supported languages will not be shown immediately when Sample Person
316+asks a question Thunderbird question from the context of the Mozilla
317+Project.
318+
319+
320+Ask a non-English question about a Product in a ProjectGroup
321+............................................................
322
323 Supported languages are only shown after the user submits the 'Product'
324 associated with the project. When a user enters the 'Product'
325 information incorrectly we cannot show the supported languages to the
326 user.
327
328-==== Supported languages aren't displayed after choosing a product ====
329+
330+Supported languages aren't displayed after choosing a product
331+.............................................................
332
333 XXX sinzui 2007-05-02 #111793 (Supported languages will not be shown in
334-some cases when asking questions from the ProjectGroup facet)
335-No Privileges Person visits the Ask a question page from a project just
336-as No Privileged Person did above, but this time in wants to do so in
337+some cases when asking questions from the ProjectGroup facet) No
338+Privileges Person visits the Ask a question page from a project just as
339+No Privileged Person did above, but this time in wants to do so in
340 Japanese.
341
342 >>> user_browser.open('http://answers.launchpad.dev/mozilla')
343@@ -221,22 +230,23 @@
344 >>> print user_browser.title
345 Ask a question...
346
347-The page displays a list of products associated with the project.
348-The first item in the list is the default value, and it will be
349-submitted if the user does not change it.
350+The page displays a list of products associated with the project. The
351+first item in the list is the default value, and it will be submitted if
352+the user does not change it.
353
354 >>> print user_browser.getControl('Project').displayOptions
355 ['Mozilla Firefox', 'Mozilla Thunderbird']
356+
357 >>> print user_browser.getControl('Project').displayValue
358 ['Mozilla Firefox']
359
360 Like for the regular workflow, the user is shown a list of languages,
361 with the supported languages flagged with an asterisk. Note that only
362-English is flagged because we do not know which Product the
363-question is about. Without knowing the product, we cannot flag the
364-supported languages other than the default language of English. If the
365-user were to submit his question in another language, he might find
366-that the language is supported on the next page.
367+English is flagged because we do not know which Product the question is
368+about. Without knowing the product, we cannot flag the supported
369+languages other than the default language of English. If the user were
370+to submit his question in another language, he might find that the
371+language is supported on the next page.
372
373 >>> print user_browser.getControl('Language').displayOptions
374 ['English (en) *', 'Japanese (ja)']
375@@ -252,10 +262,10 @@
376 ... 'Problem displaying complex SVG')
377 >>> user_browser.getControl('Continue').click()
378
379-He's shown a list of similar questions related to the product
380-Firefox. He can see which of his preferred languages are supported
381-for the Firefox product by reviewing which languages has asterisks
382-in the Languages list--only English in the example.
383+He's shown a list of similar questions related to the product Firefox.
384+He can see which of his preferred languages are supported for the
385+Firefox product by reviewing which languages has asterisks in the
386+Languages list--only English in the example.
387
388 >>> print user_browser.getControl('Language').displayOptions
389 ['English (en) *', 'Japanese (ja)']
390@@ -273,15 +283,17 @@
391
392 If No Privileges Person asks a question in Japanese, it will be
393 supported by Dafydd, but No Privileges Person will never know that.
394-Let's stop here. The rest of this scenario is just adding a question
395-as described above--filling in a description and submitting the data
396-with the 'Post Question' button.
397-
398-==== Supported languages are displayed after the submitting a product ====
399+Let's stop here. The rest of this scenario is just adding a question as
400+described above--filling in a description and submitting the data with
401+the 'Post Question' button.
402+
403+
404+Supported languages are displayed after the submitting a product
405+................................................................
406
407 Let's try this again from the starting page, but this time, No
408-Privileges Person correctly chooses Thunderbird as the subject of
409-his question.
410+Privileges Person correctly chooses Thunderbird as the subject of his
411+question.
412
413 >>> user_browser.open('http://answers.launchpad.dev/mozilla')
414 >>> user_browser.getLink('Ask a question').click()
415@@ -295,38 +307,41 @@
416
417 >>> print user_browser.getControl('Language').displayOptions
418 ['English (en) *', 'Japanese (ja)']
419+
420 >>> user_browser.getControl('Summary').value = (
421 ... 'Problem displaying complex SVG')
422 >>> user_browser.getControl('Continue').click()
423
424-The product Thunderbird that he selected on the previous screen is
425-still selected. He can see that this product has support for Japanese
426-as well as English when he sees the asterisks next to both in the
427-Languages list. Japanese is supported because Dafydd speaks Japanese
428-and is an answer contact for Thunderbird. We see this only after a
429-question summary is submitted for a product.
430+The product Thunderbird that he selected on the previous screen is still
431+selected. He can see that this product has support for Japanese as well
432+as English when he sees the asterisks next to both in the Languages
433+list. Japanese is supported because Dafydd speaks Japanese and is an
434+answer contact for Thunderbird. We see this only after a question
435+summary is submitted for a product.
436
437 >>> print user_browser.getControl('Language').displayOptions
438 ['English (en) *', 'Japanese (ja) *']
439
440-No Privileges Person sets the language to Japanese, changes his
441-question summary, writes a description, and submits the form with the
442-'Post Question' button.
443+No Privileges Person sets the language to Japanese, changes his question
444+summary, writes a description, and submits the form with the 'Post
445+Question' button.
446
447 >>> print user_browser.getControl('Project').displayValue
448 ['Mozilla Thunderbird']
449+
450 >>> user_browser.getControl('Japanese (ja) *').selected = True
451 >>> user_browser.getControl('Summary').value = (
452 ... 'Pretend this is written in Japanese')
453 >>> user_browser.getControl('Description').value = (
454- ... "Something in kanji and hiragana.")
455+ ... "Something in kanji and hiragana.")
456 >>> user_browser.getControl('Post Question').click()
457
458-The user is taken to page displaying his question. Changing the
459-language or the summary did not search for similar questions
460-again--the question is created.
461+The user is taken to page displaying his question. Changing the language
462+or the summary did not search for similar questions again--the question
463+is created.
464
465 >>> user_browser.url
466 '.../thunderbird/+question/...'
467+
468 >>> print user_browser.title
469 Question #... : Questions : Mozilla Thunderbird
470
471=== modified file 'lib/lp/answers/stories/questions-index.txt'
472--- lib/lp/answers/stories/questions-index.txt 2010-11-15 23:55:43 +0000
473+++ lib/lp/answers/stories/questions-index.txt 2010-12-18 00:58:15 +0000
474@@ -14,7 +14,7 @@
475 >>> firefox.answers_usage = ServiceUsage.LAUNCHPAD
476 >>> ubuntu.answers_usage = ServiceUsage.LAUNCHPAD
477 >>> logout()
478- >>> transaction.commit()
479+ >>> transaction.commit()
480
481 >>> anon_browser.open('http://answers.launchpad.dev/')
482 >>> print anon_browser.title
483@@ -26,7 +26,7 @@
484 ... anon_browser.contents, 'latest-questions-asked')
485 >>> print latest_questions_asked.first('h2').renderContents()
486 Latest questions asked
487- >>> for row in latest_questions_asked.fetch('tr', 'noted'):
488+ >>> for row in latest_questions_asked.fetch('tr', 'lesser'):
489 ... row.first('a').renderContents()
490 'Problemas de Impress\xc3\xa3o no Firefox'
491 'Problema al recompilar kernel con soporte smp (doble-n\xc3\xbacleo)'
492@@ -40,7 +40,7 @@
493 ... anon_browser.contents, 'latest-questions-solved')
494 >>> print latest_questions_solved.first('h2').renderContents()
495 Latest questions solved
496- >>> for row in latest_questions_solved.fetch('tr', 'noted'):
497+ >>> for row in latest_questions_solved.fetch('tr', 'lesser'):
498 ... row.first('a').renderContents()
499 'mailto: problem in webpage'
500
501
502=== modified file 'lib/lp/answers/templates/question-listing-detailed.pt'
503--- lib/lp/answers/templates/question-listing-detailed.pt 2009-07-17 17:59:07 +0000
504+++ lib/lp/answers/templates/question-listing-detailed.pt 2010-12-18 00:58:15 +0000
505@@ -4,7 +4,7 @@
506 xmlns:i18n="http://xml.zope.org/namespaces/i18n">
507 <tal:description
508 define="global description context/description/fmt:obfuscate-email/fmt:shorten/320" />
509-<tr class="noted"
510+<tr class="lesser"
511 tal:attributes="title description">
512 <td class="icon left">
513 <img alt="" src="/@@/question" />
514@@ -20,7 +20,7 @@
515 />
516 (<span tal:replace="context/status/title">Approved</span>)
517 </div>
518- <div class="lesser">
519+ <div>
520 posted
521 <span
522 tal:attributes="title context/datecreated/fmt:datetime"
523
524=== modified file 'lib/lp/registry/browser/distribution.py'
525--- lib/lp/registry/browser/distribution.py 2010-11-28 00:47:39 +0000
526+++ lib/lp/registry/browser/distribution.py 2010-12-18 00:58:15 +0000
527@@ -829,13 +829,14 @@
528 return all_series
529
530 def getCssClass(self, series):
531- """The highlighted, unhighlighted, or dimmed CSS class."""
532+ """The highlight, lowlight, or normal CSS class."""
533 if series.status == SeriesStatus.DEVELOPMENT:
534- return 'highlighted'
535+ return 'highlight'
536 elif series.status == SeriesStatus.OBSOLETE:
537- return 'dimmed'
538+ return 'lowlight'
539 else:
540- return 'unhighlighted'
541+ # This is normal presentation.
542+ return ''
543
544
545 class DistributionChangeMirrorAdminView(RegistryEditFormView):
546
547=== modified file 'lib/lp/registry/browser/product.py'
548--- lib/lp/registry/browser/product.py 2010-11-23 23:22:27 +0000
549+++ lib/lp/registry/browser/product.py 2010-12-18 00:58:15 +0000
550@@ -810,13 +810,14 @@
551
552 @property
553 def css_class(self):
554- """The highlighted, unhighlighted, or dimmed CSS class."""
555+ """The highlight, lowlight, or normal CSS class."""
556 if self.is_development_focus:
557- return 'highlighted'
558+ return 'highlight'
559 elif self.status == SeriesStatus.OBSOLETE:
560- return 'dimmed'
561+ return 'lowlight'
562 else:
563- return 'unhighlighted'
564+ # This is normal presentation.
565+ return ''
566
567
568 class SeriesWithReleases(DecoratedSeries):
569
570=== modified file 'lib/lp/registry/browser/tests/distribution-views.txt'
571--- lib/lp/registry/browser/tests/distribution-views.txt 2010-11-29 19:08:26 +0000
572+++ lib/lp/registry/browser/tests/distribution-views.txt 2010-12-18 00:58:15 +0000
573@@ -306,10 +306,10 @@
574
575 >>> for styled_series in view.styled_series:
576 ... print styled_series['series'].name, styled_series['css_class']
577- breezy-autotest unhighlighted
578- grumpy unhighlighted
579- hoary highlighted
580- warty unhighlighted
581+ breezy-autotest
582+ grumpy
583+ hoary highlight
584+ warty
585
586
587 Distribution +ppas
588
589=== modified file 'lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt'
590--- lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt 2010-03-26 02:27:44 +0000
591+++ lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt 2010-12-18 00:58:15 +0000
592@@ -1,4 +1,5 @@
593-= Distribution mirrors =
594+Distribution mirrors
595+====================
596
597 There are several pages which list the mirrors of a given distribution based
598 on their status and content.
599@@ -11,13 +12,13 @@
600 ... country = extract_text(header.find('th'))
601 ... mirrors = []
602 ... for tr in header.findNextSiblings('tr'):
603- ... if 'highlighted' in str(tr.attrs):
604+ ... if 'highlight' in str(tr.attrs):
605 ... print "%s: %s" % (country, mirrors)
606 ... country = extract_text(tr.find('th'))
607 ... if country == 'Total':
608 ... break
609 ... mirrors = []
610- ... elif 'note' in str(tr.attrs):
611+ ... elif 'lesser' in str(tr.attrs):
612 ... # This is an empty row to visually separate the mirrors
613 ... # from different countries, so we'll just skip it.
614 ... pass
615@@ -25,7 +26,8 @@
616 ... tds = tuple([extract_text(td) for td in tr.findAll('td')])
617 ... mirrors.append(tds)
618
619-== Official mirrors ==
620+Official mirrors
621+----------------
622
623 These are the mirrors that show up in public listings. They're highly
624 reliable and we strongly encourage their use.
625@@ -48,7 +50,8 @@
626 United Kingdom: [(u'Canonical-archive', u'http', u'100 Mbps',
627 u'Last update unknown')]
628
629- >>> find_tags_by_class(browser.contents, 'distromirrorstatusSIXHOURSBEHIND')
630+ >>> find_tags_by_class(
631+ ... browser.contents, 'distromirrorstatusSIXHOURSBEHIND')
632 [<span class="distromirrorstatusSIXHOURSBEHIND">Six hours behind</span>]
633 >>> find_tags_by_class(browser.contents, 'distromirrorstatusUNKNOWN')[0]
634 <span class="distromirrorstatusUNKNOWN">Last update unknown</span>
635@@ -60,14 +63,15 @@
636 >>> browser.url
637 'http://launchpad.dev/ubuntu/+cdmirrors'
638 >>> print_mirrors_by_countries(browser.contents)
639- France:
640+ France:
641 [(u'Releases-mirror', u'http', u'2 Mbps'),
642 (u'Unreachable-mirror', u'http', u'512 Kbps')]
643 Germany: [(u'Releases-mirror2', u'http', u'2 Mbps')]
644 United Kingdom: [(u'Canonical-releases', u'http', u'100 Mbps')]
645
646
647-=== Disabled mirrors ===
648+Disabled mirrors
649+................
650
651 These are official mirrors for which the last check wasn't successful (e.g.
652 they were out of date, missing some content, etc). This list can only be
653@@ -88,7 +92,8 @@
654 ...We don't know of any Disabled Mirrors for this distribution...
655
656
657-== Unofficial mirrors ==
658+Unofficial mirrors
659+------------------
660
661 The unofficial mirrors are listed in a separate page, which is not public.
662 It's only visible to distro owners, mirror admins of the distro or
663@@ -107,7 +112,9 @@
664 >>> print_mirrors_by_countries(browser.contents)
665 France: [(u'Invalid-mirror', u'http', u'2 Mbps', u'Last update unknown')]
666
667-== Pending-review mirrors ==
668+
669+Pending-review mirrors
670+----------------------
671
672 These are the mirrors that were created but none of the mirror admins have
673 looked at yet. Since all pending mirrors are grouped on one page the
674@@ -122,7 +129,8 @@
675 >>> browser = setupBrowser(auth='Basic karl@canonical.com:test')
676 >>> # Register an unreviewed archive mirror.
677 >>> browser.open('http://launchpad.dev/ubuntu/+newmirror')
678- >>> browser.getControl(name='field.displayname').value = 'Kabul LUG mirror'
679+ >>> browser.getControl(
680+ ... name='field.displayname').value = 'Kabul LUG mirror'
681 >>> browser.getControl(name='field.ftp_base_url').value = (
682 ... 'ftp://kabullug.org/ubuntu')
683 >>> browser.getControl(name='field.country').value = ['1'] # Afghanistan
684
685=== modified file 'lib/lp/registry/stories/productseries/xx-productseries-series.txt'
686--- lib/lp/registry/stories/productseries/xx-productseries-series.txt 2010-08-13 01:20:31 +0000
687+++ lib/lp/registry/stories/productseries/xx-productseries-series.txt 2010-12-18 00:58:15 +0000
688@@ -38,7 +38,7 @@
689 it is highlighted.
690
691 >>> print series_trunk['class']
692- highlighted series
693+ highlight series
694
695 The 1.0 series is not the focus of development, it is active, so it is not
696 highlighted.
697@@ -52,9 +52,9 @@
698 The 1.0 branch of the Mozilla web browser. Currently, this is the ...
699
700 >>> print series_1_0['class']
701- unhighlighted series
702+ series
703
704-Any user can see that obsolete series are dimmed. Obsolete series do not
705+Any user can see that obsolete series are lowlight. Obsolete series do not
706 show bug status counts because it is expensive to retrieve the information.
707
708 >>> series_xxx = find_tag_by_id(content, 'series-xxx')
709@@ -64,4 +64,4 @@
710 Use true GTK UI.
711
712 >>> print series_xxx['class']
713- dimmed series
714+ lowlight series
715
716=== modified file 'lib/lp/registry/templates/distributionmirror-macros.pt'
717--- lib/lp/registry/templates/distributionmirror-macros.pt 2009-12-09 19:41:23 +0000
718+++ lib/lp/registry/templates/distributionmirror-macros.pt 2010-12-18 00:58:15 +0000
719@@ -16,7 +16,7 @@
720 <table class="listing" id="mirrors_list">
721 <tbody>
722 <tal:country_and_mirrors repeat="country_and_mirrors mirrors_by_country">
723- <tr class="highlighted">
724+ <tr class="highlight">
725 <th colspan="2" style="text-align: left"
726 tal:content="country_and_mirrors/country" />
727 <th style="text-align: left"
728@@ -59,12 +59,12 @@
729 Include a blank row after the last entry of a country to provide
730 vertical spacing to separate the next country.
731 </tal:comment>
732- <tr class="note">
733+ <tr class="lesser">
734 <td>&nbsp;</td>
735 </tr>
736
737 </tal:country_and_mirrors>
738- <tr class="highlighted">
739+ <tr class="highlight">
740 <th colspan="5" style="text-align: left; font-weight: bold;">Total</th>
741 </tr>
742 <tr>
743
744=== modified file 'lib/lp/registry/templates/productreleasefile-macros.pt'
745--- lib/lp/registry/templates/productreleasefile-macros.pt 2010-01-15 20:42:44 +0000
746+++ lib/lp/registry/templates/productreleasefile-macros.pt 2010-12-18 00:58:15 +0000
747@@ -26,7 +26,7 @@
748 define="last_downloaded lfa/last_downloaded">
749 <span tal:replace="lfa/hits/fmt:intcomma">10</span>
750 <br />
751- <span class="extra-discreet greyed-out">
752+ <span class="lesser greyed-out">
753 last downloaded
754 <strong tal:condition="not:last_downloaded/days">
755 today
756
757=== modified file 'lib/lp/registry/templates/team-editproposed.pt'
758--- lib/lp/registry/templates/team-editproposed.pt 2009-09-01 19:43:30 +0000
759+++ lib/lp/registry/templates/team-editproposed.pt 2010-12-18 00:58:15 +0000
760@@ -32,8 +32,8 @@
761 <td style="text-align: left">
762 <span tal:replace="structure member/fmt:link" />
763 <br />
764- <span class="extra-discreet">
765- (Applied on
766+ <span class="lesser">
767+ (Applied on
768 <span tal:replace="membership/date_proposed/fmt:date" />)
769 </span>
770 </td>
771
772=== modified file 'lib/lp/soyuz/browser/sourcepackagerelease.py'
773--- lib/lp/soyuz/browser/sourcepackagerelease.py 2010-07-02 20:32:58 +0000
774+++ lib/lp/soyuz/browser/sourcepackagerelease.py 2010-12-18 00:58:15 +0000
775@@ -155,5 +155,5 @@
776 return ''
777 # Match any string with 2 or more non-consecutive slashes in it.
778 pattern = re.compile(r'([\S]+/[\S]+/[\S]+)')
779- highlight = r'<span class="highlighted">\1</span>'
780+ highlight = r'<span class="highlight">\1</span>'
781 return pattern.sub(highlight, self.context.copyright)
782
783=== modified file 'lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py'
784--- lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py 2010-10-04 19:50:45 +0000
785+++ lib/lp/soyuz/browser/tests/test_sourcepackagerelease.py 2010-12-18 00:58:15 +0000
786@@ -87,7 +87,7 @@
787 'Downloaded from https://upstream.dom/fnord/no/ and')
788 expected = (
789 'Downloaded from '
790- '<span class="highlighted">https://upstream.dom/fnord/no/</span> '
791+ '<span class="highlight">https://upstream.dom/fnord/no/</span> '
792 'and')
793 view = create_initialized_view(
794 self.source_package_release, '+copyright')
795@@ -99,7 +99,7 @@
796 'See /usr/share/common-licenses/GPL')
797 expected = (
798 'See '
799- '<span class="highlighted">/usr/share/common-licenses/GPL</span>')
800+ '<span class="highlight">/usr/share/common-licenses/GPL</span>')
801 view = create_initialized_view(
802 self.source_package_release, '+copyright')
803 self.assertEqual(expected, view.highlighted_copyright)
804@@ -110,8 +110,8 @@
805 'See /usr/share/common-licenses/GPL or https://osi.org/mit')
806 expected = (
807 'See '
808- '<span class="highlighted">/usr/share/common-licenses/GPL</span> '
809- 'or <span class="highlighted">https://osi.org/mit</span>')
810+ '<span class="highlight">/usr/share/common-licenses/GPL</span> '
811+ 'or <span class="highlight">https://osi.org/mit</span>')
812 view = create_initialized_view(
813 self.source_package_release, '+copyright')
814 self.assertEqual(expected, view.highlighted_copyright)