Bug 1273076 - Show more details in about:debugging#invalid-hash r?jdescottes draft
authorRicky Chien <ricky060709@gmail.com>
Tue, 17 May 2016 11:52:35 +0800
changeset 369028 6af84b18dfa7558bab93a744073c37c90ec23c78
parent 368365 c4449eab07d39e20ea315603f1b1863eeed7dcfe
child 521430 394ab710f3dbcc87f963a248449486ae80bc572b
push id18703
push userbmo:rchien@mozilla.com
push dateFri, 20 May 2016 03:13:29 +0000
reviewersjdescottes
bugs1273076
milestone49.0a1
Bug 1273076 - Show more details in about:debugging#invalid-hash r?jdescottes MozReview-Commit-ID: EbQvxXBixRe
devtools/client/aboutdebugging/aboutdebugging.css
devtools/client/aboutdebugging/components/aboutdebugging.js
devtools/client/locales/en-US/aboutdebugging.properties
--- a/devtools/client/aboutdebugging/aboutdebugging.css
+++ b/devtools/client/aboutdebugging/aboutdebugging.css
@@ -131,15 +131,20 @@ button {
   flex: 1;
 }
 
 .addons-debugging-label {
   display: inline-block;
   margin: 0 5px 5px 0;
 }
 
-.page-not-found {
+.error-page {
   display: flex;
   justify-content: center;
   align-items: center;
+  flex-direction: column;
   width: 100%;
   height: 100%;
 }
+
+.error-page .error-page-details {
+  color: gray;
+}
--- a/devtools/client/aboutdebugging/components/aboutdebugging.js
+++ b/devtools/client/aboutdebugging/components/aboutdebugging.js
@@ -81,20 +81,22 @@ module.exports = createClass({
     let selectPanel = this.selectPanel;
     let selectedPanel = panels.find(p => p.id == selectedPanelId);
     let panel;
 
     if (selectedPanel) {
       panel = selectedPanel.component({ client, id: selectedPanel.id });
     } else {
       panel = (
-        dom.div({ className: "page-not-found" },
+        dom.div({ className: "error-page" },
           dom.h1({ className: "header-name" },
             Strings.GetStringFromName("pageNotFound")
-          )
+          ),
+          dom.h4({ className: "error-page-details" },
+            Strings.formatStringFromName("doesNotExist", [selectedPanelId], 1))
         )
       );
     }
 
     return dom.div({ className: "app" },
       PanelMenu({ panels, selectedPanelId, selectPanel }),
       dom.div({ className: "main-content" }, panel)
     );
--- a/devtools/client/locales/en-US/aboutdebugging.properties
+++ b/devtools/client/locales/en-US/aboutdebugging.properties
@@ -21,10 +21,11 @@ reload = Reload
 workers = Workers
 serviceWorkers = Service Workers
 sharedWorkers = Shared Workers
 otherWorkers = Other Workers
 
 tabs = Tabs
 
 pageNotFound = Page not found
+doesNotExist = #%S does not exist!
 
 nothing = Nothing yet.