RESOLVED FIXED 170418
Web Inspector: Reorder Debugger tab sidebar panels: Scope Chain, Resource, Probes
https://bugs.webkit.org/show_bug.cgi?id=170418
Summary Web Inspector: Reorder Debugger tab sidebar panels: Scope Chain, Resource, Pr...
Matt Baker
Reported 2017-04-03 13:51:49 PDT
Summary: Debugger tab should support only the Scope Chain sidebar panel. The Resource panel doesn't fit in with the Debugger tab workflow, and only distracts from the (very important) Scope Chain panel.
Attachments
Patch (1.81 KB, patch)
2017-04-03 14:06 PDT, Matt Baker
no flags
Patch (5.01 KB, patch)
2017-04-03 16:54 PDT, Matt Baker
no flags
Patch (6.53 KB, patch)
2017-04-05 11:27 PDT, Matt Baker
timothy: review+
Matt Baker
Comment 1 2017-04-03 13:52:06 PDT
Matt Baker
Comment 2 2017-04-03 14:00:24 PDT
(In reply to Matt Baker from comment #0) > Summary: > Debugger tab should support only the Scope Chain sidebar panel. Reworded the bug. I'd forgotten about Probes.
Devin Rousso
Comment 3 2017-04-03 14:02:03 PDT
(In reply to Matt Baker from comment #0) > Summary: > Debugger tab should support only the Scope Chain sidebar panel. > > The Resource panel doesn't fit in with the Debugger tab workflow, and only > distracts from the (very important) Scope Chain panel. I think that there are some cases where showing the Resource panel is useful. The Scope Chain panel is really only useful when the debugger has paused execution (with the exception of Watch Expressions). I've had situations where I've looked at a file via the Debugger tab and then gone on to find where its initiated (via the Resource panel) and put a breakpoint there. Personally, I think a setting would be more apt than just removing the Resource panel altogether. <https://webkit.org/b/149487>
Matt Baker
Comment 4 2017-04-03 14:06:39 PDT
Timothy Hatcher
Comment 5 2017-04-03 14:47:33 PDT
I agree with Devin, the sidebar is useful for some things. It is the only place we show the full URL for example. That could be needed when debugging and it would be a pain to switch tabs and find the resource again.
Matt Baker
Comment 6 2017-04-03 15:27:51 PDT
Okay, I think a good solution will be to keep the Resource panel but reorder the panels making Scope Chain first. Since navigation items are added/removed as the currently inspected object changes, ContentBrowserTabContentView will need to maintain the ordering based on the order defined by TabContentView.detailsSidebarPanels.
Matt Baker
Comment 7 2017-04-03 16:54:27 PDT
Timothy Hatcher
Comment 8 2017-04-03 17:34:00 PDT
Transient sidebars like Scope Chain should be last. The goal being that hit targets for labels would not move. That being said, the labels are center aligned so they move anyway. Does Devin's recent change make this not matter as much? https://trac.webkit.org/changeset/214847
Timothy Hatcher
Comment 9 2017-04-03 19:58:05 PDT
Comment on attachment 306140 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306140&action=review > Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js:154 > + WebInspector.detailsSidebar.addSidebarPanel(sidebarPanel, (a, b) => { Wouldn't we know the index it needs inserted at? You would be better off adding a inserSidebarPanel function that takes an index. No need to sort the array for one item insert when the order is known already. > Source/WebInspectorUI/UserInterface/Views/Sidebar.js:63 > + addSidebarPanel(sidebarPanel, comparator) The index implementation you add below can be used for a new insertSidebarPanel. And you can make addSidebarPanel use it to reduce duplication.
Matt Baker
Comment 10 2017-04-05 10:27:34 PDT
(In reply to Timothy Hatcher from comment #8) > Transient sidebars like Scope Chain should be last. The goal being that hit I think it's actually the Resource sidebar that is transient, Scope Chain is always shown.
Matt Baker
Comment 11 2017-04-05 11:27:39 PDT
Timothy Hatcher
Comment 12 2017-04-06 11:45:40 PDT
Comment on attachment 306300 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306300&action=review > Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js:157 > + let index = this.detailsSidebarPanels.indexOf(sidebarPanel) - hiddenSidebarPanels; > + WebInspector.detailsSidebar.insertSidebarPanel(sidebarPanel, index); This could just be: let index = i - hiddenSidebarPanels
Matt Baker
Comment 13 2017-04-06 11:52:09 PDT
Note You need to log in before you can comment on or make changes to this bug.