RESOLVED FIXED 19208
Inspector should remember resources sorting set by the user
https://bugs.webkit.org/show_bug.cgi?id=19208
Summary Inspector should remember resources sorting set by the user
Anthony Ricaud
Reported 2008-05-23 02:59:46 PDT
It's a user preference, it should be remembered over instances.
Attachments
[PATCH] Suggested solution (9.99 KB, patch)
2010-07-22 11:08 PDT, Alexander Pavlov (apavlov)
no flags
[PATCH] Comments addressed (9.96 KB, patch)
2010-07-23 03:11 PDT, Alexander Pavlov (apavlov)
no flags
[PATCH] ChangeLog message augmented (10.15 KB, patch)
2010-07-23 03:39 PDT, Alexander Pavlov (apavlov)
joepeck: review+
Alexander Pavlov (apavlov)
Comment 1 2010-07-22 11:08:04 PDT
Created attachment 62317 [details] [PATCH] Suggested solution
Joseph Pecoraro
Comment 2 2010-07-22 11:34:45 PDT
Comment on attachment 62317 [details] [PATCH] Suggested solution Looks good to me. The only thing I have to add is it would be nice to add a comment or a line in the ChangeLog saying that you store both the sorting options for the Resources Panel in a single setting, and its benefit (for Remote debugging its just 1 message to get both settings). Also, I would argue it might be easier or more future proof to store settings as JSON strings, instead of strings that need need to be manually parsed. This case is rather simple, but I think for just a few more bytes its much more self descriptive and easier to understand. Consider writing another patch if you agree. Have you thought about saving other similar settings? Maybe bugs should be opened up for the following as well, if they aren't already saved: - Profiles "Bottom up" / "Top Down". - Console filters - Resource filters
Alexander Pavlov (apavlov)
Comment 3 2010-07-23 03:11:44 PDT
Created attachment 62402 [details] [PATCH] Comments addressed
Alexander Pavlov (apavlov)
Comment 4 2010-07-23 03:39:31 PDT
Created attachment 62406 [details] [PATCH] ChangeLog message augmented
Alexander Pavlov (apavlov)
Comment 5 2010-07-23 03:41:55 PDT
(In reply to comment #2) > (From update of attachment 62317 [details]) > Looks good to me. The only thing I have to add is it would be nice to > add a comment or a line in the ChangeLog saying that you store both > the sorting options for the Resources Panel in a single setting, and > its benefit (for Remote debugging its just 1 message to get both settings). Done. > Also, I would argue it might be easier or more future proof to store > settings as JSON strings, instead of strings that need need to be > manually parsed. This case is rather simple, but I think for just a few > more bytes its much more self descriptive and easier to understand. > Consider writing another patch if you agree. Discussed on #webkit-inspector - we agreed on sticking to a JS object with 2 properties. > Have you thought about saving other similar settings? Maybe bugs should > be opened up for the following as well, if they aren't already saved: > > - Profiles "Bottom up" / "Top Down". > - Console filters > - Resource filters Guess I'll think of coming up with a universal solution for these cases at once.
Joseph Pecoraro
Comment 6 2010-07-23 09:44:10 PDT
Comment on attachment 62406 [details] [PATCH] ChangeLog message augmented Thanks! > + WebInspector.applicationSettings.resourcesSortOptions = {timeOption: this._selectedOptionNameForGraph(this.timeGraphItem), sizeOption: this._selectedOptionNameForGraph(this.sizeGraphItem)}; > + WebInspector.applicationSettings.installSetting("resourcesSortOptions", "resources-sort-options", {timeOption: "responseTime", sizeOption: "transferSize"}); I thought our style was to put spaces around the braces for JavaScript object literals. So instead of: {a:1, b:1} I think we normally go with: { a:1, b:1 } But I just did a search and found we do a lot of both, so I guess it doesn't matter either way. But it would be good to settle on a style for literals.
Joseph Pecoraro
Comment 7 2010-07-23 09:44:35 PDT
> > Have you thought about saving other similar settings? Maybe bugs should > > be opened up for the following as well, if they aren't already saved: > > > > - Profiles "Bottom up" / "Top Down". > > - Console filters > > - Resource filters > > Guess I'll think of coming up with a universal solution for these cases at once. Could you file a Bugzilla bug for this?
Alexander Pavlov (apavlov)
Comment 8 2010-07-23 22:53:40 PDT
(In reply to comment #7) > > > Have you thought about saving other similar settings? Maybe bugs should > > > be opened up for the following as well, if they aren't already saved: > > > > > > - Profiles "Bottom up" / "Top Down". > > > - Console filters > > > - Resource filters > > > > Guess I'll think of coming up with a universal solution for these cases at once. > > Could you file a Bugzilla bug for this? Sure, just need to check with the folks which of these (and others) have been/are planned to be implemented when I'm back in the office.
Eric Seidel (no email)
Comment 9 2010-07-25 00:20:24 PDT
Comment on attachment 62317 [details] [PATCH] Suggested solution Cleared Joseph Pecoraro's review+ from obsolete attachment 62317 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Alexander Pavlov (apavlov)
Comment 10 2010-07-26 02:38:03 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ... M WebCore/ChangeLog M WebCore/inspector/front-end/ResourcesPanel.js M WebCore/inspector/front-end/Settings.js Committed r64037
Note You need to log in before you can comment on or make changes to this bug.