← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/kill-uses-launchpad-for-650648 into lp:launchpad/devel

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/kill-uses-launchpad-for-650648 into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #650648 remove "Uses Launchpad for:"
  https://bugs.launchpad.net/bugs/650648


Summary
=======

Removes the "Uses Launchpad for" section on product and distribution, which is superseded by the involvement menu.

Proposed Fix
============

Remove the section in the templates that displays the "Uses Launchpad for" as well as the UsesLaunchpadMixin used by the Views to determine what to display.

Pre-Implementation Talk
=======================

Spoke with Curtis.

Implementation details
======================

As in proposed.

Tests
=====



Demo and Q/A
============

The "Uses Launchpad for: " section on product/distros should be gone on all pages.

Lint
====


-- 
https://code.launchpad.net/~jcsackett/launchpad/kill-uses-launchpad-for-650648/+merge/37252
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/kill-uses-launchpad-for-650648 into lp:launchpad/devel.
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py	2010-09-27 19:32:57 +0000
+++ lib/lp/registry/browser/distribution.py	2010-10-01 13:29:58 +0000
@@ -115,6 +115,7 @@
 from lp.soyuz.interfaces.archive import IArchiveSet
 
 
+# KILL THIS
 class UsesLaunchpadMixin:
     """This mixin is used for the overview page of products and distros."""
 

=== modified file 'lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt'
--- lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt	2009-09-18 15:24:30 +0000
+++ lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt	2010-10-01 13:29:58 +0000
@@ -1,12 +1,8 @@
-= Distribution Launchpad usage =
-
-The distribution overview page indicates for what usage the
-distribution officially uses Launchpad.
-
-    >>> anon_browser.open('http://launchpad.dev/ubuntu')
-    >>> print extract_text(find_tag_by_id(anon_browser.contents, 'uses'))
-    Uses Launchpad for:
-        Answers, Blueprints, Bug Tracking, and Translations.
+Distribution Launchpad usage
+============================
+
+The distribution overview page has links to allow you to configure which
+services use Launchpad.
 
 Unprivileged Launchpad users cannot access the page for changing these
 details.
@@ -43,9 +39,6 @@
     >>> registrant.getControl(name='field.official_rosetta').value = False
     >>> registrant.getControl('Change', index=3).click()
 
-    >>> print extract_text(find_tag_by_id(registrant.contents, 'uses'))
-    Uses Launchpad for: Answers, Blueprints, and Bug Tracking.
-
 Just like Launchpad administrators can.
 
     >>> admin_browser.open('http://launchpad.dev/ubuntu')
@@ -74,11 +67,9 @@
 
     >>> print admin_browser.url
     http://launchpad.dev/ubuntu
-    >>> print extract_text(find_tag_by_id(admin_browser.contents, 'uses'))
-    Does not use Launchpad for development.
-
-
-== enable_bug_expiration and JavaScript ==
+
+enable_bug_expiration and JavaScript
+====================================
 
 JavaScript is used to constrain enable_bug_expiration to distributions
 that use Launchpad to track bugs. If the form is submitted before the
@@ -97,9 +88,6 @@
 
     >>> content = find_main_content(admin_browser.contents)
 
-    >>> print extract_text(find_tag_by_id(admin_browser.contents, 'uses'))
-    Uses Launchpad for: Bug Tracking.
-
 Foo Bar chooses to switch the bug tracker again, but this time he
 does not change the expiration check box, and he does the whole
 operation before the page complete loading.
@@ -116,16 +104,3 @@
     >>> admin_browser.getControl('Change', index=3).click()
 
     >>> content = find_main_content(admin_browser.contents)
-    >>> print extract_text(find_tag_by_id(admin_browser.contents, 'uses'))
-    Does not use Launchpad for development.
-
-Returning to the edit page, Foo Bar can see that bug expiration was
-also disabled.
-
-    >>> admin_browser.getLink('Change details').click()
-    >>> print admin_browser.getControl(name='field.official_malone').value
-    False
-
-    >>> print admin_browser.getControl(
-    ...     name='field.enable_bug_expiration').value
-    False

=== modified file 'lib/lp/registry/stories/product/xx-product-launchpad-usage.txt'
--- lib/lp/registry/stories/product/xx-product-launchpad-usage.txt	2010-08-31 14:28:04 +0000
+++ lib/lp/registry/stories/product/xx-product-launchpad-usage.txt	2010-10-01 13:29:58 +0000
@@ -4,16 +4,12 @@
 The launchpad usage flags (whether the product uses Bugs, Answers or
 Translations officially) are found on the +edit page.
 
+Only the product registrant and the admins have access to this page.
+
     >>> anon_browser.open('http://launchpad.dev/firefox')
     >>> print anon_browser.title
     Mozilla Firefox in Launchpad
 
