Bug 1417805 - Higlight status code only; update styling draft
authorctlusto <ctlusto@gmail.com>
Sun, 26 Nov 2017 11:11:55 -0500
changeset 703518 c07178cfd4a53cc06da05af64cd19af1f82847b6
parent 703517 d64ca75255bcef8e69835298ed36e118522be5b1
child 741794 4d7fb21acb20a9d970afd41e1bdccac3ba384edc
push id90841
push userbmo:ctlusto@gmail.com
push dateSun, 26 Nov 2017 18:31:57 +0000
bugs1417805
milestone59.0a1
Bug 1417805 - Higlight status code only; update styling MozReview-Commit-ID: 39SPTaJttA2
devtools/client/themes/webconsole.css
devtools/client/webconsole/new-console-output/components/message-types/NetworkEventMessage.js
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -1001,18 +1001,23 @@ a.learn-more-link.webconsole-learn-more-
   font-style: inherit;
 }
 
 .webconsole-output-wrapper .message.network .status {
   color: var(--theme-highlight-blue);
   font-style: inherit;
 }
 
-.webconsole-output-wrapper .message.network .status .status-code:not([data-code^="3"]) {
-  color: white;
+.webconsole-output-wrapper .message.network .status .status-info .status-code {
+  padding: 0 2px;
+  border-radius: 3px;
+}
+
+.webconsole-output-wrapper .message.network .status .status-info .status-code:not([data-code^="3"]) {
+  color: var(--theme-body-background);
 }
 
 
 .network.message .network-info {
   display: none;
   margin-top: 8px;
   border: solid 1px var(--theme-splitter-color);
 }
--- a/devtools/client/webconsole/new-console-output/components/message-types/NetworkEventMessage.js
+++ b/devtools/client/webconsole/new-console-output/components/message-types/NetworkEventMessage.js
@@ -66,22 +66,23 @@ function NetworkEventMessage({
 
   const {
     httpVersion,
     status,
     statusText,
   } = response;
 
   const topLevelClasses = [ "cm-s-mozilla" ];
-  let statusInfo;
+  let statusCode, statusInfo;
 
   if (httpVersion && status && statusText !== undefined && totalTime !== undefined) {
+    statusCode = dom.span({className: "status-code", "data-code": status}, status);
     statusInfo = dom.span(
-      {className: "status-code", "data-code": status},
-      `[${httpVersion} ${status} ${statusText} ${totalTime}ms]`
+      {className: "status-info"},
+      `[${httpVersion} `, statusCode, ` ${statusText} ${totalTime}ms]`
     );
   }
 
   const toggle = () => {
     if (open) {
       dispatch(actions.messageClose(id));
     } else {
       dispatch(actions.messageOpen(id));