Bug 105739 - Web Inspector: [Resources] Make grid columns set configurable.
Summary: Web Inspector: [Resources] Make grid columns set configurable.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eugene Klyuchnikov
URL:
Keywords:
Depends on: 105795
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-25 03:48 PST by Eugene Klyuchnikov
Modified: 2013-01-11 09:10 PST (History)
9 users (show)

See Also:


Attachments
Patch (12.85 KB, patch)
2012-12-25 05:46 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (14.42 KB, patch)
2012-12-27 06:30 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff
Patch (14.92 KB, patch)
2013-01-11 01:08 PST, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Klyuchnikov 2012-12-25 03:48:49 PST
Use context menu on grid header to hide/show grid columns.
Comment 1 Eugene Klyuchnikov 2012-12-25 05:46:32 PST
Created attachment 180710 [details]
Patch
Comment 2 Pavel Feldman 2012-12-26 08:56:20 PST
Comment on attachment 180710 [details]
Patch

I applied that patch and noticed that you don't persist the visible column set. The header is also misaligned with the grid once you hide one of the columns.
Comment 3 Eugene Klyuchnikov 2012-12-27 01:36:03 PST
(In reply to comment #2)
> (From update of attachment 180710 [details])
> I applied that patch and noticed that you don't persist the visible column set. The header is also misaligned with the grid once you hide one of the columns.

I'll add persistence.

BUT misalignment is not caused by this patch, so it should be addressed separately.
Comment 4 Eugene Klyuchnikov 2012-12-27 06:30:26 PST
Created attachment 180797 [details]
Patch
Comment 5 Pavel Feldman 2013-01-10 22:10:56 PST
Comment on attachment 180797 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:158
> +        var hiddenColumns = WebInspector.settings.hiddenNetworkLogColumns.get();

This setting should be defined in the panel.

> Source/WebCore/inspector/front-end/NetworkPanel.js:161
> +            if (this._detailedViewColumnsSet[hiddenColumns[i]])

At some point, we will have more columns and only some of them will be visible by default. So I don't think you need this._detailedViewColumnsSet preset. It is jus that the setting should have such value by default.

> Source/WebCore/inspector/front-end/Settings.js:118
> +    this.hiddenNetworkLogColumns = this.createSetting("hiddenNetworkLogColumns", []);

Move to NetworkPanel.js and have a default value for it.

> Source/WebCore/inspector/front-end/networkLogView.css:561
> +#network-container .hide-method-column .method-column,

Now this stops being scaleable. Adding a column would require adding to this stupid rule... This (and other styles where we enumerate column names) could be addressed in another patch though.
Comment 6 Eugene Klyuchnikov 2013-01-11 01:07:13 PST
Comment on attachment 180797 [details]
Patch

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

>> Source/WebCore/inspector/front-end/NetworkPanel.js:158
>> +        var hiddenColumns = WebInspector.settings.hiddenNetworkLogColumns.get();
> 
> This setting should be defined in the panel.

Done

>> Source/WebCore/inspector/front-end/NetworkPanel.js:161
>> +            if (this._detailedViewColumnsSet[hiddenColumns[i]])
> 
> At some point, we will have more columns and only some of them will be visible by default. So I don't think you need this._detailedViewColumnsSet preset. It is jus that the setting should have such value by default.

We use this._detailedViewColumnsSet both to hold visibility and create menu items, because not all columns could be toggled, for example name and timeline are mandatory.

>> Source/WebCore/inspector/front-end/Settings.js:118
>> +    this.hiddenNetworkLogColumns = this.createSetting("hiddenNetworkLogColumns", []);
> 
> Move to NetworkPanel.js and have a default value for it.

Done.

>> Source/WebCore/inspector/front-end/networkLogView.css:561
>> +#network-container .hide-method-column .method-column,
> 
> Now this stops being scaleable. Adding a column would require adding to this stupid rule... This (and other styles where we enumerate column names) could be addressed in another patch though.

Totally agree. It was a hard choice between scaleability and least invasiveness, but I chose the last.
Fixed.
Comment 7 Eugene Klyuchnikov 2013-01-11 01:08:52 PST
Created attachment 182289 [details]
Patch
Comment 8 WebKit Review Bot 2013-01-11 09:10:47 PST
Comment on attachment 182289 [details]
Patch

Clearing flags on attachment: 182289

Committed r139452: <http://trac.webkit.org/changeset/139452>
Comment 9 WebKit Review Bot 2013-01-11 09:10:52 PST
All reviewed patches have been landed.  Closing bug.