RESOLVED FIXED175808
Web Inspector: Relax the maximum sidebar width
https://bugs.webkit.org/show_bug.cgi?id=175808
Summary Web Inspector: Relax the maximum sidebar width
Matt Baker
Reported 2017-08-21 19:20:07 PDT
Summary: Relax the maximum sidebar width. This patch introduces an arbitrary constant, minimumContentBrowserWidth, which is used to determine the maximum width of a sidebar.
Attachments
Patch (2.47 KB, patch)
2017-08-21 19:23 PDT, Matt Baker
no flags
[Image] NavigationBar buttons hidden (339.38 KB, image/png)
2017-08-24 15:58 PDT, Matt Baker
no flags
Patch (3.31 KB, patch)
2017-08-25 16:40 PDT, Matt Baker
no flags
Patch (3.32 KB, patch)
2017-09-05 21:13 PDT, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2017-08-21 19:22:30 PDT
Matt Baker
Comment 2 2017-08-21 19:23:35 PDT
Devin Rousso
Comment 3 2017-08-22 11:12:17 PDT
Comment on attachment 318722 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318722&action=review > Source/WebInspectorUI/UserInterface/Base/Main.js:1053 > + const minimumContentBrowserWidth = 150; Should we have a FIXME for making this number more dynamic?
Matt Baker
Comment 4 2017-08-22 11:25:28 PDT
(In reply to Devin Rousso from comment #3) > Comment on attachment 318722 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=318722&action=review > > > Source/WebInspectorUI/UserInterface/Base/Main.js:1053 > > + const minimumContentBrowserWidth = 150; > > Should we have a FIXME for making this number more dynamic? I'd rather not have the minimum change based on the content view, that could be surprising. Instead it would be better to build better collapsing support into our toolbars.
Devin Rousso
Comment 5 2017-08-22 12:28:15 PDT
Comment on attachment 318722 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318722&action=review >>> Source/WebInspectorUI/UserInterface/Base/Main.js:1053 >>> + const minimumContentBrowserWidth = 150; >> >> Should we have a FIXME for making this number more dynamic? > > I'd rather not have the minimum change based on the content view, that could be surprising. Instead it would be better to build better collapsing support into our toolbars. OK that sounds good. A comment explaining how you arrived at 150 would be nice though :)
Matt Baker
Comment 6 2017-08-24 14:13:27 PDT
(In reply to Devin Rousso from comment #5) > Comment on attachment 318722 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=318722&action=review > > >>> Source/WebInspectorUI/UserInterface/Base/Main.js:1053 > >>> + const minimumContentBrowserWidth = 150; > >> > >> Should we have a FIXME for making this number more dynamic? > > > > I'd rather not have the minimum change based on the content view, that could be surprising. Instead it would be better to build better collapsing support into our toolbars. > > OK that sounds good. A comment explaining how you arrived at 150 would be > nice though :) So my Changelog comment that this patch introduces an arbitrary constant" isn't sufficient?! I'll include a better explanation.
Matt Baker
Comment 7 2017-08-24 14:37:42 PDT
I'm going to make this a little more sophisticated. We should take into account whether the current TabContentView even supports the other sidebar (the sidebar not being resized).
Matt Baker
Comment 8 2017-08-24 15:58:56 PDT
Created attachment 319030 [details] [Image] NavigationBar buttons hidden Our navigation bar implementation wraps items that can't be shown at a given width. It should be possible to ensure that crucial items (such as sidebar show/hide) are always visible.
Matt Baker
Comment 9 2017-08-25 16:24:56 PDT
(In reply to Matt Baker from comment #8) > Created attachment 319030 [details] > [Image] NavigationBar buttons hidden > > Our navigation bar implementation wraps items that can't be shown at a given > width. It should be possible to ensure that crucial items (such as sidebar > show/hide) are always visible. Once <https://webkit.org/b/175999> lands it will be safe to go ahead with this change.
Matt Baker
Comment 10 2017-08-25 16:40:45 PDT
Devin Rousso
Comment 11 2017-09-05 19:26:11 PDT
Comment on attachment 319115 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=319115&action=review r=me Thanks for adding the ChangeLog comment about 100px. Makes a lot more sense :) > Source/WebInspectorUI/UserInterface/Base/Main.js:1066 > + let otherSidebar; > + if (sidebar === this.navigationSidebar) > + otherSidebar = tabContentView.detailsSidebarPanels.length ? this.detailsSidebar : null; > + else > + otherSidebar = tabContentView.navigationSidebarPanel ? this.navigationSidebar : null; I personally don't like the idea of leaving `let` uninitialized. I think it's easier to read when written like this: let otherSidebar = null; if (sidebar === this.navigationSidebar && tabContentView.detailsSidebarPanels.length) otherSidebar = this.detailsSidebar; else if (sidebar === this.detailsSidebar && tabContentView.navigationSidebarPanel) otherSidebar = this.navigationSidebar;
Matt Baker
Comment 12 2017-09-05 21:13:16 PDT
WebKit Commit Bot
Comment 13 2017-09-06 20:29:24 PDT
Comment on attachment 319978 [details] Patch Clearing flags on attachment: 319978 Committed r221713: <http://trac.webkit.org/changeset/221713>
WebKit Commit Bot
Comment 14 2017-09-06 20:29:26 PDT
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.