Bug 190986 - Web Inspector: refactor WI.ScopeBarItem for better extensibility
Summary: Web Inspector: refactor WI.ScopeBarItem for better extensibility
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: WebInspectorAuditTab
  Show dependency treegraph
 
Reported: 2018-10-27 10:59 PDT by Devin Rousso
Modified: 2018-10-30 10:49 PDT (History)
6 users (show)

See Also:


Attachments
Patch (13.35 KB, patch)
2018-10-27 11:04 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (13.37 KB, patch)
2018-10-27 11:10 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (14.04 KB, patch)
2018-10-30 10:10 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2018-10-27 10:59:35 PDT
This will allow options to be added in the future without having to supply falsy arguments.
Comment 1 Devin Rousso 2018-10-27 11:04:49 PDT
Created attachment 353238 [details]
Patch
Comment 2 EWS Watchlist 2018-10-27 11:08:23 PDT Comment hidden (obsolete)
Comment 3 Devin Rousso 2018-10-27 11:10:49 PDT
Created attachment 353242 [details]
Patch

Whoops.  Forgot bug number.
Comment 4 BJ Burg 2018-10-30 09:01:39 PDT
Comment on attachment 353242 [details]
Patch

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

r=me

> Source/WebInspectorUI/ChangeLog:8
> +        * UserInterface/Views/ScopeBarItem.js:

You didn't say what the better extensibility is.

> Source/WebInspectorUI/UserInterface/Views/LogContentView.js:82
> +            new WI.ScopeBarItem(WI.LogContentView.Scopes.Debugs, WI.UIString("Debugs"), {className: "debugs", hidden: true}),

Yaaassss

> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:58
> +            exclusive: true,

Nit: No need to wrap this line

> Source/WebInspectorUI/UserInterface/Views/ScopeBar.js:-155
> -            var replacesCurrentSelection = this._shouldGroupNonExclusiveItems || !event.data.withModifier;

Nit: let

> Source/WebInspectorUI/UserInterface/Views/ScopeBar.js:157
> +            var replacesCurrentSelection = this._shouldGroupNonExclusiveItems || !event.data.extendSelection;

You should mention this renaming in the changelog. I thought it was a mistake.
Comment 5 Devin Rousso 2018-10-30 10:10:32 PDT
Created attachment 353379 [details]
Patch
Comment 6 WebKit Commit Bot 2018-10-30 10:48:25 PDT
Comment on attachment 353379 [details]
Patch

Clearing flags on attachment: 353379

Committed r237593: <https://trac.webkit.org/changeset/237593>
Comment 7 WebKit Commit Bot 2018-10-30 10:48:27 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-10-30 10:49:43 PDT
<rdar://problem/45673205>