Bug 1350229 - Removing Preview side panel. r?rickychien draft
authorLocke Chen <locke12456@gmail.com>
Fri, 07 Apr 2017 23:31:18 +0800
changeset 558396 655ccf34f899976b6eda4c51419fb95391994da2
parent 558350 6471400d8fbe3579149744cf64a4e060bb353c97
child 623198 83fcb23d445e37389e600167e0dce7338d59612e
push id52876
push userbmo:locke12456@gmail.com
push dateFri, 07 Apr 2017 15:31:40 +0000
reviewersrickychien
bugs1350229
milestone55.0a1
Bug 1350229 - Removing Preview side panel. r?rickychien MozReview-Commit-ID: aDksj7VKAp
devtools/client/locales/en-US/netmonitor.properties
devtools/client/netmonitor/src/components/moz.build
devtools/client/netmonitor/src/components/preview-panel.js
devtools/client/netmonitor/src/components/tabbox-panel.js
python/devtools/migrate-l10n/migrate/conf/bug1308500_1309191
--- a/devtools/client/locales/en-US/netmonitor.properties
+++ b/devtools/client/locales/en-US/netmonitor.properties
@@ -452,20 +452,16 @@ netmonitor.tab.response=Response
 # LOCALIZATION NOTE (netmonitor.tab.timings): This is the label displayed
 # in the network details pane identifying the timings tab.
 netmonitor.tab.timings=Timings
 
 # LOCALIZATION NOTE (netmonitor.tab.stackTrace): This is the label displayed
 # in the network details pane identifying the stack-trace tab.
 netmonitor.tab.stackTrace=Stack Trace
 
-# LOCALIZATION NOTE (netmonitor.tab.preview): This is the label displayed
-# in the network details pane identifying the preview tab.
-netmonitor.tab.preview=Preview
-
 # LOCALIZATION NOTE (netmonitor.tab.security): This is the label displayed
 # in the network details pane identifying the security tab.
 netmonitor.tab.security=Security
 
 # LOCALIZATION NOTE (netmonitor.toolbar.filter.all): This is the label displayed
 # in the network toolbar for the "All" filtering button.
 netmonitor.toolbar.filter.all=All
 
