#510 closed enhancement (fixed)
In-line diff option
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.8 |
Component: | version control/changeset view | Version: | 0.7.1 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The side-by-side diff view seems to display with variable width and because of display width limitations lines of code get wrapped. Both of these make it difficult to identify the diff.
Perhaps instead of a side-by-side diff there should be an in-line diff so that the diff can span the full width of the browser window. This should eliminate the inconsistent diff-box width and it will also minimize text wrapping.
Attachments (5)
Change History (13)
comment:1 by , 20 years ago
Summary: | In-line diff instead of current side-by-side diff → In-line diff option |
---|
by , 20 years ago
Attachment: | changeset.cs.diff added |
---|
Patch for changeset.cs to display side-by-side or inline diff
by , 20 years ago
Attachment: | macros.cs.diff added |
---|
Patch for macros.cs defining the inline html construct
by , 20 years ago
Attachment: | Changeset.py.diff added |
---|
Patch for changeset.py for passing diff.inline parameter to changeset.cs
comment:2 by , 20 years ago
First round patches (attached above) do not offer button per file for switching between side-by-side and inline. Still thinking about that one. However, the above patches provide inline diff functionality by specifying a new section and key in trac.ini
[diff] inline = true
If the diff section does not exist, the displayed diff will default to side-by-side.
comment:3 by , 20 years ago
I also recommend changing the side-by-side diff to this:
- <tr><td class="diff-line">line <?cs var:change.line.old ?></td> - <td class="diff-line">line <?cs var:change.line.new ?></td></tr> + <tr><td class="diff-line">Base version line <?cs var:change.line.old ?></td> + <td class="diff-line">Changed version line <?cs var:change.line.new ?></td></tr>}}}
comment:4 by , 20 years ago
Hmmm… the triple braces ate my text.. lets try again
- <tr><td class="diff-line">line <?cs var:change.line.old ?></td> - <td class="diff-line">line <?cs var:change.line.new ?></td></tr> + <tr><td class="diff-line">Base version line <?cs var:change.line.old ?></td> + <td class="diff-line">Changed version line <?cs var:change.line.new ?></td></tr>
by , 20 years ago
Attachment: | changeset.py.diff2 added |
---|
USE INSTEAD: Patch revision to changeset.py - add in url parsing (?inline=on or ?sidebyside=on) to define diff type to override Trac default diff setting
by , 20 years ago
Attachment: | changeset.cs.diff2 added |
---|
USE INSTEAD: Patch revision to changeset.cs - add link to override Trac default diff setting
comment:5 by , 20 years ago
Second round patches now display a link on the changeset page which allows the user to override the default diff style for the current page.
comment:6 by , 20 years ago
Oh yeah… patch 2 has some hand-fixed html code in the diff changeset.cs. I am not savvy enough with css and I currently don't have access to more browsers than IE6 and Firefox to verify proper layout. Actually, I couldn't get the link where I wanted it. I figure one of you guys would modify the layout anyway.
comment:7 by , 20 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
After thinking some more about it perhaps it would be nicer to have a button on the diff sections for switching each section to side-by-side or inline. That may be complicated, don't know.