#10533 closed defect (fixed)
[Patch] Text in code format will be clipped when printing
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 1.0 |
Component: | query system | Version: | 0.13dev |
Severity: | major | Keywords: | css print code patch |
Cc: | Branch: | ||
Release Notes: |
Wrap content of code blocks in order to avoid truncation on screen and on print |
||
API Changes: | |||
Internal Changes: |
Description
When there is a very long code line in a ticket or wiki page only the first characters will be printed. I would expect that all of the code is printed (with line breaks).
See sample on t.e.o demo-0.12 and on t.e.o demo-0.13
Attachments (2)
Change History (11)
by , 13 years ago
Attachment: | #4505 -(Neues Test Ticket für Code-Test-) – Trac 0.12 Demo Project.pdf added |
---|
comment:1 by , 13 years ago
Keywords: | css added |
---|---|
Milestone: | → next-major-0.1X |
We currently have a pre.wiki { overflow: visible }
in the @media print
block, we could try with a white-space: pre-wrap
instead.
by , 13 years ago
Attachment: | ticket-10533-trac.css.patch added |
---|
Patch tested with IE 9, Google Chrome 16.0.912.77 m, Firefox 9.0.1
comment:2 by , 13 years ago
Keywords: | patch added |
---|---|
Summary: | Text in code format will be clipped when printing → [Patch] Text in code format will be clipped when printing |
Tested the patch with IE 9, Google Chrome 16.0.912.77 m, Firefox 9.0.1 and Trac 0.13dev-r10932
. Works for Wiki pages as well as tickets.
comment:3 by , 13 years ago
Milestone: | next-major-0.1X → 0.13 |
---|
Maybe it could be included into milestone Trac 0.13
?
comment:4 by , 13 years ago
Owner: | set to |
---|
Looks good also for IE8 and Opera. IE7 doesn't support it, but no surprise there, as that one-line code block doesn't show up correctly even in normal mode ;-)
Thanks for the patch!
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Severity: | major → normal |
Status: | new → closed |
Applied in r10938.
follow-up: 7 comment:6 by , 13 years ago
Component: | rendering → query system |
---|---|
Milestone: | 0.13 → 0.12.4 |
Resolution: | fixed |
Severity: | normal → major |
Status: | closed → reopened |
Note that this problem is also present for other kind of pre blocks (not only div.code pre
).
Even worse, in custom queries or in report listings, when the Description is rendered as wiki markup, the problem is not the presence of scrollbars but rather such long lines "force" the width of the whole column to take whatever space is needed to show them in full. This makes the other normal paragraphs to look like one long line. This makes the report on print completely useless as most of the content is off page. Even on screen this behavior is very damaging, as one need to scroll horizontally in order to read each long line…
See for example demo-0.12:query:?id=4505,4641,785,160,225,637&row=description
comment:7 by , 13 years ago
Replying to cboos:
See for example demo-0.12:query:?id=4505,4641,785,160,225,637&row=description
For screen it is the same behavior in this example on demo-0.13:query:?id=542,543&row=description. But when printing (print preview) the code line is displayed completely (correctly).
So this isn't a issue of printing, it is a issue of displaying code lines. Maybe you should move div.code pre { white-space: pre-wrap }
out of @media print
-section?!
comment:8 by , 12 years ago
Milestone: | 0.12.4 → 1.0 |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Fixed in r11156.
Works well on all browsers supporting white-space: pre-wrap
(all but IE7?), both on screen and on print.
comment:9 by , 12 years ago
Release Notes: | modified (diff) |
---|
Sample PDF when printing ticket