Merge lp:~bac/launchpad/bug-638420 into lp:launchpad

Proposed by Brad Crittenden
Status: Merged
Approved by: Brad Crittenden
Approved revision: no longer in the source branch.
Merged at revision: 11552
Proposed branch: lp:~bac/launchpad/bug-638420
Merge into: lp:launchpad
Diff against target: 79 lines (+0/-34)
2 files modified
lib/lp/registry/browser/tests/pillar-views.txt (+0/-29)
lib/lp/registry/templates/pillar-involvement-portlet.pt (+0/-5)
To merge this branch: bzr merge lp:~bac/launchpad/bug-638420
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+35477@code.launchpad.net

Commit message

Enable project configuration progress bars on lpnet.

Description of the change

= Summary =

The roll-out of the progress bar was blocked from lpnet originally as it
wasn't accurate. It should be presented in the 10.10 release.

== Proposed fix ==

Remove the template-based traps that prevented the progress bar and
yes/no indicators from rendering.

The test was changed to demonstrate that the progress bar does show up
in lpnet. But, that test makes no sense going forward so the entire
section was removed.

== Pre-implementation notes ==

None

== Implementation details ==

As above.

== Tests ==

bin/test -vvt pillar-views.txt

== Demo and Q/A ==

Look at project home page (for a project you own) on production and see
the progress bar.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/templates/pillar-involvement-portlet.pt
  lib/lp/registry/browser/tests/pillar-views.txt

To post a comment you must log in.
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Brad,

This looks good.

-Edwin

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/registry/browser/tests/pillar-views.txt'
2--- lib/lp/registry/browser/tests/pillar-views.txt 2010-09-10 13:29:42 +0000
3+++ lib/lp/registry/browser/tests/pillar-views.txt 2010-09-15 15:41:19 +0000
4@@ -153,35 +153,6 @@
5 <span class="sprite no">...
6 </table>
7
8-Until other supporting code lands, the progress bar is not going to be
9-shown on lpnet.
10-
11- >>> # Pretend that we're on launchpad.net:
12- >>> from canonical.config import config
13- >>> from textwrap import dedent
14- >>> test_data = dedent("""
15- ... [launchpad]
16- ... is_lpnet: True
17- ... """)
18- >>> config.push('test_data', test_data)
19-
20-The progress bar is not shown on lpnet.
21-
22- >>> view = create_view(product, '+get-involved')
23- >>> rendered = view.render()
24- >>> print find_tag_by_id(rendered, 'progressbar')
25- None
26-
27-Neither are the indicator sprites.
28-
29- >>> 'sprite' in find_tag_by_id(rendered, 'configuration_links')
30- False
31-
32- >>> # Restore the previous config:
33- >>> config_data = config.pop('test_data')
34- >>> print config.launchpad.is_lpnet
35- False
36-
37 Project groups are supported too, but they only display the
38 applications used by their products.
39
40
41=== modified file 'lib/lp/registry/templates/pillar-involvement-portlet.pt'
42--- lib/lp/registry/templates/pillar-involvement-portlet.pt 2010-08-04 12:34:28 +0000
43+++ lib/lp/registry/templates/pillar-involvement-portlet.pt 2010-09-15 15:41:19 +0000
44@@ -3,7 +3,6 @@
45 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
46 id="involvement" class="portlet"
47 tal:condition="view/has_involvement"
48- tal:define="is_lpnet modules/canonical.config/config/launchpad/is_lpnet;"
49 >
50 <h2>Get Involved</h2>
51
52@@ -35,7 +34,6 @@
53 <tal:editor condition="context/required:launchpad.Edit"
54 define="registration view/registration_completeness">
55
56- <tal:not_lpnet condition="not:is_lpnet">
57 <tal:show_configuration condition="registration">
58 <h2>Configuration Progress</h2>
59 <div class="centered" id="progressbar">
60@@ -54,7 +52,6 @@
61 </table>
62 </div>
63 </tal:show_configuration>
64- </tal:not_lpnet>
65
66 <table style="width: 100%; padding-top: 1em"
67 tal:condition="view/configuration_links"
68@@ -65,11 +62,9 @@
69 <a tal:replace="structure link_status/link/fmt:link" />
70 </td>
71
72- <tal:not_lpnet condition="not:is_lpnet">
73 <td style="text-align: right;" tal:condition="registration">
74 <tal:yes-no replace="structure link_status/configured/image:boolean" />
75 </td>
76- </tal:not_lpnet>
77
78 </tr>
79 </tal:item>