Edgewall Software
Modify

Opened 20 years ago

Closed 18 years ago

Last modified 4 years ago

#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>(&#34;(.*?)&#34;|'(.*?)')|([^ ]*[^'~_\., \)]))))",
+              r"(?P<modulehref>!?((?P<modulename>%s):(?P<moduleargs>(&#34;(.*?)&#34;|'(.*?)')|([^ ]*[^'~_\., \)]))))" % _wiki_modules,

It affects both Firefox and Internet Explorer, on Windows.

Attachments (1)

mob_db-diff.png (22.0 KB ) - added by Christian Boos 18 years ago.
Screenshot of an overlapping diff

Download all attachments as: .zip

Change History (16)

comment:1 by Matthew Good, 20 years ago

Milestone: 0.9
Owner: changed from Jonas Borgström to Matthew Good
Status: newassigned
Summary: Long lines are not correctly wrapped up in diffslong unwrappable lines in changeset are partially hidden

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 to hidden, 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.

comment:2 by Christian Boos, 19 years ago

Resolution: fixed
Status: assignedclosed

This has been fixed in r1764

comment:3 by Christian Boos, 18 years ago

Milestone: 0.90.10.1
Resolution: fixed
Status: closedreopened

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

     
    108108.diff table tbody td {
    109109 background: #fff;
    110110 font: normal 11px monospace;
    111  overflow: hidden;
     111 overflow: visible;
    112112 padding: 1px 2px;
    113113 vertical-align: top;
    114114}

seems to be still in order.

comment:4 by Christian Boos, 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 Christian Boos, 18 years ago

Resolution: fixed
Status: reopenedclosed

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 theultramage@…, 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…

by Christian Boos, 18 years ago

Attachment: mob_db-diff.png added

Screenshot of an overlapping diff

comment:7 by Christian Boos, 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 theultramage@…, 18 years ago

Resolution: fixed
Status: closedreopened

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:9 by Christian Boos, 18 years ago

Ok, the current solution doesn't work with Internet Explorer.

comment:10 by Christian Boos, 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.

comment:11 by Christian Boos, 18 years ago

Milestone: 1.00.11

Another, rather extreme, example is r4620

I think we should reintroduce wrapping, even if this means a regression for #3966. Any objections/better idea?

in reply to:  11 comment:12 by Matthew Good, 18 years ago

Status: reopenednew

Replying to cboos:

I think we should reintroduce wrapping, even if this means a regression for #3966. Any objections/better idea?

Yes, #3966 looks like it just needs an &nbsp; so the <ins> element isn't collapsed for being empty.

comment:13 by Matthew Good, 18 years ago

Resolution: fixed
Status: newclosed

r4622 fixes this without breaking #3966.

comment:14 by Matthew Good, 18 years ago

Milestone: 0.110.10.3

The fix has also been ported to 0.10 in r4622.

comment:15 by Matthew Good, 18 years ago

Milestone: 0.10.30.10.4

Oops, this wasn't actually committed until after the 0.10.3 release.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Matthew Good to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.