RESOLVED FIXED 153532
Web Inspector: Timelines UI redesign: relocate recording controls to TimelineTabContentView's content browser
https://bugs.webkit.org/show_bug.cgi?id=153532
Summary Web Inspector: Timelines UI redesign: relocate recording controls to Timeline...
Matt Baker
Reported 2016-01-26 19:41:05 PST
* SUMMARY Relocate recording controls to TimelineTabContentView's content browser. We might want to disable these controls when the content browser is showing a content view for a represented object other than a TimelineRecording/Timeline.
Attachments
[Patch] Proposed Fix (31.68 KB, patch)
2016-03-02 11:25 PST, Matt Baker
no flags
[Image] New navigation bar controls (148.71 KB, image/png)
2016-03-02 11:38 PST, Matt Baker
no flags
[Patch] Proposed Fix (31.67 KB, patch)
2016-03-02 15:42 PST, Matt Baker
no flags
Radar WebKit Bug Importer
Comment 1 2016-01-26 19:41:19 PST
Matt Baker
Comment 2 2016-03-02 11:25:26 PST
Created attachment 272667 [details] [Patch] Proposed Fix
Matt Baker
Comment 3 2016-03-02 11:38:33 PST
Created attachment 272668 [details] [Image] New navigation bar controls Placement of the view mode controls (Timelines/Rendering Frames) is awkward without the sidebar. I tried a few styles and locations, without arriving at an ideal solution. To expedite this patch the buttons were left much as they were when they lived in the sidebar. We can revisit this as the new Timelines UI matures.
Timothy Hatcher
Comment 4 2016-03-02 12:51:40 PST
Comment on attachment 272667 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=272667&action=review > Source/WebInspectorUI/UserInterface/Views/TabContentView.js:152 > + this.restoreFromCookie(cookie); Should this get the relaxMatchDelay passed in too? > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.css:29 > +/* remove me! */ > +.timeline.tab.content-view .navigation-bar > .item.toggle-navigation-sidebar.activate.button { > + display: none; > +} This should go away when WebInspector.ContentBrowserTabContentView no longer has a navigationSidebar. The comment should be a FIXME.
Timothy Hatcher
Comment 5 2016-03-02 12:57:38 PST
Comment on attachment 272667 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=272667&action=review > Source/WebInspectorUI/ChangeLog:15 > + "Instruments" and "Frames". UI for switching modes isn't yet final, and the Lets stick with "Timelines" and "Frames". Will talk offline.
Joseph Pecoraro
Comment 6 2016-03-02 13:04:52 PST
Comment on attachment 272667 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=272667&action=review > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:75 > + this._viewMode = null; Should we initialize the view mode based off of a setting? Or at least some default value? > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:373 > + if (isCapturing) { > + WebInspector.timelineManager.stopCapturing(); > + } else { Nit: style, no braces > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:382 > + let isCapturing = !WebInspector.timelineManager.isCapturing(); This statement reads weird since "isCapturing" is the opposite of isCapturing()". Perhaps this variable name should be "newCapturing" or something.
Timothy Hatcher
Comment 7 2016-03-02 14:29:21 PST
Comment on attachment 272667 [details] [Patch] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=272667&action=review >> Source/WebInspectorUI/ChangeLog:15 >> + "Instruments" and "Frames". UI for switching modes isn't yet final, and the > > Lets stick with "Timelines" and "Frames". Will talk offline. Lets go with "Events" and "Frames".
Matt Baker
Comment 8 2016-03-02 14:58:18 PST
(In reply to comment #4) > Comment on attachment 272667 [details] > [Patch] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272667&action=review > > > Source/WebInspectorUI/UserInterface/Views/TabContentView.js:152 > > + this.restoreFromCookie(cookie); > > Should this get the relaxMatchDelay passed in too? The state saved by TimelineSidebarPanel (and now TimelineTabContentView) doesn't require it. This is only used by the NavigationSidebarPanel base class. > > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.css:29 > > +/* remove me! */ > > +.timeline.tab.content-view .navigation-bar > .item.toggle-navigation-sidebar.activate.button { > > + display: none; > > +} > > This should go away when WebInspector.ContentBrowserTabContentView no longer > has a navigationSidebar. > > The comment should be a FIXME. This shouldn't have been included at all.
Joseph Pecoraro
Comment 9 2016-03-02 14:59:04 PST
> Lets go with "Events" and "Frames". Maybe "Time" and "Frames"?
Matt Baker
Comment 10 2016-03-02 15:11:11 PST
(In reply to comment #6) > Comment on attachment 272667 [details] > [Patch] Proposed Fix > > View in context: > https://bugs.webkit.org/attachment.cgi?id=272667&action=review > > > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:75 > > + this._viewMode = null; > > Should we initialize the view mode based off of a setting? Or at least some > default value? This is set by _displayedContentViewNavigationItemsDidChange in response to the first WebInspector.ContentView.Event.NavigationItemsDidChange event. If the value is non-null, the first call to _changeViewMode could return without setting up the view state, since this._viewMode === newViewMode could be true. We could do this in the constructor before recordings are added: const selectedByUser = false; this._changeViewMode(WebInspector.TimelineOverview.ViewMode.Timelines, selectedByUser); > > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:373 > > + if (isCapturing) { > > + WebInspector.timelineManager.stopCapturing(); > > + } else { > > Nit: style, no braces > > > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:382 > > + let isCapturing = !WebInspector.timelineManager.isCapturing(); > > This statement reads weird since "isCapturing" is the opposite of > isCapturing()". Perhaps this variable name should be "newCapturing" or > something. Let's rewrite as: this._recordButton.toggled = !WebInspector.timelineManager.isCapturing();
Matt Baker
Comment 11 2016-03-02 15:42:13 PST
Created attachment 272696 [details] [Patch] Proposed Fix
WebKit Commit Bot
Comment 12 2016-03-02 16:34:51 PST
Comment on attachment 272696 [details] [Patch] Proposed Fix Clearing flags on attachment: 272696 Committed r197479: <http://trac.webkit.org/changeset/197479>
WebKit Commit Bot
Comment 13 2016-03-02 16:34:55 PST
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.