Bug 179347 - Web Inspector: Canvas Tab: reloading from canvas overview after making a recording will show the recording instead of overview
Summary: Web Inspector: Canvas Tab: reloading from canvas overview after making a reco...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://acko.net
Keywords: InRadar
Depends on:
Blocks: WebInspectorCanvasRecording WebInspectorCanvasTab
  Show dependency treegraph
 
Reported: 2017-11-06 15:30 PST by BJ Burg
Modified: 2017-12-04 17:41 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2017-11-06 15:30:37 PST
Steps to reproduce:

1. Create canvas recording on acko.net main canvas
2. Go back to the canvas overview
3. Reload the page
=> Jumps to the last created recording, rather than staying on overview page

This doesn't make any sense from a UX perspective. Devin wrote some code to treat orphaned recordings the same as imported recordings, but they shouldn't be auto selected this way.
Comment 1 Radar WebKit Bug Importer 2017-11-06 15:31:03 PST
<rdar://problem/35375421>
Comment 2 Devin Rousso 2017-11-06 15:57:28 PST
I don't think that they are auto-selected.  My guess as to what is happening is that we are never switching views away from the Recording, which is why it stays visible.  From what I remember, this is controlled by CanvasTabContentView.prototype.restoreStateFromCookie (and saveStateToCookie), so if we want to do this then we probably just want to modify those functions.

Personally, if I am viewing a recording (which is pretty independent of the page itself), I wouldn't want the recording to be deselected/hidden if I refresh the page.  Due to the exportability of Recordings, I don't see them as being "restricted" to a particular instance of a given page.  I see them more as a snapshot in time of something that happened, and WebInspector is just the means by which we can view that snapshot.  I can see the argument against this train of thought, however, so I could go either way.
Comment 3 BJ Burg 2017-11-07 08:45:29 PST
(In reply to Devin Rousso from comment #2)
> I don't think that they are auto-selected.  My guess as to what is happening
> is that we are never switching views away from the Recording, which is why
> it stays visible.  From what I remember, this is controlled by
> CanvasTabContentView.prototype.restoreStateFromCookie (and
> saveStateToCookie), so if we want to do this then we probably just want to
> modify those functions.
> 
> Personally, if I am viewing a recording (which is pretty independent of the
> page itself), I wouldn't want the recording to be deselected/hidden if I
> refresh the page.  Due to the exportability of Recordings, I don't see them
> as being "restricted" to a particular instance of a given page.  I see them
> more as a snapshot in time of something that happened, and WebInspector is
> just the means by which we can view that snapshot.  I can see the argument
> against this train of thought, however, so I could go either way.

I'm not proposing to hide the recording details and go back to overview when the page reloads. I'm proposing that we stay on the overview when the page reloads, but currently it jumps to a recording I wasn't looking at previously.
Comment 4 Devin Rousso 2017-11-07 12:12:15 PST
(In reply to Brian Burg from comment #3)
> I'm not proposing to hide the recording details and go back to overview when
> the page reloads. I'm proposing that we stay on the overview when the page
> reloads, but currently it jumps to a recording I wasn't looking at
> previously.
I'm not seeing this issue on ToT.  I followed your steps to reproduce, and when I refreshed the page I stayed on the overview view.
Comment 5 BJ Burg 2017-11-10 10:19:13 PST
I can't find a reliable reproduction, so let's close this.