← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/remove-inline-filebug-base-url into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-inline-filebug-base-url into lp:launchpad.

Commit message:
Remove FileBugViewBase.inline_filebug_base_url.  The duplicate finder no longer needs it.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-inline-filebug-base-url/+merge/327881

Noticed by eslint.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-inline-filebug-base-url into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py	2016-07-30 01:10:27 +0000
+++ lib/lp/bugs/browser/bugtarget.py	2017-07-21 14:11:08 +0000
@@ -705,15 +705,6 @@
         raise NotImplementedError
 
     @property
-    def inline_filebug_base_url(self):
-        """Return the base URL for the current request.
-
-        This allows us to build URLs in Javascript without guessing at
-        domains.
-        """
-        return self.request.getRootURL(None)
-
-    @property
     def inline_filebug_form_url(self):
         """Return the URL to the inline filebug form.
 

=== modified file 'lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt'
--- lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt	2012-10-03 19:28:12 +0000
+++ lib/lp/bugs/browser/tests/bugtarget-filebug-views.txt	2017-07-21 14:11:08 +0000
@@ -49,23 +49,14 @@
 URLs to additional FileBug elements
 -----------------------------------
 
-FileBugViewBase's inline_filebug_base_url returns the base URL for all
-inline +filebug work.
+FileBugViewBase provides properties that return the URLs of useful parts of
+the +filebug process.
 
     >>> from lp.registry.interfaces.product import IProductSet
     >>> firefox = getUtility(IProductSet).getByName('firefox')
     >>> filebug_view = create_initialized_view(
     ...     firefox, '+filebug')
 
-This property returns the root URL of the current request, so in the
-case of this test will return 127.0.0.1.
-
-    >>> print filebug_view.inline_filebug_base_url
-    http://127.0.0.1/
-
-FileBugViewBase provides properties that return the URLs of further
-useful parts of the +filebug process.
-
 The inline_filebug_form_url property returns the URL of the inline
 filebug form so that it may be loaded asynchronously.
 

=== modified file 'lib/lp/bugs/javascript/filebug_dupefinder.js'
--- lib/lp/bugs/javascript/filebug_dupefinder.js	2012-09-10 20:52:27 +0000
+++ lib/lp/bugs/javascript/filebug_dupefinder.js	2017-07-21 14:11:08 +0000
@@ -39,10 +39,6 @@
  * The base URL for similar bug searches.
  */
 var search_url_base;
-/**
- * The base URL for all inline +filebug work.
- */
-var filebug_base_url;
 
 
 /*
@@ -317,8 +313,7 @@
  * +filebug search form.
  */
 function set_up_dupe_finder(transaction_id, response, args) {
-    // Grab the inline filebug base url and store it.
-    filebug_base_url = Y.one('#filebug-base-url').getAttribute('href');
+    // Grab the inline duplicate search URL and store it.
     search_url_base = Y.one('#duplicate-search-url').getAttribute('href');
 
     search_button = Y.one(Y.DOM.byId('field.actions.search'));

=== modified file 'lib/lp/bugs/javascript/tests/test_filebug_dupefinder.html'
--- lib/lp/bugs/javascript/tests/test_filebug_dupefinder.html	2012-10-26 09:54:28 +0000
+++ lib/lp/bugs/javascript/tests/test_filebug_dupefinder.html	2017-07-21 14:11:08 +0000
@@ -93,7 +93,6 @@
                 </div>
             </div>
             <p style="display: none">
-                <a id="filebug-base-url" href="https://bugs.launchpad.dev/";></a>
                 <a id="filebug-form-url" href="https://bugs.launchpad.dev/foo/+filebug-inline-form";></a>
                 <a id="duplicate-search-url" href="https://bugs.launchpad.dev/foo/+filebug-show-similar";></a>
             </p>

=== modified file 'lib/lp/bugs/templates/bugtarget-filebug-search.pt'
--- lib/lp/bugs/templates/bugtarget-filebug-search.pt	2012-09-21 02:51:51 +0000
+++ lib/lp/bugs/templates/bugtarget-filebug-search.pt	2017-07-21 14:11:08 +0000
@@ -141,9 +141,7 @@
             </tal:filebug-form>
           </div>
         </tal:not_project_group>
-        <p class="hidden" tal:condition="view/inline_filebug_base_url|nothing">
-          <a id="filebug-base-url"
-              tal:attributes="href view/inline_filebug_base_url"></a>
+        <p class="hidden" tal:condition="view/inline_filebug_form_url|nothing">
           <a id="filebug-form-url"
               tal:attributes="href view/inline_filebug_form_url"></a>
           <a id="duplicate-search-url"


Follow ups