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
=== modified file 'lib/lp/registry/browser/tests/pillar-views.txt'
--- lib/lp/registry/browser/tests/pillar-views.txt 2010-09-10 13:29:42 +0000
+++ lib/lp/registry/browser/tests/pillar-views.txt 2010-09-15 15:41:19 +0000
@@ -153,35 +153,6 @@
153 <span class="sprite no">...153 <span class="sprite no">...
154 </table>154 </table>
155155
156Until other supporting code lands, the progress bar is not going to be
157shown on lpnet.
158
159 >>> # Pretend that we're on launchpad.net:
160 >>> from canonical.config import config
161 >>> from textwrap import dedent
162 >>> test_data = dedent("""
163 ... [launchpad]
164 ... is_lpnet: True
165 ... """)
166 >>> config.push('test_data', test_data)
167
168The progress bar is not shown on lpnet.
169
170 >>> view = create_view(product, '+get-involved')
171 >>> rendered = view.render()
172 >>> print find_tag_by_id(rendered, 'progressbar')
173 None
174
175Neither are the indicator sprites.
176
177 >>> 'sprite' in find_tag_by_id(rendered, 'configuration_links')
178 False
179
180 >>> # Restore the previous config:
181 >>> config_data = config.pop('test_data')
182 >>> print config.launchpad.is_lpnet
183 False
184
185Project groups are supported too, but they only display the156Project groups are supported too, but they only display the
186applications used by their products.157applications used by their products.
187158
188159
=== modified file 'lib/lp/registry/templates/pillar-involvement-portlet.pt'
--- lib/lp/registry/templates/pillar-involvement-portlet.pt 2010-08-04 12:34:28 +0000
+++ lib/lp/registry/templates/pillar-involvement-portlet.pt 2010-09-15 15:41:19 +0000
@@ -3,7 +3,6 @@
3 xmlns:i18n="http://xml.zope.org/namespaces/i18n"3 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
4 id="involvement" class="portlet"4 id="involvement" class="portlet"
5 tal:condition="view/has_involvement"5 tal:condition="view/has_involvement"
6 tal:define="is_lpnet modules/canonical.config/config/launchpad/is_lpnet;"
7 >6 >
8 <h2>Get Involved</h2>7 <h2>Get Involved</h2>
98
@@ -35,7 +34,6 @@
35 <tal:editor condition="context/required:launchpad.Edit"34 <tal:editor condition="context/required:launchpad.Edit"
36 define="registration view/registration_completeness">35 define="registration view/registration_completeness">
3736
38 <tal:not_lpnet condition="not:is_lpnet">
39 <tal:show_configuration condition="registration">37 <tal:show_configuration condition="registration">
40 <h2>Configuration Progress</h2>38 <h2>Configuration Progress</h2>
41 <div class="centered" id="progressbar">39 <div class="centered" id="progressbar">
@@ -54,7 +52,6 @@
54 </table>52 </table>
55 </div>53 </div>
56 </tal:show_configuration>54 </tal:show_configuration>
57 </tal:not_lpnet>
5855
59 <table style="width: 100%; padding-top: 1em"56 <table style="width: 100%; padding-top: 1em"
60 tal:condition="view/configuration_links"57 tal:condition="view/configuration_links"
@@ -65,11 +62,9 @@
65 <a tal:replace="structure link_status/link/fmt:link" />62 <a tal:replace="structure link_status/link/fmt:link" />
66 </td>63 </td>
6764
68 <tal:not_lpnet condition="not:is_lpnet">
69 <td style="text-align: right;" tal:condition="registration">65 <td style="text-align: right;" tal:condition="registration">
70 <tal:yes-no replace="structure link_status/configured/image:boolean" />66 <tal:yes-no replace="structure link_status/configured/image:boolean" />
71 </td>67 </td>
72 </tal:not_lpnet>
7368
74 </tr>69 </tr>
75 </tal:item>70 </tal:item>