Bug 164407 - Web Inspector: Allow FolderTreeElement to display content when selected
Summary: Web Inspector: Allow FolderTreeElement to display content when selected
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:
Blocks: 145906
  Show dependency treegraph
 
Reported: 2016-11-04 00:09 PDT by Devin Rousso
Modified: 2016-11-09 10:28 PST (History)
7 users (show)

See Also:


Attachments
Patch (23.68 KB, patch)
2016-11-04 00:16 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
[Image] After Patch is applied (514.82 KB, image/png)
2016-11-04 12:10 PDT, Devin Rousso
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2016-11-04 00:09:59 PDT
Currently, selecting a FolderTreeElement in the Resources sidebar will not change the content of the Resources tab.  This is awkward, and isn't a good experience for the user.
Comment 1 Radar WebKit Bug Importer 2016-11-04 00:10:23 PDT
<rdar://problem/29106728>
Comment 2 Devin Rousso 2016-11-04 00:16:32 PDT
Created attachment 293873 [details]
Patch
Comment 3 Timothy Hatcher 2016-11-04 09:49:30 PDT
Screenshot?
Comment 4 Devin Rousso 2016-11-04 12:10:41 PDT
Created attachment 293909 [details]
[Image] After Patch is applied
Comment 5 Joseph Pecoraro 2016-11-08 11:27:02 PST
Comment on attachment 293873 [details]
Patch

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

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.css:33
> +    flex-grow: 1;

o.O

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:43
> +        switch (this.representedObject.typeVerifier) {
> +        case WebInspector.Collection.TypeVerifier.Frame:

Style: Putting this large switch into a static function would make it way easier to read the constructor, and you could half the number of lines (returns instead of breaks).

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:98
> +     // Public

Style: Weird whitespace.

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:110
> +     // Private

Style: Weird whitespace.

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:169
> +        let item = event.data.item;
> +        if (!item)
> +            return;

This seems unnecessarily safe. If Item Added doesn't contain an item, then that would be a bigger bug, workaround here hides it. Drop the early return and inline?

> Source/WebInspectorUI/UserInterface/Views/CollectionContentView.js:178
> +        let item = event.data.item;
> +        if (!item)
> +            return;

Ditto

> Source/WebInspectorUI/UserInterface/Views/TitleView.css:36
> +    font-weight: lighter;

o.O
Comment 6 WebKit Commit Bot 2016-11-09 10:28:35 PST
Comment on attachment 293873 [details]
Patch

Clearing flags on attachment: 293873

Committed r208441: <http://trac.webkit.org/changeset/208441>
Comment 7 WebKit Commit Bot 2016-11-09 10:28:38 PST
All reviewed patches have been landed.  Closing bug.