WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 167034
Web Inspector: no discoverable way to dismiss the split console
https://bugs.webkit.org/show_bug.cgi?id=167034
Summary
Web Inspector: no discoverable way to dismiss the split console
Blaze Burg
Reported
2017-01-13 16:57:03 PST
You have to randomly hit ESC, or click the Show console tab icon and switch back, to get rid of the split console. Maybe we could make the Show Console Tab have a chevron pointing down next to it, or we could add a "hide debug area" style button like Xcode on the left edge of the split console navigation bar.
Attachments
Patch
(35.82 KB, patch)
2017-06-20 13:16 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
[Image] Dismiss button
(95.80 KB, image/png)
2017-06-20 14:15 PDT
,
Matt Baker
no flags
Details
Archive of layout-test-results from ews100 for mac-elcapitan
(1.14 MB, application/zip)
2017-06-20 15:53 PDT
,
Build Bot
no flags
Details
Patch
(35.91 KB, patch)
2017-06-21 13:58 PDT
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-01-13 16:57:21 PST
<
rdar://problem/30023436
>
Matt Baker
Comment 2
2017-01-13 18:30:33 PST
This is covered by
https://bugs.webkit.org/show_bug.cgi?id=165211
, which adds a expand/collapse button (styled after Xcode's debugging console).
Matt Baker
Comment 3
2017-01-14 19:20:47 PST
I'll break this change out from the WIP patch I have for the above bug.
Matt Baker
Comment 4
2017-06-20 13:16:48 PDT
Created
attachment 313430
[details]
Patch
Nikita Vasilyev
Comment 5
2017-06-20 13:35:14 PDT
Screenshot?
Matt Baker
Comment 6
2017-06-20 14:15:56 PDT
Created
attachment 313438
[details]
[Image] Dismiss button This is a toggle, so it has a "Show Console" state as well. This is unused now, but I'd like to leave it in for future use.
Nikita Vasilyev
Comment 7
2017-06-20 14:26:50 PDT
Comment on
attachment 313430
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=313430&action=review
> Source/WebInspectorUI/UserInterface/Images/HideConsoleDrawer.svg:2 > +<!-- Copyright © 2016 Apple Inc. All rights reserved. -->
2017.
> Source/WebInspectorUI/UserInterface/Images/ShowConsoleDrawer.svg:2 > +<!-- Copyright © 2016 Apple Inc. All rights reserved. -->
2017.
Build Bot
Comment 8
2017-06-20 15:53:57 PDT
Comment on
attachment 313430
[details]
Patch
Attachment 313430
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3968205
New failing tests: inspector/canvas/create-canvas-contexts.html
Build Bot
Comment 9
2017-06-20 15:53:58 PDT
Created
attachment 313447
[details]
Archive of layout-test-results from ews100 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Devin Rousso
Comment 10
2017-06-20 19:21:05 PDT
Comment on
attachment 313430
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=313430&action=review
> Source/WebInspectorUI/UserInterface/Base/Main.js:-302 > - this._consoleTreeElement = new WebInspector.LogTreeElement(this._consoleRepresentedObject);
IIRC, LogTreeElement was created to help with restoring the console tab when reopening the inspector (honestly could be wrong here). Does this still work?
> Source/WebInspectorUI/UserInterface/Base/Main.js:1597 > + this._showingSplitConsoleSetting.value = !this.consoleDrawer.collapsed;
NIT: you can use the helper from above: this._showingSplitConsoleSetting.value = WebInspector.isShowingSplitConsole();
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:30 > + super(element, null, true, false);
NIT: I think it would be nice to have these constant arguments be named: const delegate = null; const disableBackForward = true; const disableFindBanner = false; super(element, delegate, disableBackForward, disableFindBanner);
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:42 > + this.collapsed = true;
Instead of having "_showingSplitConsoleSetting" be on WebInspector, why not move it to this class and ditch much of the event logic for updating it's value. It would also help avoid unnecessary className churn, since you assume it to be collapsed here and it might not be via the setting.
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:69 > + this.dispatchEventToListeners(WebInspector.ConsoleDrawer.Event.Resized);
I don't really think this makes sense. Personally, I see the drawer collapsing as more of a "disappear" than a "resized to 0". I would rather the listeners for CollapsedStateChange understand that collapsing means it changed size than have this event be fired.
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:87 > + layout()
NIT: please call super.layout() just in case we need to do something with ContentBrowser.prototype.layout or View.prototype.layout in the future.
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:95 > + let oldHeight = this.element.offsetHeight;
NIT: you can just call this.height let oldHeight = this.height;
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:146 > + if (height === this.element.style.height)
Would it be better to compare to this.height? if (height === this.height)
> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:149 > + this.element.style.height = height + "px";
NIT: template string this.element.style.height = `${height}px`;
> Source/WebInspectorUI/UserInterface/Views/QuickConsole.js:342 > + let showingLog = WebInspector.isShowingConsoleTab() ? true : !WebInspector.consoleDrawer.collapsed; > + this.element.classList.toggle("showing-log", showingLog);
I think this can be simplified: this.element.classList.toggle("showing-log", WebInspector.isShowingConsoleTab() || WebInspector.isShowingSplitConsole());
Matt Baker
Comment 11
2017-06-21 13:51:14 PDT
Comment on
attachment 313430
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=313430&action=review
>> Source/WebInspectorUI/UserInterface/Base/Main.js:-302 >> - this._consoleTreeElement = new WebInspector.LogTreeElement(this._consoleRepresentedObject); > > IIRC, LogTreeElement was created to help with restoring the console tab when reopening the inspector (honestly could be wrong here). Does this still work?
It works, Main.js restores the selected tab from `this._selectedTabIndexSetting`.
>> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:42 >> + this.collapsed = true; > > Instead of having "_showingSplitConsoleSetting" be on WebInspector, why not move it to this class and ditch much of the event logic for updating it's value. It would also help avoid unnecessary className churn, since you assume it to be collapsed here and it might not be via the setting.
WebInspector manages the console's collapsed state, since the selected tab may not support the split console. We could revisit this in the future.
>> Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js:149 >> + this.element.style.height = height + "px"; > > NIT: template string > > this.element.style.height = `${height}px`;
I don't think there is much of a benefit for such simple string concatenations.
Matt Baker
Comment 12
2017-06-21 13:58:26 PDT
Created
attachment 313548
[details]
Patch
Devin Rousso
Comment 13
2017-06-23 01:54:56 PDT
Comment on
attachment 313548
[details]
Patch r=me. Awesome work!
WebKit Commit Bot
Comment 14
2017-06-27 14:01:57 PDT
Comment on
attachment 313548
[details]
Patch Clearing flags on attachment: 313548 Committed
r218839
: <
http://trac.webkit.org/changeset/218839
>
WebKit Commit Bot
Comment 15
2017-06-27 14:01:59 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.
Top of Page
Format For Printing
XML
Clone This Bug