Bug 1512757 - Remove icons from file column. r=Honza
authorMrigank Krishan <mrigankkrishan@gmail.com>
Wed, 06 Mar 2019 12:30:10 +0000
changeset 520464 93eed744e86454560021bd566e6e79a7e4c64c70
parent 520463 61db2b186d69f0a894096bd7cab0777cc475a1bf
child 520465 c4cad6c7b62e76b54b71b8b9833dec54549e63c9
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1512757
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1512757 - Remove icons from file column. r=Honza Removed the icon class from file column. I kept the css classes in RequestList.css so that we can easily add icons later. Differential Revision: https://phabricator.services.mozilla.com/D21783
devtools/client/jar.mn
devtools/client/netmonitor/src/assets/icons/file-type-general.svg
devtools/client/netmonitor/src/assets/icons/file-type-image.svg
devtools/client/netmonitor/src/assets/styles/RequestList.css
devtools/client/netmonitor/src/components/RequestListColumnFile.js
--- a/devtools/client/jar.mn
+++ b/devtools/client/jar.mn
@@ -213,18 +213,16 @@ devtools.jar:
     skin/images/cubic-bezier-swatch.svg (themes/images/cubic-bezier-swatch.svg)
     skin/fonts.css (themes/fonts.css)
     skin/changes.css (themes/changes.css)
     skin/computed.css (themes/computed.css)
     skin/layout.css (themes/layout.css)
     skin/images/arrow-e.svg (themes/images/arrow-e.svg)
     skin/images/search-clear.svg (themes/images/search-clear.svg)
     skin/images/reload.svg (themes/images/reload.svg)
-    skin/images/file-type-general.svg (netmonitor/src/assets/icons/file-type-general.svg)
-    skin/images/file-type-image.svg (netmonitor/src/assets/icons/file-type-image.svg)
     skin/images/security-state-broken.svg (themes/images/security-state-broken.svg)
     skin/images/security-state-insecure.svg (themes/images/security-state-insecure.svg)
     skin/images/security-state-secure.svg (themes/images/security-state-secure.svg)
     skin/images/security-state-weak.svg (themes/images/security-state-weak.svg)
     skin/images/diff.svg (themes/images/diff.svg)
     skin/images/import.svg (themes/images/import.svg)
     skin/images/pane-collapse.svg (themes/images/pane-collapse.svg)
     skin/images/pane-expand.svg (themes/images/pane-expand.svg)
deleted file mode 100644
--- a/devtools/client/netmonitor/src/assets/icons/file-type-general.svg
+++ /dev/null
@@ -1,7 +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/. -->
-<svg width="16" height="16" fill="context-fill #0B0B0B" fill-rule="evenodd" xmlns="http://www.w3.org/2000/svg">
-  <path d="M3 14.001L2.996 14h9.008l-.004.002V6l.293.707-4-4L9 3H3.003L3 2.999V14zm-1 0V3C2 2.447 2.449 2 3.003 2H9l4 4v8.002a.996.996 0 0 1-.996.998H2.996A.996.996 0 0 1 2 14.001z"/>
-  <path d="M4.5 9H11V8H4v1h.5zM4.5 11H11v-1H4v1h.5zM4.5 13H11v-1H4v1h.5zM4.5 5H7V4H4v1h.5zM4.5 7H7V6H4v1h.5zM8 7h5V6H9V2H8v5z"/>
-</svg>
deleted file mode 100644
--- a/devtools/client/netmonitor/src/assets/icons/file-type-image.svg
+++ /dev/null
@@ -1,7 +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/. -->
-<svg width="16" height="16" fill="context-fill #0B0B0B" fill-rule="evenodd" xmlns="http://www.w3.org/2000/svg">
-  <path d="M3 14.001L2.996 14h9.008l-.004.002V6l.293.707-4-4L9 3H3.003L3 2.999V14zm-1 0V3C2 2.447 2.449 2 3.003 2H9l4 4v8.002a.996.996 0 0 1-.996.998H2.996A.996.996 0 0 1 2 14.001z"/>
-  <path d="M8 7h5V6H9V2H8v5z"/>
-</svg>
--- a/devtools/client/netmonitor/src/assets/styles/RequestList.css
+++ b/devtools/client/netmonitor/src/assets/styles/RequestList.css
@@ -237,38 +237,20 @@
 .requests-list-file {
   width: 40%;
 }
 
 .requests-list-file.requests-list-column {
   text-align: start;
 }
 
-.requests-file-type-icon {
-  display: inline-block;
-  width: 16px;
-  height: 16px;
-  margin: 0 4px;
-  vertical-align: text-bottom;
-  -moz-context-properties: fill;
-  fill: currentColor;
-}
-
-.request-list-item.selected .requests-file-type-icon {
+.request-list-item.selected {
   filter: brightness(1.3);
 }
 
-.file-type-general {
-  background-image: url(chrome://devtools/skin/images/file-type-general.svg);
-}
-
-.file-type-image {
-  background-image: url(chrome://devtools/skin/images/file-type-image.svg);
-}
-
 /* Protocol column */
 
 .requests-list-protocol {
   width: 8%;
 }
 
 /* Cookies column */
 
--- a/devtools/client/netmonitor/src/components/RequestListColumnFile.js
+++ b/devtools/client/netmonitor/src/components/RequestListColumnFile.js
@@ -2,19 +2,17 @@
  * 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 { Component } = require("devtools/client/shared/vendor/react");
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { propertiesEqual, getFileName } = require("../utils/request-utils");
-
-const { div } = dom;
+const { propertiesEqual } = require("../utils/request-utils");
 
 const UPDATED_FILE_PROPS = [
   "urlDetails",
 ];
 
 class RequestListColumnFile extends Component {
   static get propTypes() {
     return {
@@ -23,37 +21,23 @@ class RequestListColumnFile extends Comp
   }
 
   shouldComponentUpdate(nextProps) {
     return !propertiesEqual(UPDATED_FILE_PROPS, this.props.item, nextProps.item);
   }
 
   render() {
     const {
-      item: { urlDetails, cause },
+      item: { urlDetails },
     } = this.props;
-    const iconClassList = ["requests-file-type-icon"];
-
-    if (cause && (
-        cause.type.includes("img") ||
-        cause.type.includes("image") ||
-        cause.type.includes("beacon"))) {
-      iconClassList.push("file-type-image");
-    } else {
-      iconClassList.push("file-type-general");
-    }
 
     return (
       dom.td({
         className: "requests-list-column requests-list-file",
         title: urlDetails.unicodeUrl,
       },
-        div({
-          className: iconClassList.join(" "),
-          title: getFileName(urlDetails.baseNameWithQuery) || urlDetails.unicodeUrl,
-        }),
         urlDetails.baseNameWithQuery
       )
     );
   }
 }
 
 module.exports = RequestListColumnFile;