--- a/devtools/client/netmonitor/src/components/moz.build
+++ b/devtools/client/netmonitor/src/components/moz.build
@@ -7,17 +7,16 @@ DevToolsModules(
     'cookies-panel.js',
     'custom-request-panel.js',
     'editor.js',
     'headers-panel.js',
     'mdn-link.js',
     'monitor-panel.js',
     'network-details-panel.js',
     'params-panel.js',
-    'preview-panel.js',
     'properties-view.js',
     'request-list-content.js',
     'request-list-empty-notice.js',
     'request-list-header.js',
     'request-list-item.js',
     'request-list.js',
     'response-panel.js',
     'security-panel.js',
deleted file mode 100644
--- a/devtools/client/netmonitor/src/components/preview-panel.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-"use strict";
-
-const { DOM, PropTypes } = require("devtools/client/shared/vendor/react");
-
-const { div, iframe } = DOM;
-
-/*
- * Preview panel component
- * Display HTML content within a sandbox enabled iframe
- */
-function PreviewPanel({ request }) {
-  const htmlBody = request.responseContent ?
-    request.responseContent.content.text : "";
-
-  return (
-    div({ className: "panel-container" },
-      iframe({
-        sandbox: "",
-        srcDoc: typeof htmlBody === "string" ? htmlBody : "",
-      })
-    )
-  );
-}
-
-PreviewPanel.displayName = "PreviewPanel";
-
-PreviewPanel.propTypes = {
-  request: PropTypes.object.isRequired,
-};
-
-module.exports = PreviewPanel;
--- a/devtools/client/netmonitor/src/components/tabbox-panel.js
+++ b/devtools/client/netmonitor/src/components/tabbox-panel.js
@@ -5,36 +5,33 @@
 "use strict";
 
 const {
   createFactory,
   PropTypes,
 } = require("devtools/client/shared/vendor/react");
 const { connect } = require("devtools/client/shared/vendor/react-redux");
 const Actions = require("../actions/index");
-const { Filters } = require("../utils/filter-predicates");
 const { L10N } = require("../utils/l10n");
 const { getSelectedRequest } = require("../selectors/index");
 
 // Components
 const Tabbar = createFactory(require("devtools/client/shared/components/tabs/tabbar"));
 const TabPanel = createFactory(require("devtools/client/shared/components/tabs/tabs").TabPanel);
 const CookiesPanel = createFactory(require("./cookies-panel"));
 const HeadersPanel = createFactory(require("./headers-panel"));
 const ParamsPanel = createFactory(require("./params-panel"));
-const PreviewPanel = createFactory(require("./preview-panel"));
 const ResponsePanel = createFactory(require("./response-panel"));
 const SecurityPanel = createFactory(require("./security-panel"));
 const StackTracePanel = createFactory(require("./stack-trace-panel"));
 const TimingsPanel = createFactory(require("./timings-panel"));
 
 const COOKIES_TITLE = L10N.getStr("netmonitor.tab.cookies");
 const HEADERS_TITLE = L10N.getStr("netmonitor.tab.headers");
 const PARAMS_TITLE = L10N.getStr("netmonitor.tab.params");
-const PREVIEW_TITLE = L10N.getStr("netmonitor.tab.preview");
 const RESPONSE_TITLE = L10N.getStr("netmonitor.tab.response");
 const SECURITY_TITLE = L10N.getStr("netmonitor.tab.security");
 const STACK_TRACE_TITLE = L10N.getStr("netmonitor.tab.stackTrace");
 const TIMINGS_TITLE = L10N.getStr("netmonitor.tab.timings");
 
 /*
  * Tabbox panel component
  * Display the network request details
@@ -95,23 +92,16 @@ function TabboxPanel({
       ),
       request.securityState && request.securityState !== "insecure" &&
       TabPanel({
         id: "security",
         title: SECURITY_TITLE,
       },
         SecurityPanel({ request }),
       ),
-      Filters.html(request) &&
-      TabPanel({
-        id: "preview",
-        title: PREVIEW_TITLE,
-      },
-        PreviewPanel({ request }),
-      ),
     )
   );
 }
 
 TabboxPanel.displayName = "TabboxPanel";
 
 TabboxPanel.propTypes = {
   activeTabId: PropTypes.string,
--- a/python/devtools/migrate-l10n/migrate/conf/bug1308500_1309191
+++ b/python/devtools/migrate-l10n/migrate/conf/bug1308500_1309191
@@ -13,17 +13,16 @@ netmonitor.properties:netmonitor.toolbar
 netmonitor.properties:netmonitor.toolbar.transferred = netmonitor.dtd:netmonitorUI.toolbar.transferred
 netmonitor.properties:netmonitor.toolbar.size = netmonitor.dtd:netmonitorUI.toolbar.size
 netmonitor.properties:netmonitor.toolbar.waterfall = netmonitor.dtd:netmonitorUI.toolbar.waterfall
 netmonitor.properties:netmonitor.tab.headers = netmonitor.dtd:netmonitorUI.tab.headers
 netmonitor.properties:netmonitor.tab.cookies = netmonitor.dtd:netmonitorUI.tab.cookies
 netmonitor.properties:netmonitor.tab.params = netmonitor.dtd:netmonitorUI.tab.params
 netmonitor.properties:netmonitor.tab.response = netmonitor.dtd:netmonitorUI.tab.response
 netmonitor.properties:netmonitor.tab.timings = netmonitor.dtd:netmonitorUI.tab.timings
-netmonitor.properties:netmonitor.tab.preview = netmonitor.dtd:netmonitorUI.tab.preview
 netmonitor.properties:netmonitor.tab.security = netmonitor.dtd:netmonitorUI.tab.security
 netmonitor.properties:netmonitor.toolbar.filter.all = netmonitor.dtd:netmonitorUI.footer.filterAll
 netmonitor.properties:netmonitor.toolbar.filter.html = netmonitor.dtd:netmonitorUI.footer.filterHTML
 netmonitor.properties:netmonitor.toolbar.filter.css = netmonitor.dtd:netmonitorUI.footer.filterCSS
 netmonitor.properties:netmonitor.toolbar.filter.js = netmonitor.dtd:netmonitorUI.footer.filterJS
 netmonitor.properties:netmonitor.toolbar.filter.xhr = netmonitor.dtd:netmonitorUI.footer.filterXHR
 netmonitor.properties:netmonitor.toolbar.filter.fonts = netmonitor.dtd:netmonitorUI.footer.filterFonts
 netmonitor.properties:netmonitor.toolbar.filter.images = netmonitor.dtd:netmonitorUI.footer.filterImages