Bug 142254

Summary: Web Inspector: Array/Collection Sizes should be visible and distinct
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[IMAGE] Work in Progress
none
[PATCH] Proposed Fix
timothy: review+
[PATCH] Proposed Fix - No Size in Property Preview
none
[DIFF] Diff between Proposed Fix 1 and 2 (PropertyPreview support) none

Joseph Pecoraro
Reported 2015-03-03 20:39:02 PST
* SUMMARY Array/Collection Sizes should be visible and distinct. Currently we don't show sizes for Collections (Sets/Maps) and for "Array" types it is tacked onto the end "Array[5]".
Attachments
[IMAGE] Work in Progress (264.90 KB, image/png)
2015-03-03 20:40 PST, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (45.23 KB, patch)
2015-03-04 15:46 PST, Joseph Pecoraro
timothy: review+
[PATCH] Proposed Fix - No Size in Property Preview (40.43 KB, patch)
2015-03-04 17:21 PST, Joseph Pecoraro
no flags
[DIFF] Diff between Proposed Fix 1 and 2 (PropertyPreview support) (7.81 KB, patch)
2015-03-04 17:21 PST, Joseph Pecoraro
no flags
Radar WebKit Bug Importer
Comment 1 2015-03-03 20:39:16 PST
Joseph Pecoraro
Comment 2 2015-03-03 20:40:34 PST
Created attachment 247830 [details] [IMAGE] Work in Progress This is the work in progress. I have this implemented, I just need to write tests and update existing tests for the subtle protocol changes, and test backwards compatibility.
Timothy Hatcher
Comment 3 2015-03-04 05:17:32 PST
Comment on attachment 247830 [details] [IMAGE] Work in Progress Looks good.
Joseph Pecoraro
Comment 4 2015-03-04 15:46:09 PST
Created attachment 247903 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 5 2015-03-04 15:47:38 PST
The attached patch even fixes: > [1, 2, 3, 4, Array...] To be: > [1, 2, 3, 4, Array (7)...] Though we may decide to style this differently, so there is no confusion? > [1, 2, 3, 4, Array[7]...] In any case... it can be addressed later.
Timothy Hatcher
Comment 6 2015-03-04 16:12:18 PST
Comment on attachment 247903 [details] [PATCH] Proposed Fix It is unfortunate that ObjectPreview, PropertyPreview and RemoteObject can't share more.
Timothy Hatcher
Comment 7 2015-03-04 16:39:08 PST
(In reply to comment #5) > The attached patch even fixes: > > > [1, 2, 3, 4, Array...] > > To be: > > > [1, 2, 3, 4, Array (7)...] > > Though we may decide to style this differently, so there is no confusion? > > > [1, 2, 3, 4, Array[7]...] > > In any case... it can be addressed later. I kind of want Array and Objects to be: [1, 2, 3, 4, [...], ...] [1, 2, 3, 4, {...}, ...] [1, 2, 3, 4, MyObject {...}, ...] I'm not sure the size should be in previews. But maybe there is a clever way to show the size inside the []? Kind of like how had with "undefined x 2".
Joseph Pecoraro
Comment 8 2015-03-04 17:10:48 PST
(In reply to comment #7) > (In reply to comment #5) > > The attached patch even fixes: > > > > > [1, 2, 3, 4, Array...] > > > > To be: > > > > > [1, 2, 3, 4, Array (7)...] > > > > Though we may decide to style this differently, so there is no confusion? > > > > > [1, 2, 3, 4, Array[7]...] > > > > In any case... it can be addressed later. > > I kind of want Array and Objects to be: > > [1, 2, 3, 4, [...], ...] > [1, 2, 3, 4, {...}, ...] > [1, 2, 3, 4, MyObject {...}, ...] I like this! > I'm not sure the size should be in previews. But maybe there is a clever way > to show the size inside the []? Kind of like how had with "undefined x 2". It is easy to remove them from property previews. If we choose not to, we should not send that information from on the backend. I'll send out a new version that doesn't include size in PropertyPreview. Just for RemoteObject / Object Preview (the top level preview).
Joseph Pecoraro
Comment 9 2015-03-04 17:15:18 PST
> > [1, 2, 3, 4, [...], ...] > > [1, 2, 3, 4, {...}, ...] > > [1, 2, 3, 4, MyObject {...}, ...] If we wanted something like: > [1, 2, 3, 4, [..(5)..], ...] (10) We would need to pass the size for PropertyPreviews.
Joseph Pecoraro
Comment 10 2015-03-04 17:21:31 PST
Created attachment 247911 [details] [PATCH] Proposed Fix - No Size in Property Preview
Joseph Pecoraro
Comment 11 2015-03-04 17:21:56 PST
Created attachment 247912 [details] [DIFF] Diff between Proposed Fix 1 and 2 (PropertyPreview support)
WebKit Commit Bot
Comment 12 2015-03-04 18:27:48 PST
Comment on attachment 247911 [details] [PATCH] Proposed Fix - No Size in Property Preview Clearing flags on attachment: 247911 Committed r181061: <http://trac.webkit.org/changeset/181061>
WebKit Commit Bot
Comment 13 2015-03-04 18:27:53 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.