Bug 151066 - Web Inspector: Global Breakpoints should always be visible
Summary: Web Inspector: Global Breakpoints should always be visible
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: Matt Baker
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-11-09 17:05 PST by Matt Baker
Modified: 2015-12-08 12:43 PST (History)
8 users (show)

See Also:


Attachments
[Patch] Proposed Fix (4.97 KB, patch)
2015-12-08 01:58 PST, Matt Baker
no flags Details | Formatted Diff | Diff
[Image] Elements with SuppressFilteringSymbol (62.74 KB, image/png)
2015-12-08 10:56 PST, Matt Baker
no flags Details
[Patch] Proposed Fix (5.09 KB, patch)
2015-12-08 10:59 PST, Matt Baker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Baker 2015-11-09 17:05:19 PST
* SUMMARY
Global Breakpoints should always be visible. There are only two global breakpoints, so there isn't much utility in making them filterable.

The current behavior is also inconsistent and confusing. Some examples:

1) Filter text "Global" results in an empty global breakpoints folder in trunk. In Safari 9.0 the child tree elements are also shown.
2) Filter text "All Exceptions" results in nothing.
3) Enabling "Show resources with issues" hides Global Breakpoints.
4) Enabling "Show resources with breakpoints" shows Global Breakpoints.
Comment 1 Radar WebKit Bug Importer 2015-11-09 17:06:31 PST
<rdar://problem/23474149>
Comment 2 Matt Baker 2015-12-08 01:58:17 PST
Created attachment 266862 [details]
[Patch] Proposed Fix
Comment 3 Timothy Hatcher 2015-12-08 10:12:14 PST
Comment on attachment 266862 [details]
[Patch] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:180
> +    suppressFiltering(treeElements)

This does not sound like a function that acts on tree elements. suppressFilteringOnTreeElements?

> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:183
> +        if (!Array.isArray(treeElements))
> +            treeElements = [treeElements];

I think Joe has wanted to get away from this pattern. Just assert.

> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:514
> +            if (!currentTreeElement.hidden && !currentTreeElement[WebInspector.NavigationSidebarPanel.SuppressFiltering]) {

It seems odd to check this here, since this code hides the empty placeholder, which would never be used if there is even a single tree element with the SuppressFiltering symbol. I think the hidden check is sufficient here.

> Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:733
> +WebInspector.NavigationSidebarPanel.SuppressFiltering = Symbol("supresss-filtering");

SuppressFilteringSymbol?
Comment 4 Matt Baker 2015-12-08 10:52:00 PST
(In reply to comment #3)
> Comment on attachment 266862 [details]
> [Patch] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=266862&action=review
> 
> > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:180
> > +    suppressFiltering(treeElements)
> 
> This does not sound like a function that acts on tree elements.
> suppressFilteringOnTreeElements?
> 
> > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:183
> > +        if (!Array.isArray(treeElements))
> > +            treeElements = [treeElements];
> 
> I think Joe has wanted to get away from this pattern. Just assert.

+1! I think we should assert more, and massage inputs less.

> > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:514
> > +            if (!currentTreeElement.hidden && !currentTreeElement[WebInspector.NavigationSidebarPanel.SuppressFiltering]) {
> 
> It seems odd to check this here, since this code hides the empty
> placeholder, which would never be used if there is even a single tree
> element with the SuppressFiltering symbol. I think the hidden check is
> sufficient here.

This ensures a visible element with the SuppressFilteringSymbol doesn't prevent the placeholder from being shown. In the case of DebuggerSidebarPanel, if all breakpoint elements are hidden by filters, the "No Filter Results" message should be displayed, even though global breakpoints are still visible.

> > Source/WebInspectorUI/UserInterface/Views/NavigationSidebarPanel.js:733
> > +WebInspector.NavigationSidebarPanel.SuppressFiltering = Symbol("supresss-filtering");
> 
> SuppressFilteringSymbol?
Comment 5 Matt Baker 2015-12-08 10:56:20 PST
Created attachment 266910 [details]
[Image] Elements with SuppressFilteringSymbol

Placeholder message appears when all filterable elements (those with SuppressFilteringSymbol equal to undefined or false) are hidden
Comment 6 Matt Baker 2015-12-08 10:59:38 PST
Created attachment 266911 [details]
[Patch] Proposed Fix
Comment 7 Timothy Hatcher 2015-12-08 11:59:13 PST
(In reply to comment #5)
> Created attachment 266910 [details]
> [Image] Elements with SuppressFilteringSymbol
> 
> Placeholder message appears when all filterable elements (those with
> SuppressFilteringSymbol equal to undefined or false) are hidden

Okay, makes sense. This will change once sections are added.
Comment 8 WebKit Commit Bot 2015-12-08 12:43:02 PST
Comment on attachment 266911 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 266911

Committed r193771: <http://trac.webkit.org/changeset/193771>
Comment 9 WebKit Commit Bot 2015-12-08 12:43:05 PST
All reviewed patches have been landed.  Closing bug.