-    >>> uses = find_tag_by_id(anon_browser.contents, id='uses')
-    >>> print extract_text(uses)
-    Uses Launchpad for: Answers and Bug Tracking.
-
-Only the product registrant and the admins have access to this page.
-
     >>> anon_browser.getLink('Change details')
     Traceback (most recent call last):
       ...
@@ -85,12 +81,17 @@
     >>> registrant_browser.getControl('Unknown').click()
     >>> registrant_browser.getControl('Change').click()
 
-On the product page, we can see that the product doesn't use any bug
-tracker, not even Launchpad.
+On the product page, we can see that Codehosting, Bugtracking, and Answers
+are all disabled.
 
-    >>> uses = find_tag_by_id(registrant_browser.contents, id='uses')
-    >>> print extract_text(uses)
-    Uses Launchpad for: Translations.
+    >>> disabled = find_tags_by_class(registrant_browser.contents, 'disabled') 
+    >>> for item in disabled:
+    ...     print extract_text(item)
+    ...
+    Report a bug
+    Ask a question
+    Submit code
+     
 
 Blueprints can be enabled too, though it isn't easy.
 
@@ -110,25 +111,35 @@
     >>> registrant_browser.getControl('Change').click()
 
 
-On the product page, we can see that the product doesn't use any bug
-tracker, not even Launchpad, but does use Translations.
+On the product page, we see that everything but Translations is stil
+disabled. Blueprints isn't shown in the involvment menu, so we don't
+see anything about it, disabled or not.
 
     >>> registrant_browser.open('http://launchpad.dev/firefox')
-    >>> uses = find_tag_by_id(registrant_browser.contents, id='uses')
-    >>> print extract_text(uses)
-    Uses Launchpad for: Blueprints and Translations.
+    >>> disabled = find_tags_by_class(registrant_browser.contents, 'disabled') 
+    >>> for item in disabled:
+    ...     print extract_text(item)
+    ...
+    Report a bug
+    Ask a question
+    Submit code
 
-Setting a usage to external is reflected in the "Uses" message.
-Change translations to external.
+The menu shows external usage as not using Launchpad. We'll set
+Translations to external.
 
     >>> registrant_browser.open('http://launchpad.dev/firefox')
     >>> registrant_browser.getLink('Configure translations').click()
     >>> registrant_browser.getControl('External').click()
     >>> registrant_browser.getControl('Change').click()
 
-    >>> uses = find_tag_by_id(registrant_browser.contents, id='uses')
-    >>> print extract_text(uses)
-    Uses Launchpad for: Blueprints.
+    >>> disabled = find_tags_by_class(registrant_browser.contents, 'disabled') 
+    >>> for item in disabled:
+    ...     print extract_text(item)
+    ...
+    Report a bug
+    Ask a question
+    Help translate
+    Submit code
 
 
 Tracking bugs by email
@@ -204,11 +215,17 @@
     >>> registrant_browser.getControl('Somewhere else').selected = True
     >>> registrant_browser.getControl('Change').click()
 
-The Status of Launchpad uses shows the bug tracker was changed.
+The Status of Launchpad uses shows the bug tracker was changed, and marked as
+disabled in the involvement menu.
 
-    >>> uses = find_tag_by_id(registrant_browser.contents, id='uses')
-    >>> print extract_text(uses)
-    Does not use Launchpad for development.
+    >>> disabled = find_tags_by_class(registrant_browser.contents, 'disabled') 
+    >>> for item in disabled:
+    ...     print extract_text(item)
+    ...
+    Report a bug
+    Ask a question
+    Help translate
+    Submit code
 
 Reviewing the edit page again, Dafydd, can see that bug expiration was
 also disabled by the switch from Launchpad Bugs.

=== modified file 'lib/lp/registry/templates/distribution-details.pt'
--- lib/lp/registry/templates/distribution-details.pt	2009-09-17 12:02:37 +0000
+++ lib/lp/registry/templates/distribution-details.pt	2010-10-01 13:29:58 +0000
@@ -70,17 +70,6 @@
     </dl>
   </div>
 
-  <dl id="uses" tal:define="uses_launchpad view/uses_launchpad_for">
-    <tal:uses_launchpad condition="uses_launchpad">
-      <dt>Uses Launchpad for:</dt>
-      <dd><tal:uses content="structure uses_launchpad" />.</dd>
-    </tal:uses_launchpad>
-    <tal:no_launchpad condition="not: uses_launchpad">
-      <dt>Does not use Launchpad for development.</dt>
-      <dd></dd>
-    </tal:no_launchpad>
-  </dl>
-
   <dl id="uploaders" style="clear:left">
     <dt>Uploaders:</dt>
 

