Web Inspector: Cleanup navigation bar dividers and separators
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Nov 2017 08:49:13 +0000 (08:49 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Nov 2017 08:49:13 +0000 (08:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179654
<rdar://problem/35523734>

Reviewed by Devin Rousso.

Update path separator icon, and reduce number of dividers used in the
content browser's navigation bar, to more closely match modern Xcode.

* UserInterface/Images/HierarchicalNavigationItemChevron.svg:
Update icon, remove tapered arrow head.

* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser):
Remove divider between back/forward buttons and item name.
(WI.ContentBrowser.prototype._updateContentViewNavigationItems):

* UserInterface/Views/HierarchicalPathComponent.css:
(.hierarchical-path-component > .separator):

* UserInterface/Views/LogContentView.js:
(WI.LogContentView.prototype.get navigationItems):
Remove dividers between buttons provided by the current content view.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224807 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Images/HierarchicalNavigationItemChevron.svg
Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js
Source/WebInspectorUI/UserInterface/Views/HierarchicalPathComponent.css
Source/WebInspectorUI/UserInterface/Views/LogContentView.js

index 160844f..3c19c02 100644 (file)
@@ -1,3 +1,29 @@
+2017-11-14  Matt Baker  <mattbaker@apple.com>
+
+        Web Inspector: Cleanup navigation bar dividers and separators
+        https://bugs.webkit.org/show_bug.cgi?id=179654
+        <rdar://problem/35523734>
+
+        Reviewed by Devin Rousso.
+
+        Update path separator icon, and reduce number of dividers used in the
+        content browser's navigation bar, to more closely match modern Xcode.
+
+        * UserInterface/Images/HierarchicalNavigationItemChevron.svg:
+        Update icon, remove tapered arrow head.
+
+        * UserInterface/Views/ContentBrowser.js:
+        (WI.ContentBrowser):
+        Remove divider between back/forward buttons and item name.
+        (WI.ContentBrowser.prototype._updateContentViewNavigationItems):
+
+        * UserInterface/Views/HierarchicalPathComponent.css:
+        (.hierarchical-path-component > .separator):
+
+        * UserInterface/Views/LogContentView.js:
+        (WI.LogContentView.prototype.get navigationItems):
+        Remove dividers between buttons provided by the current content view.
+
 2017-11-13  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Network Details Views - make section headers more prominent
index 81180a8..5e5ee24 100644 (file)
@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright © 2013 Apple Inc. All rights reserved. -->
+<!-- Copyright © 2017 Apple Inc. All rights reserved. -->
 <svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 7 16">
-    <path fill="white" d="M 0 0 L 7 8 L 0 16 L 6 8 Z"/>
-    <path fill="rgb(108, 108, 108)" d="M 0 0 L 6 8 L 0 16 L 5 8 Z"/>
+    <polygon fill="rgb(108, 108, 108)" points="1.016 1 4.832 8 1.016 15 2.199 15 6.016 8 2.199 1 1.016 1"/>
 </svg>
index ee4a56b..5c223bb 100644 (file)
@@ -64,8 +64,6 @@ WI.ContentBrowser = class ContentBrowser extends WI.View
 
             let navigationButtonsGroup = new WI.GroupNavigationItem([this._backNavigationItem, this._forwardNavigationItem]);
             this._navigationBar.addNavigationItem(navigationButtonsGroup);
-
-            this._navigationBar.addNavigationItem(new WI.DividerNavigationItem);
         }
 
         if (!disableFindBanner) {
@@ -426,13 +424,6 @@ WI.ContentBrowser = class ContentBrowser extends WI.View
 
         // Go through each of the items of the new content view and add a divider before them.
         currentContentView.navigationItems.forEach(function(navigationItem, index) {
-            // Add dividers before items unless it's the first item and not a button.
-            if (index !== 0 || navigationItem instanceof WI.ButtonNavigationItem) {
-                let divider = new WI.DividerNavigationItem;
-                if (shouldInsert)
-                    navigationBar.insertNavigationItem(divider, insertionIndex++);
-                newNavigationItems.push(divider);
-            }
             if (shouldInsert)
                 navigationBar.insertNavigationItem(navigationItem, insertionIndex++);
             newNavigationItems.push(navigationItem);
index 575d733..ad2e3fc 100644 (file)
@@ -145,7 +145,7 @@ body[dir=rtl] .hierarchical-path-component > select {
     width: 7px;
     height: 20px;
 
-    --path-component-separator-margin-start: 2px;
+    --path-component-separator-margin-start: 3px;
 }
 
 body[dir=ltr] .hierarchical-path-component > .separator {
index 2b45e62..da2603c 100644 (file)
@@ -116,7 +116,7 @@ WI.LogContentView = class LogContentView extends WI.ContentView
 
     get navigationItems()
     {
-        let navigationItems = [this._scopeBar];
+        let navigationItems = [this._scopeBar, new WI.DividerNavigationItem];
 
         if (this._hasNonDefaultLogChannelMessage && this._messageSourceBar)
             navigationItems.push(this._messageSourceBar);
@@ -125,10 +125,10 @@ WI.LogContentView = class LogContentView extends WI.ContentView
             navigationItems.push(this._garbageCollectNavigationItem);
 
         navigationItems.push(this._clearLogNavigationItem);
-
-        if (WI.isShowingSplitConsole())
+        if (WI.isShowingSplitConsole()) {
+            navigationItems.push(new WI.DividerNavigationItem);
             navigationItems.push(this._showConsoleTabNavigationItem);
-        else if (WI.isShowingConsoleTab())
+        else if (WI.isShowingConsoleTab())
             navigationItems.unshift(this._findBanner);
         return navigationItems;
     }