WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
152626
Web Inspector: Timelines view doesn't remember how I like to sort things
https://bugs.webkit.org/show_bug.cgi?id=152626
Summary
Web Inspector: Timelines view doesn't remember how I like to sort things
Saam Barati
Reported
2015-12-31 14:44:57 PST
I like to sort things by "Total Time". But, every time I open/close or just refresh the inspector, it defaults to sorting things by "Start Time". It would be nice if this preference was remembered.
Attachments
Patch
(19.91 KB, patch)
2015-12-31 21:25 PST
,
Devin Rousso
bburg
: review+
Details
Formatted Diff
Diff
Patch
(13.87 KB, patch)
2016-01-04 17:11 PST
,
Devin Rousso
joepeck
: review+
Details
Formatted Diff
Diff
Patch
(13.77 KB, patch)
2016-01-04 21:36 PST
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-12-31 14:45:11 PST
<
rdar://problem/24029666
>
Devin Rousso
Comment 2
2015-12-31 21:25:32 PST
Created
attachment 268068
[details]
Patch
Devin Rousso
Comment 3
2015-12-31 21:26:11 PST
Oh crap sorry @Matt I didn't notice that this was assigned to you. My bad.
Matt Baker
Comment 4
2015-12-31 22:30:50 PST
No problem.
Blaze Burg
Comment 5
2016-01-01 19:47:43 PST
Comment on
attachment 268068
[details]
Patch r=me In general I would prefer to give each data grid a well-known id, and let it handle the details of saving to a setting. However, there are no other uses for such an identifier (CSS id comes to mind), so this approach is fine for the time being.
Joseph Pecoraro
Comment 6
2016-01-04 13:46:31 PST
Comment on
attachment 268068
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268068&action=review
Some comments above. I don't think any immediate concerns though, but long term they should be addressed.
> Source/WebInspectorUI/UserInterface/Views/ConsoleMessageView.js:809 > - var dataGrid = WebInspector.DataGrid.createSortableDataGrid(columnNames, flatValues); > + let dataGrid = WebInspector.DataGrid.createSortableDataGrid(columnNames, flatValues, "console-message-view-sort");
This one may be a bit too general. Each `console.table` will have a new Setting with the same conflicting identifier, which would cause conflicts. Not to mention each console.table saving some value to persistent storage if the user changes the sort. Might be best to not include a setting here, or having it just be a Temporary / In Memory Only Setting. (Maybe a new WebInspector.Setting subclass).
> Source/WebInspectorUI/UserInterface/Views/DatabaseTableContentView.js:89 > - this._dataGrid = WebInspector.DataGrid.createSortableDataGrid(columnNames, values); > + this._dataGrid = WebInspector.DataGrid.createSortableDataGrid(columnNames, values, "database-table-content-view-sort");
Same here. Unless we wanted to make the identifier more specific, "database-table-content-view-sort-{table-name}". But still, this might be overkill.
Devin Rousso
Comment 7
2016-01-04 17:11:20 PST
Created
attachment 268251
[details]
Patch So I reverted some of the changes to make it so that the setting object is "optional", in that the DataGrid will still work without it.
Joseph Pecoraro
Comment 8
2016-01-04 18:35:50 PST
Comment on
attachment 268251
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268251&action=review
r=me!
> Source/WebInspectorUI/UserInterface/Views/DataGrid.js:238 > + if (this.sortColumnIdentifier) { > + let newSortHeaderCellElement = this._headerTableCellElements.get(this.sortColumnIdentifier);
Since the getter now does nothing these two lines can just access the instance variable directly (_sortColumnIdentifier).
Devin Rousso
Comment 9
2016-01-04 21:36:48 PST
Created
attachment 268267
[details]
Patch (In reply to
comment #8
)
> > Source/WebInspectorUI/UserInterface/Views/DataGrid.js:238 > > + if (this.sortColumnIdentifier) { > > + let newSortHeaderCellElement = this._headerTableCellElements.get(this.sortColumnIdentifier); > > Since the getter now does nothing these two lines can just access the > instance variable directly (_sortColumnIdentifier).
Oops. Fixed it.
WebKit Commit Bot
Comment 10
2016-01-04 22:36:00 PST
Comment on
attachment 268267
[details]
Patch Clearing flags on attachment: 268267 Committed
r194574
: <
http://trac.webkit.org/changeset/194574
>
WebKit Commit Bot
Comment 11
2016-01-04 22:36:03 PST
All reviewed patches have been landed. Closing bug.
Timothy Hatcher
Comment 12
2016-01-06 10:33:06 PST
Comment on
attachment 268267
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268267&action=review
> Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js:166 > this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending;
You remember the column, but not the sort order. It would be good to remember both.
Devin Rousso
Comment 13
2016-01-06 15:00:17 PST
Comment on
attachment 268267
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=268267&action=review
>> Source/WebInspectorUI/UserInterface/Views/ApplicationCacheFrameContentView.js:166 >> this._dataGrid.sortOrder = WebInspector.DataGrid.SortOrder.Ascending; > > You remember the column, but not the sort order. It would be good to remember both.
Just made another bug for this:
https://bugs.webkit.org/show_bug.cgi?id=152811
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug