#1420 closed defect (fixed)
long unwrappable lines in changeset are partially hidden
Reported by: | Christian Boos | Owned by: | Matthew Good |
---|---|---|---|
Priority: | normal | Milestone: | 0.10.4 |
Component: | version control/changeset view | Version: | devel |
Severity: | minor | Keywords: | diff |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
While checking my recent [1505] commit, I've noticed that lines 131/140 are displayed incorrectly, in inline mode or side-by-side mode.
This is the long line:
- r"(?P<modulehref>!?((?P<modulename>bug|ticket|browser|source|repos|report|query|changeset|wiki|milestone|search):(?P<moduleargs>("(.*?)"|'(.*?)')|([^ ]*[^'~_\., \)]))))", + r"(?P<modulehref>!?((?P<modulename>%s):(?P<moduleargs>("(.*?)"|'(.*?)')|([^ ]*[^'~_\., \)]))))" % _wiki_modules,
It affects both Firefox and Internet Explorer, on Windows.
Attachments (1)
Change History (16)
comment:1 by , 20 years ago
Milestone: | → 0.9 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | Long lines are not correctly wrapped up in diffs → long unwrappable lines in changeset are partially hidden |
comment:2 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This has been fixed in r1764
comment:3 by , 18 years ago
Milestone: | 0.9 → 0.10.1 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Well, r1764 actually set overflow: hidden
, which is not what mgood proposed and what I verified would solve the issue, at least for <ins>/<del> blocks.
Also note that for fixing #3966, we introduced a white-space: pre
setting which makes matter worse for long lines, which are not wrapped anymore even if they contained white space.
So introducing the following change:
-
htdocs/css/diff.css
108 108 .diff table tbody td { 109 109 background: #fff; 110 110 font: normal 11px monospace; 111 overflow: hidden;111 overflow: visible; 112 112 padding: 1px 2px; 113 113 vertical-align: top; 114 114 }
seems to be still in order.
comment:4 by , 18 years ago
Illustration of the problematic side-effects of #3966: http://trac.edgewall.org/wiki/TracUsers?action=diff&version=313 (i.e. TracUsers@312:313)
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
In r4156-4157, I think I found a good compromise:
- full lines added and removed are wrapped; there it's not that important that whitespace is preserved, as there's no old vs. new to compare character for character, and also #3966 can't happen
- intra line changes preserve space, and in this case, long lines are possibly overflowing the box; not that nice, but it's more important to be correct than ugly in this case, and as noted above, the overflow situation should not happen that often.
Ported to 0.10-stable in r4158.
comment:6 by , 18 years ago
This is a followup from #4070, since nothing was resolved due to misunderstanding and ignorance. So, once more:
I use trac v0.11 devel, HEAD revision, to view revisions stored in svk repository mirrors. One CSV file always views incorrectly - the lines don't wrap and get clipped (they're fairly long). I'm using tracd to generate the pages.
You can see how the file looks like (yes, the file view itself is affected, not just the changset view) on v0.11 devel by opening this url. And you can view how it looks like on v0.10 by using this url (not my server, I just use it as reference because mine isn't publicly available).
Before you object that it's an old version, I can say that the bug looks exactly the same on both versions. If this is purely a browser problem then sorry, but I tried multiple browsers and all display the same thing…
comment:7 by , 18 years ago
Well, both this issue and #4070 were about the diff view… Now you're talking about the TracBrowser and it's true that there's still a problem there.
But the diff view looks ok, as you can see in the attachment:mob_db-diff.png
comment:8 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hah. Well what do you know… it's really true. So I made a list.
Where it doesn't work:
- Internet Explorer 6 (displays 3mm-wide scrollbar space, but cuts off text inside)
- Internet Explorer 7 (the same, plus it has horrible scrolling performance on trac pages)
- Mozilla Firefox ⇐ 2.0 RC3 (same as IE I think)
- Opera latest build (lets text overflow but doesn't give a scrollbar)
Where it works:
- Mozilla Firefox 2.0 release
Latest unsupported CSS2.1 feature, maybe? Affects both changeset view and browser.
PS: the 'attach file' function still doesn't work for me on this bug tracker :\
comment:10 by , 18 years ago
Milestone: | → 1.0 |
---|
… plus the current solution also seems to be far from optimal when diffing big paragraphs, e.g.
http://trac.edgewall.org/wiki/TracTicketTriage?action=diff&version=31
Unfortunately, allowing wrapping here would reintroduce #3966.
follow-up: 12 comment:11 by , 18 years ago
Milestone: | 1.0 → 0.11 |
---|
comment:12 by , 18 years ago
Status: | reopened → new |
---|
comment:13 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:14 by , 18 years ago
Milestone: | 0.11 → 0.10.3 |
---|
The fix has also been ported to 0.10 in r4622.
comment:15 by , 18 years ago
Milestone: | 0.10.3 → 0.10.4 |
---|
Oops, this wasn't actually committed until after the 0.10.3 release.
Line-breaking behavior is up to the browser. The problem is that the line here contains a very long string with no whitespace or other breakable characters. So, since there's no logical way to wrap the line, the content goes outside of the box. The CSS
overflow
properites seem to be set tohidden
, so you can't see the end of the line.We could probably display the overflow in this case since these kinds of unwrappable lines should be rare, and most changes will continue to display the same as they do now.
I can resolve this along with some of the related changes I'm making for #1397.