Bug 26182 - Need to be able to resize the columns in LocalStorage view in Web Inspector
Summary: Need to be able to resize the columns in LocalStorage view in Web Inspector
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: Jessie Berlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 21:55 PDT by Brady Eidson
Modified: 2009-09-11 18:13 PDT (History)
2 users (show)

See Also:


Attachments
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable (10.75 KB, patch)
2009-08-06 15:08 PDT, Jessie Berlin
timothy: review-
Details | Formatted Diff | Diff
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable which respects the Web Inspector being resized. (15.19 KB, patch)
2009-08-06 20:11 PDT, Jessie Berlin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2009-06-03 21:55:02 PDT
When you have some really long values in LocalStorage, the value column is too wide and cuts off the view of moderate length keys.

You should be able to resize the columns to reveal all of one at the expense of the other.
Comment 1 Jessie Berlin 2009-08-06 15:08:25 PDT
Created attachment 34231 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable

This patch makes the columns of the Local Storage View and the Profile View resizable.
Comment 2 Timothy Hatcher 2009-08-06 15:22:16 PDT
Comment on attachment 34231 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable

You will want to call updateWidths when the window resizes and when the sidebar resizes. Both of those cases will adjust the datagrid widths.

Take a look at ResourcesPanel's _updateSidebarWidth. At the end of that method it does:

        var visibleView = this.visibleView;
        if (visibleView && "resize" in visibleView)
            visibleView.resize();

You should add this to ResourcesPanel and ProfilesPanel. Then you can implement a resize method in ProfileView and DOMStorageItemsView to call updateWidths.

There is also a resize method on the Panel that is called when the window resizes. You should do what ResourcesPanel does in the other two panels (sans the _updateGraphDividersIfNeeded).

    resize: function()
    {
        this._updateGraphDividersIfNeeded();

        var visibleView = this.visibleView;
        if (visibleView && "resize" in visibleView)
            visibleView.resize();
    },

Otherwise the patch is correct.
Comment 3 Jessie Berlin 2009-08-06 20:11:46 PDT
Created attachment 34242 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable which respects the Web Inspector being resized.

Made the changes that Tim mentioned above, which also required that the columnn widths be set to percentages instead of pixel values. 

That in turn requires the column widths to be initialized the first time updateWidths is called. That way, when a column is resized and percentages are added for the widths of that column and its neighboring column, all the other columns already have percentages for widths.
Comment 4 Jessie Berlin 2009-08-07 08:03:50 PDT
Comment on attachment 34242 [details]
Patch that adds an initial implementation of making the columns of a DataGrid in the Web Inspector resizable which respects the Web Inspector being resized.

committed in r46891