RESOLVED FIXED 103944
Web Inspector: Persist Audit selections across sessions
https://bugs.webkit.org/show_bug.cgi?id=103944
Summary Web Inspector: Persist Audit selections across sessions
Alice Boxhall
Reported 2012-12-03 16:15:38 PST
In the Audits UI, remember which audits the user has selected in future sessions.
Attachments
Patch (6.31 KB, patch)
2012-12-17 04:00 PST, Andrey Kosyakov
no flags
Patch (7.14 KB, patch)
2012-12-17 05:42 PST, Andrey Kosyakov
apavlov: review+
Andrey Kosyakov
Comment 1 2012-12-17 04:00:05 PST
Alexander Pavlov (apavlov)
Comment 2 2012-12-17 05:13:40 PST
Comment on attachment 179712 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=179712&action=review > Source/WebCore/inspector/front-end/AuditLauncherView.js:69 > +WebInspector.AuditLauncherView.AllCategoriesKey = "__AllCategories"; This can be a computed setting (will slightly break when more categories from new extensions are added, though) > Source/WebCore/inspector/front-end/AuditLauncherView.js:268 > + _selectedCategoriesUpdated: function() Could you clean up the persisted list of categories to remove junk (e.g. leftover categories from disabled/removed extensions) here?
Andrey Kosyakov
Comment 3 2012-12-17 05:42:54 PST
Andrey Kosyakov
Comment 4 2012-12-17 05:44:42 PST
(In reply to comment #2) > (From update of attachment 179712 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=179712&action=review > > > Source/WebCore/inspector/front-end/AuditLauncherView.js:69 > > +WebInspector.AuditLauncherView.AllCategoriesKey = "__AllCategories"; > > This can be a computed setting (will slightly break when more categories from new extensions are added, though) Yep -- keeping all categories explicitly in the state we display to the user simplifies things a lot, given that categories come and go dynamically. > > Source/WebCore/inspector/front-end/AuditLauncherView.js:268 > > + _selectedCategoriesUpdated: function() > > Could you clean up the persisted list of categories to remove junk (e.g. leftover categories from disabled/removed extensions) here? Fixed -- now remove categories that are not present each time we update state due to a user action.
Alexander Pavlov (apavlov)
Comment 5 2012-12-17 05:59:14 PST
Comment on attachment 179723 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=179723&action=review Looks good audits-wise. I'd like to hear an authoritative opinion on whether this kind of setting initialization is valid. > Source/WebCore/inspector/front-end/AuditLauncherView.js:66 > + this._selectedCategoriesSetting = WebInspector.settings.createSetting("selectedAuditCategories", defaultSelectedAuditCategory); I'm not sure if this is the right way to initialize a setting (outside Settings.js) - need advice from someone who knows the settings handling well enough.
Alexander Pavlov (apavlov)
Comment 6 2012-12-17 06:03:51 PST
Comment on attachment 179723 [details] Patch r=me per the offline discussion
Andrey Kosyakov
Comment 7 2012-12-17 06:15:49 PST
Note You need to log in before you can comment on or make changes to this bug.