Closed Bug 1523245 Opened 5 years ago Closed 5 years ago

Console stacktrace with collapsed frames have extra new lines when copied

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

(Whiteboard: [boogaloo-mvp])

Attachments

(1 file)

Steps to reproduce

  1. Go to https://nchevobbe.github.io/demo/console-test-app.html
  2. Open the console
  3. Scroll to the bottom, and click on the trace button in the React/Redix section.
  4. In the console, you should see 2 console.trace messages, on the last one, click on the React group to expand it
  5. Right click and select the Copy message action
  6. Paste the result in the console input (or any other input)

Expected results

I get the following:

console.trace() App.js:17
    render App.js:17
    React 12
        finishClassComponent
        updateClassComponent
        beginWork
        performUnitOfWork
        workLoop
        renderRoot
        performWorkOnRoot
        performWork
        performSyncWork
        interactiveUpdates$1
        interactiveUpdates
        dispatchInteractiveEvent

Actual results

I get the following (note the extra new lines):

console.trace() App.js:17
    render App.js:17
    React 12
    
    finishClassComponent
    
    updateClassComponent
    
    beginWork
    
    performUnitOfWork
    
    workLoop
    
    renderRoot
    
    performWorkOnRoot
    
    performWork
    
    performSyncWork
    
    interactiveUpdates$1
    
    interactiveUpdates
    
    dispatchInteractiveEvent


Whiteboard: [boogaloo-mvp]

This is a follow-up of Bug 1486870.
In this patch we make sure that copying a
stacktrace containing a group, i.e. frames
that were grouped together because they're
part of the same library/framework, are copied
as expected to the clipboard.
There was new lines added between each frames
of the group, because they're in divs.
To fix that, we remove the display: block that
was set for group frames (so they're display: contents,
like the regular frames), and place them in a
grid with only one column (to take the whole horizontal
space).
A br is added in the group description to add a new line
after it.
A test is added to ensure this works as expected.

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fa32d5cfc223
Fix stacktrace with frames group copy; r=bgrins.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: