Bug 180110 - Web Inspector: Network Tab - Add a toggle in the network tab to control automatically clearing or preserving log across loads
Summary: Web Inspector: Network Tab - Add a toggle in the network tab to control autom...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-28 13:59 PST by Joseph Pecoraro
Modified: 2017-11-28 19:14 PST (History)
6 users (show)

See Also:


Attachments
[IMAGE] Preserve Log - Checkbox Navigation Item (69.09 KB, image/png)
2017-11-28 14:33 PST, Joseph Pecoraro
no flags Details
[PATCH] Proposed Fix (13.60 KB, patch)
2017-11-28 14:33 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-11-28 13:59:05 PST
Add a toggle in the network tab to control automatically clearing or preserving log across loads

We already have a checkbox in the Settings tab, but that is buried / hard to find. Include one in the Network tab.
Comment 1 Joseph Pecoraro 2017-11-28 13:59:11 PST
<rdar://problem/34071789>
Comment 2 Joseph Pecoraro 2017-11-28 14:33:19 PST
Created attachment 327789 [details]
[IMAGE] Preserve Log - Checkbox Navigation Item
Comment 3 Joseph Pecoraro 2017-11-28 14:33:29 PST
Created attachment 327790 [details]
[PATCH] Proposed Fix
Comment 4 Matt Baker 2017-11-28 15:00:28 PST
Comment on attachment 327790 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=327790&action=review

r=me, but the checkbox in the Settings tab should be removed.

> Source/WebInspectorUI/ChangeLog:44
> +        match existing generic places like TreeElement.

Nice.

> Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js:37
> +        this.tooltip = toolTipOrLabel;

Shouldn't this be `tooltipOrLabel`, to be consistent? I noticed that Wikipedia/the dictionary define it as a single word. In AppKit documentation it appears as one word, even though code samples use `toolTip` for some reason.

> Source/WebInspectorUI/UserInterface/Views/CheckboxNavigationItem.js:33
> +        this._checkboxElement.checked = checked;

Oops.

> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:102
> +        this._checkboxsNavigationItemGroup.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;

This makes me think we should add code to NavigationBar to automatically insert dividers between groups.
Comment 5 Joseph Pecoraro 2017-11-28 15:26:23 PST
Comment on attachment 327790 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=327790&action=review

>> Source/WebInspectorUI/UserInterface/Views/ButtonNavigationItem.js:37
>> +        this.tooltip = toolTipOrLabel;
> 
> Shouldn't this be `tooltipOrLabel`, to be consistent? I noticed that Wikipedia/the dictionary define it as a single word. In AppKit documentation it appears as one word, even though code samples use `toolTip` for some reason.

There are lot and lots of instances of "toolTip", I only changed the NavigationItem method ones. We can go through and change all the rest later.

>> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:102
>> +        this._checkboxsNavigationItemGroup.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
> 
> This makes me think we should add code to NavigationBar to automatically insert dividers between groups.

Yeah, I had thought about this. For now I'm fine with a little bit of manual work.

Since groups don't handle visibility priority / hiding individual members right now, we will likely need to handle a lot of situations without groups to in order to get the hiding / collapsing behavior we want.

The case I was thinking of was two adjacent checkboxes. If we had gone:

    Checkbox Checkbox Divider Button Divider Icon

Then I'd have wanted to have grouped this:

    Checkbox (Checkbox Divider) (Button Divider) Icon

This collapses gracefully as the bar gets smaller. Things hide left to right and the last item in a visual group hides its attached divider. In this case the two checkboxes are not grouped so individual items can be hidden.

For comparison:

    (Checkbox Checkbox Divider) (Button Divider) Icon
      => Hides too much too soon since right now the entire group hides at once

    (Checkbox Divider) (Checkbox Divider) (Button Divider) Icon
      => I don't think the divider between checkboxes is the ideal presentation
Comment 6 WebKit Commit Bot 2017-11-28 17:47:05 PST
Comment on attachment 327790 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 327790

Committed r225250: <https://trac.webkit.org/changeset/225250>
Comment 7 WebKit Commit Bot 2017-11-28 17:47:06 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Joseph Pecoraro 2017-11-28 19:14:47 PST
> r=me, but the checkbox in the Settings tab should be removed.

Oops, I didn't address this. I suppose we can remove it.