← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/bug-756983 into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/bug-756983 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #756983 in Launchpad itself: "Distribution "Latest derivatives" portlet should be behind a feature flag"
  https://bugs.launchpad.net/launchpad/+bug/756983

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-756983/+merge/57097

DistroSeries:+index and Distribution:+index each had a list of derived series added, but production data is bad and it's not clear that we want to show this on +index anyway. This branch hides it behind the usual soyuz.derived-series-ui.enabled feature flag.
-- 
https://code.launchpad.net/~wgrant/launchpad/bug-756983/+merge/57097
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-756983 into lp:launchpad.
=== modified file 'lib/lp/registry/stories/distribution/xx-distribution-overview.txt'
--- lib/lp/registry/stories/distribution/xx-distribution-overview.txt	2011-04-08 13:37:07 +0000
+++ lib/lp/registry/stories/distribution/xx-distribution-overview.txt	2011-04-11 00:53:25 +0000
@@ -83,7 +83,11 @@
 The 5 latest derivatives are displayed on the home page
 along with a link to list all of them.
 
-   >>> anon_browser.open('http://launchpad.dev/ubuntu')
+   >>> from lp.services.features.testing import FeatureFixture
+   >>> derivation_enabled = FeatureFixture(
+   ...     {'soyuz.derived-series-ui.enabled': 'on'})
+   >>> with derivation_enabled:
+   ...     anon_browser.open('http://launchpad.dev/ubuntu')
    >>> print extract_text(find_tag_by_id(anon_browser.contents,
    ... 'derivatives'))
    Latest derivatives
@@ -110,7 +114,8 @@
 If there is no derivatives, the link to the derivatives page is
 not there.
 
-   >>> anon_browser.open('http://launchpad.dev/ubuntutest')
+   >>> with derivation_enabled:
+   ...     anon_browser.open('http://launchpad.dev/ubuntutest')
    >>> print extract_text(find_tag_by_id(anon_browser.contents,
    ... 'derivatives'))
    Latest derivatives

=== modified file 'lib/lp/registry/stories/distroseries/xx-distroseries-index.txt'
--- lib/lp/registry/stories/distroseries/xx-distroseries-index.txt	2011-04-08 13:04:24 +0000
+++ lib/lp/registry/stories/distroseries/xx-distroseries-index.txt	2011-04-11 00:53:25 +0000
@@ -16,7 +16,11 @@
 The distroseries pages presents the 'registering' information besides
 its main 'heading'.
 
-    >>> anon_browser.open('http://launchpad.dev/ubuntu/warty')
+    >>> from lp.services.features.testing import FeatureFixture
+    >>> derivation_enabled = FeatureFixture(
+    ...     {'soyuz.derived-series-ui.enabled': 'on'})
+    >>> with derivation_enabled:
+    ...     anon_browser.open('http://launchpad.dev/ubuntu/warty')
 
     >>> print extract_text(
     ...     find_tag_by_id(anon_browser.contents, 'registration'))
@@ -54,7 +58,8 @@
 On series that have no source or binary packages, the portlet will
 change its text slightly to annouce this:
 
-    >>> anon_browser.open('http://launchpad.dev/debian/sarge')
+    >>> with derivation_enabled:
+    ...     anon_browser.open('http://launchpad.dev/debian/sarge')
     >>> print extract_text(
     ...     find_portlet(anon_browser.contents, 'Series information'))
     Series information

=== modified file 'lib/lp/registry/templates/distribution-index.pt'
--- lib/lp/registry/templates/distribution-index.pt	2011-04-08 07:43:39 +0000
+++ lib/lp/registry/templates/distribution-index.pt	2011-04-11 00:53:25 +0000
@@ -63,7 +63,7 @@
         <div class="yui-u">
           <tal:series replace="structure context/@@+series-and-milestones" />
         </div>
-        <div class="yui-u">
+        <div class="yui-u" tal:condition="features/soyuz.derived-series-ui.enabled">
           <tal:series replace="structure context/@@+derivatives-slot" />
         </div>
        </div>

=== modified file 'lib/lp/registry/templates/distroseries-details.pt'
--- lib/lp/registry/templates/distroseries-details.pt	2011-04-08 11:00:16 +0000
+++ lib/lp/registry/templates/distroseries-details.pt	2011-04-11 00:53:25 +0000
@@ -60,7 +60,8 @@
       </dd>
     </dl>
 
-    <dl tal:define="all_child_series context/getDerivedSeries">
+    <dl tal:condition="request/features/soyuz.derived-series-ui.enabled"
+        tal:define="all_child_series context/getDerivedSeries">
       <dt>Derived series:</dt>
       <dd>
         <tal:per_child_series repeat="child_series all_child_series">