Changeset 288702 in webkit
- Timestamp:
- Jan 27, 2022 2:18:26 PM (6 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
Localizations/en.lproj/localizedStrings.js (modified) (2 diffs)
-
UserInterface/Views/ConsoleDrawer.js (modified) (1 diff)
-
UserInterface/Views/ConsoleTabContentView.js (modified) (1 diff)
-
UserInterface/Views/FindBanner.css (modified) (2 diffs)
-
UserInterface/Views/LogContentView.css (modified) (1 diff)
-
UserInterface/Views/LogContentView.js (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r288692 r288702 1 2022-01-27 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Console: move Preserve Log checkbox navigation item to a gear-with-contextmenu to save space (and match the Network Tab) 4 https://bugs.webkit.org/show_bug.cgi?id=235541 5 6 Reviewed by Patrick Angle. 7 8 Also collapse source scope bar into a single button for more space, and align it (and the 9 filter bar and type scope bar) to the left to better match other tabs. 10 11 * UserInterface/Views/LogContentView.js: 12 (WI.LogContentView): 13 (WI.LogContentView.prototype.get navigationItems): 14 (WI.LogContentView.prototype._updateOtherFiltersNavigationItemState): Added. 15 (WI.LogContentView.prototype._handleOtherFiltersNavigationItemContextMenu): Added. 16 (WI.LogContentView.prototype._handleClearLogOnNavigateSettingChanged): 17 (WI.LogContentView.prototype._showHiddenMessagesBannerIfNeeded): 18 Drive-by: Also reset the message source `WI.ScopeBar` when clearing filters. 19 20 * UserInterface/Views/LogContentView.css: 21 (.console-find-banner): Added. 22 (.message-channel-scope-bar.default-item-selected:not(:hover)): Added. 23 (.message-channel-scope-bar.default-item-selected:hover): Added. 24 (.log-scope-bar + .message-channel-scope-bar): Added. 25 (.console-other-filters-button > .glyph): Added. 26 (.console-other-filters-button:active > .glyph): Added. 27 (.console-other-filters-button.active > .glyph): Added. 28 (.console-other-filters-button.active:active > .glyph): Added. 29 30 * UserInterface/Views/ConsoleTabContentView.js: 31 (WI.ConsoleTabContentView): 32 Override the `flexibleNavigationItem` so that there's no expanding space before the filter. 33 34 * UserInterface/Views/ConsoleDrawer.js: 35 (WI.ConsoleDrawer): 36 Somehow this got overlooked when the constructor of `WI.ContentBrowser` was changed :( 37 38 * UserInterface/Views/FindBanner.css: 39 (.find-banner): 40 (.find-banner > input[type="search"]): 41 Add `--find-banner-input-margin-start` so that this can be overridden by specific clients. 42 43 * Localizations/en.lproj/localizedStrings.js: 44 1 45 2022-01-27 Elliott Williams <emw@apple.com> 2 46 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r288580 r288702 151 151 /* Property value for `font-variant-capitals: all-small-caps`. */ 152 152 localizedStrings["All Small Capitals @ Font Details Sidebar Property Value"] = "All Small Capitals"; 153 localizedStrings["All Sources"] = "All Sources"; 153 154 localizedStrings["All Storage"] = "All Storage"; 154 155 /* Break (pause) on all timeouts */ … … 508 509 localizedStrings["Dismiss @ Banner View"] = "Dismiss"; 509 510 localizedStrings["Displayed Columns"] = "Displayed Columns"; 510 localizedStrings["Do not clear the console on new page loads"] = "Do not clear the console on new page loads";511 511 localizedStrings["Do not fade unexecuted code"] = "Do not fade unexecuted code"; 512 512 localizedStrings["Dock to bottom of window"] = "Dock to bottom of window"; -
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js
r270134 r288702 29 29 { 30 30 const delegate = null; 31 const disableBackForward = true; 32 const disableFindBanner = false; 33 super(element, delegate, disableBackForward, disableFindBanner); 31 super(element, delegate, { 32 hideBackForwardButtons: true, 33 disableBackForwardNavigation: true, 34 disableFindBanner: true, 35 flexibleNavigationItem: new WI.NavigationItem, 36 }); 34 37 35 38 this.element.classList.add("console-drawer"); -
trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleTabContentView.js
r282610 r288702 28 28 constructor() 29 29 { 30 super(ConsoleTabContentView.tabInfo(), {hideBackForwardButtons: true, disableBackForwardNavigation: true}); 30 super(ConsoleTabContentView.tabInfo(), { 31 hideBackForwardButtons: true, 32 disableBackForwardNavigation: true, 33 flexibleNavigationItem: new WI.NavigationItem, 34 }); 31 35 32 36 this._wasShowingSplitConsole = false; -
trunk/Source/WebInspectorUI/UserInterface/Views/FindBanner.css
r269166 r288702 45 45 46 46 --find-banner-outer-child-margin: 8px; 47 --find-banner-input-margin-start: 6px; 47 48 } 48 49 … … 82 83 margin-top: 1px; 83 84 margin-bottom: 1px; 84 margin-inline: 6px-1px;85 margin-inline: var(--find-banner-input-margin-start) -1px; 85 86 vertical-align: top; 86 87 background-color: white; -
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.css
r269166 r288702 24 24 */ 25 25 26 .console-find-banner { 27 --find-banner-outer-child-margin: 0; 28 --find-banner-input-margin-start: 0; 29 } 30 31 .message-channel-scope-bar.default-item-selected:not(:hover) { 32 --scope-bar-text-color-override: var(--text-color); 33 --scope-bar-background-color-override: transparent; 34 --scope-bar-border-color-override: transparent; 35 } 36 37 .message-channel-scope-bar.default-item-selected:hover { 38 --scope-bar-background-opacity-override: 0.5; 39 } 40 41 .log-scope-bar + .message-channel-scope-bar { 42 padding-inline-start: 0; 43 } 44 45 .console-other-filters-button > .glyph { 46 width: 16px; 47 height: 16px; 48 color: var(--glyph-color); 49 opacity: var(--glyph-opacity); 50 } 51 52 .console-other-filters-button:active > .glyph { 53 color: var(--glyph-color-pressed); 54 } 55 56 .console-other-filters-button.active > .glyph { 57 color: var(--glyph-color-active); 58 } 59 60 .console-other-filters-button.active:active > .glyph { 61 color: var(--glyph-color-active-pressed); 62 } 63 26 64 .content-view.log { 27 65 display: flex; -
trunk/Source/WebInspectorUI/UserInterface/Views/LogContentView.js
r271373 r288702 71 71 this._selectedSearchMatchIsValid = false; 72 72 73 this._preserveLogNavigationItem = new WI.CheckboxNavigationItem("preserve-log", WI.UIString("Preserve Log"), !WI.settings.clearLogOnNavigate.value); 74 this._preserveLogNavigationItem.tooltip = WI.UIString("Do not clear the console on new page loads"); 75 this._preserveLogNavigationItem.addEventListener(WI.CheckboxNavigationItem.Event.CheckedDidChange, function(event) { 76 WI.settings.clearLogOnNavigate.value = !WI.settings.clearLogOnNavigate.value; 77 }, this); 78 WI.settings.clearLogOnNavigate.addEventListener(WI.Setting.Event.Changed, this._handleClearLogOnNavigateSettingChanged, this); 79 80 let checkboxesNavigationItems = [this._preserveLogNavigationItem]; 73 this._otherFiltersNavigationItem = new WI.NavigationItem("console-other-filters-button", "button"); 74 this._otherFiltersNavigationItem.tooltip = WI.UIString("Other filter options\u2026"); 75 this._otherFiltersNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High; 76 WI.addMouseDownContextMenuHandlers(this._otherFiltersNavigationItem.element, this._handleOtherFiltersNavigationItemContextMenu.bind(this)); 77 this._updateOtherFiltersNavigationItemState(); 78 this._otherFiltersNavigationItem.element.appendChild(WI.ImageUtilities.useSVGSymbol("Images/Filter.svg", "glyph")); 81 79 82 80 // COMPATIBILITY (iOS 13): `Runtime.evaluate` did not have a `emulateUserGesture` parameter yet. … … 88 86 }, this); 89 87 WI.settings.emulateInUserGesture.addEventListener(WI.Setting.Event.Changed, this._handleEmulateInUserGestureSettingChanged, this); 90 checkboxesNavigationItems.push(this._emulateUserGestureNavigationItem); 91 } 92 93 checkboxesNavigationItems.push(new WI.DividerNavigationItem); 94 this._checkboxesNavigationItemGroup = new WI.GroupNavigationItem(checkboxesNavigationItems); 88 89 this._emulateUserGestureNavigationItemGroup = new WI.GroupNavigationItem([this._emulateUserGestureNavigationItem, new WI.DividerNavigationItem]); 90 } 95 91 96 92 let scopeBarItems = [ … … 110 106 if (WI.ConsoleManager.supportsLogChannels()) { 111 107 let messageChannelBarItems = [ 112 new WI.ScopeBarItem(WI.LogContentView.Scopes.AllChannels, WI.UIString("All "), {exclusive: true}),108 new WI.ScopeBarItem(WI.LogContentView.Scopes.AllChannels, WI.UIString("All Sources")), 113 109 new WI.ScopeBarItem(WI.LogContentView.Scopes.Media, WI.UIString("Media"), {className: "media"}), 114 110 new WI.ScopeBarItem(WI.LogContentView.Scopes.MediaSource, WI.UIString("MediaSource"), {className: "mediasource"}), … … 116 112 ]; 117 113 118 this._messageSourceBar = new WI.ScopeBar("message-channel-scope-bar", messageChannelBarItems, messageChannelBarItems[0]); 114 const shouldGroupNonExclusiveItems = true; 115 this._messageSourceBar = new WI.ScopeBar("message-channel-scope-bar", messageChannelBarItems, messageChannelBarItems[0], shouldGroupNonExclusiveItems); 119 116 this._messageSourceBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._messageSourceBarSelectionDidChange, this); 120 117 } … … 139 136 140 137 WI.Frame.addEventListener(WI.Frame.Event.ProvisionalLoadStarted, this._provisionalLoadStarted, this); 138 139 WI.settings.clearLogOnNavigate.addEventListener(WI.Setting.Event.Changed, this._handleClearLogOnNavigateSettingChanged, this); 141 140 } 142 141 … … 147 146 let navigationItems = [ 148 147 this._findBanner, 149 this._checkboxesNavigationItemGroup,150 new WI.DividerNavigationItem,151 148 this._scopeBar, 152 new WI.DividerNavigationItem153 149 ]; 154 150 155 151 if (this._hasNonDefaultLogChannelMessage && this._messageSourceBar) 156 navigationItems.push(this._messageSourceBar, new WI.DividerNavigationItem); 152 navigationItems.push(new WI.DividerNavigationItem, this._messageSourceBar); 153 154 navigationItems.push(this._otherFiltersNavigationItem, new WI.FlexibleSpaceNavigationItem); 155 156 if (this._emulateUserGestureNavigationItemGroup) 157 navigationItems.push(this._emulateUserGestureNavigationItemGroup); 157 158 158 159 if (InspectorBackend.hasCommand("Heap.gc")) … … 907 908 } 908 909 910 _updateOtherFiltersNavigationItemState() 911 { 912 this._otherFiltersNavigationItem.element.classList.toggle("active", !WI.settings.clearLogOnNavigate.value); 913 } 914 915 _handleOtherFiltersNavigationItemContextMenu(contextMenu) 916 { 917 contextMenu.appendCheckboxItem(WI.UIString("Preserve Log"), () => { 918 WI.settings.clearLogOnNavigate.value = !WI.settings.clearLogOnNavigate.value; 919 }, !WI.settings.clearLogOnNavigate.value); 920 } 921 909 922 _handleClearLogOnNavigateSettingChanged() 910 923 { 911 this._ preserveLogNavigationItem.checked = !WI.settings.clearLogOnNavigate.value;924 this._updateOtherFiltersNavigationItemState(); 912 925 } 913 926 … … 1246 1259 this._findBanner.clearAndBlur(); 1247 1260 this._scopeBar.resetToDefault(); 1261 this._messageSourceBar?.resetToDefault(); 1248 1262 console.assert(!this._immediatelyHiddenMessages.size); 1249 1263
Note: See TracChangeset
for help on using the changeset viewer.