Bug 203719 - Web Inspector: Sources: tab isn't visible after removal of Debugger Tab and Resources Tab
Summary: Web Inspector: Sources: tab isn't visible after removal of Debugger Tab and R...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on: 202341
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-31 20:51 PDT by Devin Rousso
Modified: 2020-01-06 12:55 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.37 KB, patch)
2019-10-31 20:52 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-10-31 20:51:00 PDT
If you'd never previously opened the Sources Tab, but had already used Web Inspector, it won't appear after the Resources/Debugger Tabs were removed.
Comment 1 Devin Rousso 2019-10-31 20:51:19 PDT
<rdar://problem/56802389>
Comment 2 Devin Rousso 2019-10-31 20:52:48 PDT
Created attachment 382545 [details]
Patch
Comment 3 WebKit Commit Bot 2019-11-01 09:19:21 PDT
Comment on attachment 382545 [details]
Patch

Clearing flags on attachment: 382545

Committed r251922: <https://trac.webkit.org/changeset/251922>
Comment 4 WebKit Commit Bot 2019-11-01 09:19:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Brian Burg 2019-11-01 11:41:57 PDT
Comment on attachment 382545 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=382545&action=review

r=me

> Source/WebInspectorUI/UserInterface/Base/Main.js:154
> +    // Replace the Debugger/Resources Tab with the Sources Tab.

Please extract this into a separate function. Maybe even a separate file like MigrationUtilities.js. When we decide this code is no longer worth the trouble (say, Catalina + 1, or based on telemetry showing its use has diminished) then we can easily remove it.

> Source/WebInspectorUI/UserInterface/Base/Main.js:155
> +    let debuggerIndex = WI._openTabsSetting.value.indexOf("debugger");

It seems weird we have a symbolic name for "debugger" or "resources" tab?
Comment 6 Devin Rousso 2019-11-01 13:54:25 PDT
Comment on attachment 382545 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=382545&action=review

>> Source/WebInspectorUI/UserInterface/Base/Main.js:154
>> +    // Replace the Debugger/Resources Tab with the Sources Tab.
> 
> Please extract this into a separate function. Maybe even a separate file like MigrationUtilities.js. When we decide this code is no longer worth the trouble (say, Catalina + 1, or based on telemetry showing its use has diminished) then we can easily remove it.

This already landed in r251922 😅

>> Source/WebInspectorUI/UserInterface/Base/Main.js:155
>> +    let debuggerIndex = WI._openTabsSetting.value.indexOf("debugger");
> 
> It seems weird we have a symbolic name for "debugger" or "resources" tab?

This was the value of `WI.DebuggerTabContentView.Type` and `WI.ResourcesTabContentView.Type`.  It's the identifier we used for saving/restoring.