Title: [242395] trunk/Source/WebInspectorUI
Revision
242395
Author
drou...@apple.com
Date
2019-03-04 14:57:12 -0800 (Mon, 04 Mar 2019)

Log Message

Web Inspector: Audit: show the version number in the UI
https://bugs.webkit.org/show_bug.cgi?id=195292

Reviewed by Matt Baker.

* UserInterface/Views/AuditNavigationSidebarPanel.js:
(WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
(WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
Fix the logic for showing a placeholder when editing or with only disabled tests.

* UserInterface/Views/AuditNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.audit > .content > .message-text-view): Added.
(.audit-version): Added.
Don't obstruct the "Edit" button when showing a placeholder.

* Localizations/en.lproj/localizedStrings.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (242394 => 242395)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-03-04 22:36:14 UTC (rev 242394)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-03-04 22:57:12 UTC (rev 242395)
@@ -1,3 +1,22 @@
+2019-03-04  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: Audit: show the version number in the UI
+        https://bugs.webkit.org/show_bug.cgi?id=195292
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/AuditNavigationSidebarPanel.js:
+        (WI.AuditNavigationSidebarPanel.prototype.showDefaultContentView):
+        (WI.AuditNavigationSidebarPanel.prototype._updateNoAuditsPlaceholder):
+        Fix the logic for showing a placeholder when editing or with only disabled tests.
+
+        * UserInterface/Views/AuditNavigationSidebarPanel.css:
+        (.sidebar > .panel.navigation.audit > .content > .message-text-view): Added.
+        (.audit-version): Added.
+        Don't obstruct the "Edit" button when showing a placeholder.
+
+        * Localizations/en.lproj/localizedStrings.js:
+
 2019-03-04  Joseph Pecoraro  <pecor...@apple.com>
 
         ITMLKit Inspector: Data Bindings / Associated Data for nodes

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (242394 => 242395)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-03-04 22:36:14 UTC (rev 242394)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2019-03-04 22:57:12 UTC (rev 242395)
@@ -137,6 +137,7 @@
 localizedStrings["Audit"] = "Audit";
 localizedStrings["Audit Error: %s"] = "Audit Error: %s";
 localizedStrings["Audit Warning: %s"] = "Audit Warning: %s";
+localizedStrings["Audit version: %s"] = "Audit version: %s";
 localizedStrings["Audits"] = "Audits";
 localizedStrings["Author Stylesheet"] = "Author Stylesheet";
 localizedStrings["Auto Increment"] = "Auto Increment";

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.css (242394 => 242395)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.css	2019-03-04 22:36:14 UTC (rev 242394)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.css	2019-03-04 22:57:12 UTC (rev 242395)
@@ -49,6 +49,10 @@
     color: var(--glyph-color-disabled);
 }
 
+.sidebar > .panel.navigation.audit > .content > .message-text-view {
+    bottom: var(--navigation-bar-height);
+}
+
 .sidebar > .panel.navigation.audit.has-results:not(.has-tests) > .content > .message-text-view {
     position: initial;
     border-bottom: 1px solid var(--border-color);
@@ -66,3 +70,15 @@
     padding: 0;
     vertical-align: 0.5px;
 }
+
+.audit-version {
+    position: absolute;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: calc(var(--z-index-popover) + 1);
+    padding: 8px;
+    font-size: 13px;
+    text-align: center;
+    color: var(--text-color-secondary);
+}

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js (242394 => 242395)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js	2019-03-04 22:36:14 UTC (rev 242394)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditNavigationSidebarPanel.js	2019-03-04 22:57:12 UTC (rev 242395)
@@ -60,6 +60,14 @@
             contentPlaceholder.appendChild(importHelpElement);
         }
 
+        let versionContainer = contentView.element.appendChild(document.createElement("div"));
+        versionContainer.classList.add("audit-version");
+
+        let version = WI.AuditTestBase.Version;
+        if (InspectorBackend.domains.Audit)
+            version = Math.min(version, InspectorBackend.domains.Audit.VERSION);
+        versionContainer.textContent = WI.UIString("Audit version: %s").format(version);
+
         this.contentBrowser.showContentView(contentView);
     }
 
@@ -208,7 +216,7 @@
 
     _updateNoAuditsPlaceholder()
     {
-        if (WI.auditManager.tests.length)
+        if (WI.auditManager.editing || WI.auditManager.tests.some((test) => !test.disabled))
             return;
 
         let contentPlaceholder = WI.createMessageTextView(WI.UIString("No Audits"));
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to