Bug 202057 - Web Inspector: REGRESSION: Elements detail sidebar sometimes starts collapsed
Summary: Web Inspector: REGRESSION: Elements detail sidebar sometimes starts collapsed
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: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-20 14:30 PDT by Joseph Pecoraro
Modified: 2019-09-25 21:19 PDT (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.15 KB, patch)
2019-09-20 15:22 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2019-09-20 14:30:15 PDT
Elements detail sidebar sometimes starts collapsed

For some reason when I switch to the Elements tab the sidebar is collapsed quite often. It should absolutely not be collapsed on first show most of the time.

I'm of the opinion this probably shouldn't even be collapsable.
Comment 1 Radar WebKit Bug Importer 2019-09-20 14:30:37 PDT
<rdar://problem/55572345>
Comment 2 Joseph Pecoraro 2019-09-20 15:16:08 PDT
We can initialize the default value for this specific sidebar to be true, which certainly seems to help!
Comment 3 Joseph Pecoraro 2019-09-20 15:22:25 PDT
Created attachment 379275 [details]
[PATCH] Proposed Fix
Comment 4 Nikita Vasilyev 2019-09-20 15:25:33 PDT
Comment on attachment 379275 [details]
[PATCH] Proposed Fix

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

> I'm of the opinion this probably shouldn't even be collapsable.

I agree!!

> Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js:70
> +    get detailsSidebarExpandedByDefault()
> +    {
> +        return true;
> +    }

Nice!
Comment 5 Devin Rousso 2019-09-24 13:33:56 PDT
Comment on attachment 379275 [details]
[PATCH] Proposed Fix

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

r=me as is, but I'm also r=me for the below suggestion too :)

> Source/WebInspectorUI/UserInterface/Views/TabContentView.js:55
> +        this._detailsSidebarCollapsedSetting = new WI.Setting(identifier + "-details-sidebar-collapsed", !this.detailsSidebarExpandedByDefault);

Frankly, is there ever a situation where we don't want the sidebar to be expanded by default?  I think the default collapsed state should just be `false`.

I do think there's value in allowing the sidebar to be collapsed in certain situations (e.g. resource introspection), but I think most of them provide a lot of super useful utility (especially when the Sources tab becomes default) that we may just want to expand them all by default.

I'm also 100% on board with not allowing the details sidebar from being collapsed in the Elements Tab, if we wanted to go that "far".
Comment 6 BJ Burg 2019-09-24 14:41:56 PDT
I think a default of not collapsed is best. Still, a user may want to collapse it for narrow widths / split view.
Comment 7 Joseph Pecoraro 2019-09-25 20:33:30 PDT
(In reply to Devin Rousso from comment #5)
> Comment on attachment 379275 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=379275&action=review
> 
> r=me as is, but I'm also r=me for the below suggestion too :)
> 
> > Source/WebInspectorUI/UserInterface/Views/TabContentView.js:55
> > +        this._detailsSidebarCollapsedSetting = new WI.Setting(identifier + "-details-sidebar-collapsed", !this.detailsSidebarExpandedByDefault);
> 
> Frankly, is there ever a situation where we don't want the sidebar to be
> expanded by default?  I think the default collapsed state should just be
> `false`.

Yeah, I think the "Resource" sidebar in the Sources tab would rather not be expanded. The Scope sidebar will auto expand when paused for the first time.


> I do think there's value in allowing the sidebar to be collapsed in certain
> situations (e.g. resource introspection), but I think most of them provide a
> lot of super useful utility (especially when the Sources tab becomes
> default) that we may just want to expand them all by default.
> 
> I'm also 100% on board with not allowing the details sidebar from being
> collapsed in the Elements Tab, if we wanted to go that "far".

I think we do, but not just yet. We should get better in narrow configurations.
Comment 8 WebKit Commit Bot 2019-09-25 21:19:17 PDT
Comment on attachment 379275 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 379275

Committed r250376: <https://trac.webkit.org/changeset/250376>
Comment 9 WebKit Commit Bot 2019-09-25 21:19:19 PDT
All reviewed patches have been landed.  Closing bug.