code review page breaks copy & paste
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
When performing a code review, the chosen layout for displaying the diff content breaks copy & paste in a few ways:
1) It copies the line numbers of the diff.
This is somewhat okay, but when looking at a review, it is often at least as useful to see the line numbers of the *source* code, rather than the line number of the diff.
The line numbers of the source code would be useful for actually doing a fix, the line numbers of the diff only make sense in the context of the exact diff. And note that if the diff is ever regenerated (because a dependent patch is merged?) they become invalid anyway.
2) It breaks whitespace for copy & paste
If you try to copy & paste a bit of the diff to post it into your review, it ends up all left aligned so when the diff was (note, using '.' instead of space, because malone also breaks internal whitespace)
+if this is true:
+....do X
+else:
+....do Y
If you copy and paste that, you get:
1234 +if this is true
1235 +do X
1236 +else:
1237 +do Y
Considering that indentation might be something you want to comment on...
Related branches
- Curtis Hovey (community): Approve (ui)
- Paul Hummer (community): Approve (ui)
- Brad Crittenden (community): Approve
-
Diff: 114 lines4 files modifiedMakefile (+6/-1)
configs/development/launchpad-lazr.conf (+4/-0)
lib/canonical/launchpad/javascript/code/codereview.js (+34/-1)
lib/lp/code/templates/branchmergeproposal-index.pt (+10/-4)
affects: | launchpad → launchpad-code |
Changed in launchpad-code: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in launchpad: | |
importance: | Medium → Low |
Unfortunately even when "display: none" is set, firefox will copy the invisible line numbers and flatten the spaces.