Bug 154924 - Web Inspector: hook up grid row filtering in the new Timelines UI
Summary: Web Inspector: hook up grid row filtering in the new Timelines UI
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: 153036
Blocks: 156960
  Show dependency treegraph
 
Reported: 2016-03-02 10:59 PST by Matt Baker
Modified: 2016-04-25 17:59 PDT (History)
8 users (show)

See Also:


Attachments
[Patch] Proposed Fix (51.47 KB, patch)
2016-04-21 16:57 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] Proposed Fix (59.72 KB, patch)
2016-04-22 18:27 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Video] empty rows after filter (661.62 KB, video/mp4)
2016-04-23 13:03 PDT, Matt Baker
no flags Details
[Patch] Proposed Fix (60.62 KB, patch)
2016-04-23 14:25 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] Proposed Fix (60.87 KB, patch)
2016-04-24 20:01 PDT, Matt Baker
no flags Details | Formatted Diff | Diff
[Patch] Proposed Fix (59.19 KB, patch)
2016-04-25 17:00 PDT, 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 2016-03-02 10:59:17 PST
* SUMMARY
Hook up grid row filtering in the new Timelines UI. Previously filtering operated on the content tree outlines maintained by the navigation sidebar panel, which has been removed. Filtering now needs to be performed on grid data.

* NOTES
This provides an opportunity to improve filtering in timeline views. Where previously only data associated with a record's tree element (usually titles/subtitles) could be queried, we can now use the cell data for the entire grid row.
Comment 1 Radar WebKit Bug Importer 2016-03-02 10:59:52 PST
<rdar://problem/24934607>
Comment 2 Matt Baker 2016-04-21 16:57:50 PDT
Created attachment 276983 [details]
[Patch] Proposed Fix
Comment 3 Timothy Hatcher 2016-04-21 17:15:46 PDT
Comment on attachment 276983 [details]
[Patch] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Views/DataGrid.js:1690
> +    NodeWasFiltered: "timelinedatagrid-node-was-filtered"

Drop timeline from the string.

> Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js:722
> +        let filters = this._filterBarNavigationItem.filterBar.filters;
> +        this.currentTimelineView.updateFilter(filters);

Nit: Could be one line.

> Source/WebInspectorUI/UserInterface/Views/TimelineView.js:165
> +        });
> +        this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.NodeWasFiltered, (event) => {

Nit: Add newline.

> Source/WebInspectorUI/UserInterface/Views/TimelineView.js:172
> +        });
> +        this._timelineDataGrid.addEventListener(WebInspector.DataGrid.Event.FilterDidChange, (event) => {

Nit: Add newline.

> Source/WebInspectorUI/UserInterface/Views/TimelineView.js:190
> +        if (filters)
> +            this._dataGrid.filterText = filters.text;
> +        else
> +            this._dataGrid.filterDidChange();

I suspect you would want to do: this._dataGrid.filterText = filters ? filters.text : ""; Otherwise the filterText would not clear on DataGird.
Comment 4 Matt Baker 2016-04-21 18:35:47 PDT
Comment on attachment 276983 [details]
[Patch] Proposed Fix

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

> Source/WebInspectorUI/UserInterface/Views/DataGrid.js:352
> +        let filterableData = node.displayName();

This is specific to TimelineDataGridNode. I'll make generic in the next revision, will require additional review.
Comment 5 Matt Baker 2016-04-21 18:44:53 PDT
I just noticed that this patch also breaks filtering in the Network tab.
Comment 6 Timothy Hatcher 2016-04-22 09:19:47 PDT
(In reply to comment #5)
> I just noticed that this patch also breaks filtering in the Network tab.

Can you make the Network tab use the Data grid filtering?
Comment 7 Matt Baker 2016-04-22 12:47:19 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > I just noticed that this patch also breaks filtering in the Network tab.
> 
> Can you make the Network tab use the Data grid filtering?

I'll look into it. The data in the tree outline should still be filterable, as long as the resource URL is in the array returned by ResourceDataGridNode's override of DataGridNode's filterableData getter.
Comment 8 Matt Baker 2016-04-22 18:27:59 PDT
Created attachment 277125 [details]
[Patch] Proposed Fix
Comment 9 Timothy Hatcher 2016-04-23 11:21:29 PDT
Comment on attachment 277125 [details]
[Patch] Proposed Fix

Do we need to make a change to DataGrid _updateVisibleRows to skip hidden rows? I think we will miscalculate what is visible and have empty space at the bottom of the DataGrid if enough rows get filtered out.
Comment 10 Matt Baker 2016-04-23 12:43:48 PDT
(In reply to comment #9)
> Comment on attachment 277125 [details]
> [Patch] Proposed Fix
> 
> Do we need to make a change to DataGrid _updateVisibleRows to skip hidden
> rows? I think we will miscalculate what is visible and have empty space at
> the bottom of the DataGrid if enough rows get filtered out.

Just reproduced the issue you described. I'll see if changing _updateVisibleRows fixes it.
Comment 11 Matt Baker 2016-04-23 13:03:09 PDT
Created attachment 277162 [details]
[Video] empty rows after filter
Comment 12 Matt Baker 2016-04-23 14:25:24 PDT
Created attachment 277164 [details]
[Patch] Proposed Fix
Comment 13 WebKit Commit Bot 2016-04-24 18:12:19 PDT
Comment on attachment 277164 [details]
[Patch] Proposed Fix

Rejecting attachment 277164 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 277164, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
fs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 199969 = 0db2b28692b6291d8ee66fdbd5a0b09e99d43a44
r199970 = 1a7ecbe733367e42404d6d5eeb41524157119711
r199971 = 246fe5bb32ca14ae29c17ab6d9b1a5b8bc7290b6
r199972 = edb3a07efc64e938eda12dc4186faa0c69ea1602
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.webkit.org/results/1215103
Comment 14 Matt Baker 2016-04-24 20:01:02 PDT
Created attachment 277214 [details]
[Patch] Proposed Fix

Fixed merge issue
Comment 15 WebKit Commit Bot 2016-04-24 20:49:50 PDT
Comment on attachment 277214 [details]
[Patch] Proposed Fix

Rejecting attachment 277214 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 277214, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
/git.webkit.org/WebKit
   162ed14..700a0a6  master     -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 199973 = 162ed14131662ee9058c79f2fc8fd28db05464d8
r199974 = 700a0a6780b1e02e634a5597319e27e1eb061998
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.webkit.org/results/1215646
Comment 16 Matt Baker 2016-04-25 17:00:28 PDT
Created attachment 277295 [details]
[Patch] Proposed Fix
Comment 17 WebKit Commit Bot 2016-04-25 17:59:52 PDT
Comment on attachment 277295 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 277295

Committed r200067: <http://trac.webkit.org/changeset/200067>
Comment 18 WebKit Commit Bot 2016-04-25 17:59:57 PDT
All reviewed patches have been landed.  Closing bug.