Closed Bug 1057347 Opened 9 years ago Closed 9 years ago
logviewer: Copying log lines copies line numbers too
1) Open the structured log viewer for a failed job 2) Jump to the failure by clicking it in the overview 3) Copy multiple log lines, with a bit of context before/after the failure line 4) Paste somewhere Expected: Pasted text is the raw log Actual: Pasted text is the raw log with a log viewer line number inserted at the start of each line. It's a very frequent workflow to copy parts of a log into a bug. This makes the logs harder to read when pasted into a bug, and doesn't match TBPL behaviour.
I looked at this briefly. While you can make the line number unselectable, it appears it still ends up in the copy buffer. From what I've read so far on stack overflow and elsewhere, this appears to be the way selection functionality works, it copies everything in the container(s), even when they aren't displayed as selected. Caveat I am a newbie :) That being said, the TBPL brief-log or full-log don't appear to me to have any line numbers at all. Which I gather is why the problem wasn't encountered. We could potentially remove the line numbers completely from the treeherder structured log, if copy/paste from structured is an impediment to adoption. Another option perhaps is the bug could be marked as wontfix while this behavior remains missing - and the workaround is the user simply clicks on the raw log icon (either from the job panel or the structure log), and copies the equivalent chunk there. Thoughts?
Actually, when I think about it, clearly Github itself is doing this successfully when viewing code. You can copy and paste lines of code and they somehow prevent the line numbers' copy to the buffer and also keep the lines aligned during scroll. If we want this, perhaps we can look to their implementation.
Whiteboard: [good first bug]
Assignee: nobody → dburns
Status: NEW → ASSIGNED
Attachment #8488334 - Flags: review?(cdawson)
Attachment #8488334 - Flags: review?(cdawson) → review+
Commits pushed to master at https://github.com/mozilla/treeherder-ui https://github.com/mozilla/treeherder-ui/commit/b2fe04392b8f549fcefe063a2b56b321608cef44 Bug 1057347: Remove log line number from logviewer to allow easier copy/paste of logs https://github.com/mozilla/treeherder-ui/commit/8cc9bce38cbc3f0312408870a09297854f8ec7b0 Merge pull request #175 from AutomatedTester/1057347 Bug 1057347: Remove log line number from logviewer to allow easier copy/paste of logs
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/b0522ec50ac5fc65f4e8a2fa3954e672504f55c4 Bug 1057347: Remove log line number from logviewer to allow easier copy/paste of logs https://github.com/mozilla/treeherder/commit/c6e4178f0884e0013157ae2bc063862d33eed26d Merge pull request #175 from AutomatedTester/1057347 Bug 1057347: Remove log line number from logviewer to allow easier copy/paste of logs
You need to log in before you can comment on or make changes to this bug.