Closed Bug 1264696 Opened 4 years ago Closed 3 years ago

[rep tests] Add tests for string rep

Categories

(DevTools :: Shared Components, enhancement, P1)

enhancement

Tracking

(firefox50 fixed)

RESOLVED FIXED
Firefox 50
Iteration:
50.3 - Jul 18
Tracking Status
firefox50 --- fixed

People

(Reporter: linclark, Assigned: linclark)

References

Details

(Whiteboard: [devtools-html])

Attachments

(2 files, 2 obsolete files)

See Bug 1257552
Blocks: 1257552
Severity: normal → enhancement
Whiteboard: [devtools-html]
Flags: qe-verify-
Priority: -- → P2
Assignee: nobody → lclark
Status: NEW → ASSIGNED
Iteration: --- → 49.3 - Jun 6
Priority: P2 → P1
Status: ASSIGNED → NEW
Iteration: 49.3 - Jun 6 → ---
Priority: P1 → P2
Honza, is the member prop ever used? I don't see it anywhere, but I might be missing it.
Flags: needinfo?(odvarko)
The member prop controls whether a long string is expanded. The state is managed by the tree view. It is intended for use with things like the 

There are times when a long string might be handled by a Rep that is not nested in a tree. We discussed creating a new rep for this.
Flags: needinfo?(odvarko)
I find the code for determining the limit a little confusing

https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/components/reps/string.js#60

Honza, do you expect the consumer to pass in -1 if they don't want the string to be cropped?
Flags: needinfo?(odvarko)
Attached patch Bug1264696_part1.patch (obsolete) — Splinter Review
Since these functions were used in other components, it seemed best to put them in rep-utils
Attachment #8764742 - Flags: review?(odvarko)
Attached patch Bug1264696_part2.patch (obsolete) — Splinter Review
Attachment #8764743 - Flags: review?(odvarko)
Status: NEW → ASSIGNED
Iteration: --- → 50.2
Priority: P2 → P1
Comment on attachment 8764742 [details] [diff] [review]
Bug1264696_part1.patch

Review of attachment 8764742 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, I like it.
Attachment #8764742 - Flags: review?(odvarko) → review+
Attachment #8764743 - Flags: review?(odvarko) → review+
(In reply to Lin Clark [:linclark] from comment #3)
> I find the code for determining the limit a little confusing
> 
> https://dxr.mozilla.org/mozilla-central/source/devtools/client/shared/
> components/reps/string.js#60
> 
> Honza, do you expect the consumer to pass in -1 if they don't want the
> string to be cropped?
Yes

I think we could do two things here:
1) Create a new property in StringRep called: cropLimit (or something like that) and pass it into: cropMultipleLines(text, this.prop.cropLimit).
2) Cover that in a test.

Does that make sense? (might be a follow up)

Honza
Flags: needinfo?(odvarko)
Comment on attachment 8768215 [details]
Bug 1264696 - Part 1: Move string utility functions to rep-utils.

Carrying over r+ from patch
Attachment #8768215 - Flags: review?(odvarko) → review+
Comment on attachment 8768216 [details]
Bug 1264696 - [rep tests] Add tests for string rep.

Carrying over r+ from patch
Attachment #8768216 - Flags: review?(odvarko) → review+
Attachment #8764742 - Attachment is obsolete: true
Attachment #8764743 - Attachment is obsolete: true
Blocks: 1284673
Iteration: 50.2 - Jul 4 → 50.3 - Jul 18
Comment on attachment 8768216 [details]
Bug 1264696 - [rep tests] Add tests for string rep.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/62518/diff/1-2/
Attachment #8768216 - Flags: review+ → review?(odvarko)
Comment on attachment 8768216 [details]
Bug 1264696 - [rep tests] Add tests for string rep.

Fixed ESLint, carrying over review
Attachment #8768216 - Flags: review?(odvarko) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/e1dbe6cde9f3
Move string utility functions to rep-utils. r=Honza
https://hg.mozilla.org/integration/fx-team/rev/4cd9c589ec06
[rep tests] Add tests for string rep. r=Honza
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e1dbe6cde9f3
https://hg.mozilla.org/mozilla-central/rev/4cd9c589ec06
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.