Closed Bug 1578212 Opened 1 year ago Closed 7 months ago

Limit the number of chars of commands in the output and allow them to be expanded

Categories

(DevTools :: Console, enhancement, P3)

enhancement

Tracking

(firefox76 fixed)

RESOLVED FIXED
Firefox 76
Tracking Status
firefox76 --- fixed

People

(Reporter: nchevobbe, Assigned: samarsault, Mentored)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(2 files, 1 obsolete file)

Feedback from https://bugzilla.mozilla.org/show_bug.cgi?id=1133849#c22

When building a long script in editor mode, the user will probably evaluate the wip script a lot, cluttering the console output along the way.
We could only show the first N characters of a console command in the console output, with the ability to expand it if needed.

I would like to work on this

Thanks Samarjeet, the bug is now yours :)
Don't hesitate to ask any question you have!

Assignee: nobody → thelehhman
Mentor: nchevobbe

Till where should I display the code. There are two choices:

  1. Up till the first new line
  2. Up till some n characters. In this case, what should be n?

Also, does there an existing control available to expand blocks of text in the devtools codebase?

The first line is probably the most manageable heuristic (I could also see us trying out -webkit-line-clamp, in case want multiple lines).

The twisty for expand/collapse in stacks and trees could be used here. Inspector uses twisties and a ... button inside an element. I am not aware of any "truncated text" UX in other places.

Depends on D67280

Attachment #9134080 - Attachment is obsolete: true
Attachment #9134062 - Attachment description: Bug 1578212 - Allow multiline code to be expanded, with requested changes r=nchevobbe → Bug 1578212 - Allow multiline code to be expanded, with requested changes & tests r=nchevobbe
Attachment #9134062 - Attachment description: Bug 1578212 - Allow multiline code to be expanded, with requested changes & tests r=nchevobbe → Bug 1578212 - Limit characters & allow multiline code to be expanded r=nchevobbe
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b3fb938012ba
Limit characters & allow multiline code to be expanded r=nchevobbe
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

Added a paragraph about this feature to the Multi-line mode section of the interpreter article.

You need to log in before you can comment on or make changes to this bug.