Bug 183317

Summary: Web Inspector: Sources: Open all resources in Sources tab instead of Resources/Debugger
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 183420    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Nikita Vasilyev
Reported 2018-03-03 17:19:46 PST
When Sources tab is enabled, all resources that currently open in Resources or Debugger should open in Sources tab instead.
Attachments
Patch (8.25 KB, patch)
2018-03-09 15:23 PST, Nikita Vasilyev
no flags
Patch (8.20 KB, patch)
2018-03-09 15:27 PST, Nikita Vasilyev
no flags
Patch (7.00 KB, patch)
2018-03-09 16:16 PST, Nikita Vasilyev
no flags
Patch (6.90 KB, patch)
2018-03-09 16:45 PST, Nikita Vasilyev
no flags
Radar WebKit Bug Importer
Comment 1 2018-03-03 17:20:01 PST
Nikita Vasilyev
Comment 2 2018-03-03 17:23:19 PST
Some ways to open a resource: - Click on a source link - from a DOM outline - from the styles editor - from a console message - Quick open (Command-Shift-O) - Search - Timelines
Nikita Vasilyev
Comment 3 2018-03-09 15:23:30 PST
Nikita Vasilyev
Comment 4 2018-03-09 15:27:02 PST
Matt Baker
Comment 5 2018-03-09 16:02:33 PST
Comment on attachment 335476 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335476&action=review > Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:107 > + showResourceWithOptions({tabIdentifier: WI.SourcesTabContentView.Identifier}); I like this idea, but what do you think about renaming the parameter `tabType`? WI.SourcesTabContentView.Type already exists, and as far as I know a TabContentView's type and identifier are always the same. > Source/WebInspectorUI/UserInterface/Views/TabBrowser.js:130 > + return tabContentView; Since this code will fall back on recentTabContentViews if a matching tab isn't found, should we rename the option `preferredTabType`?
Nikita Vasilyev
Comment 6 2018-03-09 16:16:22 PST
Matt Baker
Comment 7 2018-03-09 16:19:15 PST
Comment on attachment 335485 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335485&action=review > Source/WebInspectorUI/UserInterface/Views/TabBrowser.js:125 > + for (let tabContentView of this._recentTabContentViews) { Sorry for not mentioning this sooner (our changes collided as I added it): Nit: Array.prototype.find with an inline arrow is more concise and less error-prone than the equivalent for-loop: let tabContentView = this._recentTabContentViews.find((tabContentView) => tabContentView.type === options.preferredTabType); if (tabContentView) return tabContentView;
Devin Rousso
Comment 8 2018-03-09 16:25:41 PST
Comment on attachment 335476 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335476&action=review > Source/WebInspectorUI/UserInterface/Base/Main.js:976 > +WI.showSourcesTab = function(options) This should be `options = {}` if we ever want to call `WI.showSourcesTab()` without arguments. >> Source/WebInspectorUI/UserInterface/Views/ContextMenuUtilities.js:107 >> + showResourceWithOptions({tabIdentifier: WI.SourcesTabContentView.Identifier}); > > I like this idea, but what do you think about renaming the parameter `tabType`? WI.SourcesTabContentView.Type already exists, and as far as I know a TabContentView's type and identifier are always the same. I think `type` makes more sense than `identifier`.
Nikita Vasilyev
Comment 9 2018-03-09 16:45:36 PST
Matt Baker
Comment 10 2018-03-09 16:59:29 PST
Comment on attachment 335488 [details] Patch r=me
WebKit Commit Bot
Comment 11 2018-03-09 17:24:28 PST
Comment on attachment 335488 [details] Patch Clearing flags on attachment: 335488 Committed r229495: <https://trac.webkit.org/changeset/229495>
WebKit Commit Bot
Comment 12 2018-03-09 17:24:30 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.