=== modified file 'lib/lp/registry/templates/product-index.pt'
--- lib/lp/registry/templates/product-index.pt	2010-09-03 13:32:42 +0000
+++ lib/lp/registry/templates/product-index.pt	2010-10-01 13:29:58 +0000
@@ -96,17 +96,6 @@
                 </dd>
               </dl>
 
-              <dl id="uses" tal:define="uses_launchpad view/uses_launchpad_for">
-                <tal:uses_launchpad condition="uses_launchpad">
-                  <dt>Uses Launchpad for:</dt>
-                  <dd><tal:uses content="structure uses_launchpad" />.</dd>
-                </tal:uses_launchpad>
-                <tal:no_launchpad condition="not: uses_launchpad">
-                  <dt>Does not use Launchpad for development.</dt>
-                  <dd></dd>
-                </tal:no_launchpad>
-              </dl>
-
               <dl id="dev-focus"
                   tal:define="dev_focus context/development_focus;
                               trunk dev_focus/branch;

=== modified file 'lib/lp/translations/stories/project/xx-project-translations.txt'
--- lib/lp/translations/stories/project/xx-project-translations.txt	2010-02-17 11:13:06 +0000
+++ lib/lp/translations/stories/project/xx-project-translations.txt	2010-10-01 13:29:58 +0000
@@ -82,16 +82,7 @@
   ...
   LinkNotFoundError
 
-It's using Launchpad Translations officially.
-
-  >>> browser.open('http://launchpad.dev/alsa-utils')
-  >>> print browser.url
-  http://launchpad.dev/alsa-utils
-  >>> uses = find_tag_by_id(browser.contents, 'uses')
-  >>> print extract_text(uses)
-  Uses Launchpad for: Translations.
-
-And it has translations.
+It's using Launchpad Translations officially. And it has translations.
 
   >>> browser.open('http://translations.launchpad.dev/alsa-utils')
   >>> print browser.url

=== modified file 'lib/lp/translations/stories/translationgroups/10-distro-translation-group.txt'
--- lib/lp/translations/stories/translationgroups/10-distro-translation-group.txt	2009-09-18 15:42:19 +0000
+++ lib/lp/translations/stories/translationgroups/10-distro-translation-group.txt	2010-10-01 13:29:58 +0000
@@ -1,15 +1,9 @@
 Now, let's go have a look at where we can use these translation groups.
 We want to check out the distro side first.
 
-Ubuntu is using Launchpad for translations
-
-    >>> anon_browser.open('http://launchpad.dev/ubuntu')
-    >>> print extract_text(
-    ...     find_tag_by_id(anon_browser.contents, 'uses'))
-    Uses Launchpad for: ... Translations.
-
-Ubuntu doesn't have TranslationGroup and uses open permissions. We can
-see that from the translations page.
+Ubuntu is using Launchpad for translations. Ubuntu doesn't have
+TranslationGroup and uses open permissions. We can see that from the
+translations page.
 
     >>> anon_browser.getLink('Translations').click()
     >>> print anon_browser.title

=== modified file 'lib/lp/translations/stories/translationgroups/15-product-translation-group.txt'
--- lib/lp/translations/stories/translationgroups/15-product-translation-group.txt	2010-09-26 21:49:27 +0000
+++ lib/lp/translations/stories/translationgroups/15-product-translation-group.txt	2010-10-01 13:29:58 +0000
@@ -1,29 +1,6 @@
 We should also be able to set a translation group and translation
 permissions on a product. We'll use the Netapplet product for this test.
 
-First make sure it uses Launchpad for translations.
-
-    >>> netapplet_owner_browser = setupBrowser(
-    ...     auth='Basic test@xxxxxxxxxxxxx:test')
-    >>> netapplet_owner_browser.open('http://launchpad.dev/netapplet')
-    >>> print extract_text(
-    ...     find_tag_by_id(netapplet_owner_browser.contents, 'uses'))
-    Does not use Launchpad for development.
-
-    >>> netapplet_owner_browser.getLink(
-    ...   'Configure translations').click()
-    >>> print netapplet_owner_browser.title
-    Configure Translations : NetApplet
-
-    >>> netapplet_owner_browser.getControl('Launchpad').click()
-    >>> netapplet_owner_browser.getControl('Change').click()
-    >>> print netapplet_owner_browser.title
-    Network Applet in Launchpad
-
-    >>> print extract_text(
-    ...     find_tag_by_id(netapplet_owner_browser.contents, 'uses'))
-    Uses Launchpad for: Translations.
-
 Netapplet doesn't have TranslationGroup and uses open permissions. We
 can see that from the translations page.
 


Follow ups