code review page breaks copy & paste

Bug #382561 reported by John A Meinel
14
This bug affects 2 people
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

John A Meinel (jameinel)
affects: launchpad → launchpad-code
Aaron Bentley (abentley)
Changed in launchpad-code:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Tim Penhey (thumper) wrote :

Unfortunately even when "display: none" is set, firefox will copy the invisible line numbers and flatten the spaces.

Revision history for this message
Martin Pool (mbp) wrote :

See also bug 705561 for continuing problems with the line numbers.

Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.