Closed
Bug 1286259
Opened 8 years ago
Closed 8 years ago
Reps: grip-array rep should support limited preview
Categories
(DevTools :: Shared Components, defect, P1)
DevTools
Shared Components
Tracking
(firefox51 fixed)
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: Honza, Assigned: gasolin)
References
Details
(Whiteboard: [reserve-html][good taipei bug])
Attachments
(3 files, 2 obsolete files)
GripArray is limiting number of items in long mode to 300, but number of items in grip-preview is limited to 10.
This causes that the following array:
let arr = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"];
is rendered as follows in long mode:
["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
The last "10" element is missing and there is no "more..." label.
The rep should:
1) look at grip.preview.length -> to see the total number of items
2) and display 'more...' if grip.preview.length > than the actual number of items in the preview.
---
Additionally (not as part of this bug) it could be great if the user can load the rest (by issuing 'getPrototypeAndProperties' packet) without going to the Variables view...
In case of the HTTP Inspector (the Console panel) there is a 'more...' link that allows to fetch the rest of the response body if it's bigger than LongStringGrip max limit.
Honza
Reporter | ||
Updated•8 years ago
|
Whiteboard: [devtools-html]
Updated•8 years ago
|
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: [devtools-html] [triage] → [reserve-html]
Reporter | ||
Updated•8 years ago
|
Whiteboard: [reserve-html] → [reserve-html][good taipei bug]
Assignee | ||
Comment 1•8 years ago
|
||
took it.
> it could be great if the user can load the rest (by issuing 'getPrototypeAndProperties' packet) without going to the Variables view...
Sounds cool, can you point me any example that already provide such feature in devtools?
Assignee: nobody → gasolin
Status: NEW → ASSIGNED
Flags: needinfo?(odvarko)
Assignee | ||
Comment 2•8 years ago
|
||
I took the example on console and the result looks right to me
Assignee | ||
Comment 3•8 years ago
|
||
Ooh it's object grip-array, I'll add related test in test_reps_grip-array.html to make sure things works well.
Flags: needinfo?(odvarko)
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8771212 -
Flags: review?(odvarko)
Reporter | ||
Comment 5•8 years ago
|
||
Comment on attachment 8771212 [details] [diff] [review]
0001-Bug-1286259-Reps-grip-array-rep-should-support-limit.patch
Review of attachment 8771212 [details] [diff] [review]:
-----------------------------------------------------------------
I don't see the `more...` link when testing this in RepTester.
Home come that the test passes...?
Honza
::: devtools/client/shared/components/reps/grip-array.js
@@ +50,5 @@
> return items;
> }
>
> + if (grip.preview.length) {
> + max = max > grip.preview.length ? grip.preview.length : max;
This is wrong. You need to check (and use) number of items available in the preview (grip.preview.items.length)
@@ +91,4 @@
> }
> }
>
> + if (array.length > max) {
This also needs to use the preview.items array.
Attachment #8771212 -
Flags: review?(odvarko)
Comment 6•8 years ago
|
||
Hi Fred, it's just a reminder that I'll also fix the length limit issue in Bug 1285530 and it might have some conflict wit your patch. Sorry if it cause any inconvenience to you.
Flags: needinfo?(gasolin)
Updated•8 years ago
|
Priority: P3 → P2
Assignee | ||
Comment 7•8 years ago
|
||
Honza said in comment 1
> number of items in grip-preview is limited to 10.
I can't neither find `grip-preview` related code and its limit, do you know how to reproduce this issue?
Flags: needinfo?(lclark)
Comment 8•8 years ago
|
||
It was a typo. It should be a '.', not a '-'.
Search for grip.preview in grip-array.js
Flags: needinfo?(lclark)
Assignee | ||
Comment 9•8 years ago
|
||
seems the rep result already shows correctly in rep tester, should I just resolve this issue?
Attachment #8770846 -
Attachment is obsolete: true
Flags: needinfo?(lclark)
Comment 10•8 years ago
|
||
Let's wait for Honza's opinion before closing this out.
Flags: needinfo?(lclark) → needinfo?(odvarko)
Reporter | ||
Comment 11•8 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #9)
> Created attachment 8777216 [details]
> rep result
>
> seems the rep result already shows correctly in rep tester, should I just
> resolve this issue?
I can still see the problem in rep-tester.
When evaluating `["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]` using `long` mode, the result is:
`Array["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]`
While it should be:
`Array["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", 1 more…]`
(In reply to Lin Clark [:linclark] from comment #8)
> It was a typo. It should be a '.', not a '-'.
Correct, sorry for confusion.
Honza
Flags: needinfo?(odvarko)
Assignee | ||
Comment 12•8 years ago
|
||
thanks, I can reproduce it now!
Comment hidden (mozreview-request) |
Reporter | ||
Comment 14•8 years ago
|
||
mozreview-review |
Comment on attachment 8779956 [details]
Bug 1286259 - Reps: grip-array rep should support limited preview;
https://reviewboard.mozilla.org/r/70818/#review68680
Looks good to me now!
R+ assuming all tests are green.
Thanks for working on this!
Honza
Attachment #8779956 -
Flags: review?(odvarko) → review+
Comment 16•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fccbaff0ea6f
Reps: grip-array rep should support limited preview; r=Honza
Keywords: checkin-needed
I had to back this out for failures like https://treeherder.mozilla.org/logviewer.html#?job_id=1936502&repo=autoland
https://hg.mozilla.org/integration/autoland/rev/b0604cd3b072
Flags: needinfo?(gasolin)
Assignee | ||
Comment 18•8 years ago
|
||
Bug 1284855 had add extra space between braces, will update the test case to reflect the change
Flags: needinfo?(gasolin)
Assignee | ||
Comment 19•8 years ago
|
||
The only change is add extra space for test case to pass all tests, so carry r+ here.
change format because mozreview push shows `Parent review request is submitted or discarded` message
Attachment #8771212 -
Attachment is obsolete: true
Attachment #8781369 -
Flags: review+
Assignee | ||
Comment 20•8 years ago
|
||
Please help check-in 0001-Bug-1286259-Reps-grip-array-rep-should-support-limit.patch
thanks
Keywords: checkin-needed
Comment 21•8 years ago
|
||
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/cc8350ff1a9b
Reps: grip-array rep should support limited preview, add extra space; r=Honza
Keywords: checkin-needed
Comment 22•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Updated•8 years ago
|
Iteration: --- → 51.1 - Aug 15
Priority: P2 → P1
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•