Bug 195594

Summary: Web Inspector: Timelines - Improve handling of past recordings (readonly)
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2019-03-11 18:20:41 PDT
Timelines - Improve handling of past recordings (readonly)

Steps to Reproduce:
1. Inspect a page
2. Show Timelines tab
3. Reload + stop recording
  => Timeline Recording 1
4. Reload + stop recording
  => Timeline Recording 2
5. Switch to Timeline Recording 1
  => Usability issues

Issue:
• Ability to start a recording continues this readonly recording... should probably not
• Ability to clear recording with Cmd+K keyboard shortcut (button was disabled)
Comment 1 Joseph Pecoraro 2019-03-11 18:22:40 PDT
Created attachment 364330 [details]
[PATCH] Proposed Fix
Comment 2 Devin Rousso 2019-03-11 19:09:47 PDT
Comment on attachment 364330 [details]
[PATCH] Proposed Fix

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

rs=me

> Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:487
> +        if (WI.timelineManager.activeRecording.readonly)
> +            shouldCreateNewRecording = true;

Should we also change the tooltip of the record button to remove the non-`shouldCreateNewRecording` text?  e.g. `"Start recording (%s)\nCreate new recording (%s)"` becomes `"Create new recording (%s)"` when the active recording is readonly (and vice versa).
Comment 3 Joseph Pecoraro 2019-03-11 23:43:45 PDT
(In reply to Devin Rousso from comment #2)
> Comment on attachment 364330 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=364330&action=review
> 
> rs=me
> 
> > Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:487
> > +        if (WI.timelineManager.activeRecording.readonly)
> > +            shouldCreateNewRecording = true;
> 
> Should we also change the tooltip of the record button to remove the
> non-`shouldCreateNewRecording` text?  e.g. `"Start recording (%s)\nCreate
> new recording (%s)"` becomes `"Create new recording (%s)"` when the active
> recording is readonly (and vice versa).

Naw, I don't think this is common enough to warrant it. I think the current tooltip is still reasonably accurate even in the readonly case, it will start a recording!
Comment 4 WebKit Commit Bot 2019-03-12 00:11:03 PDT
Comment on attachment 364330 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 364330

Committed r242785: <https://trac.webkit.org/changeset/242785>
Comment 5 WebKit Commit Bot 2019-03-12 00:11:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-03-12 00:12:17 PDT
<rdar://problem/48799997>