Page MenuHomePhabricator

dummy cells (containing  ) in table.diff lack identifying CSS class
Closed, ResolvedPublic

Description

Author: M8R-cyc3n3

Description:
screen-shot: http://i55.tinypic.com/r10xn4.png

this is related to bug 25697.

i found when viewing multi-paragraph diffs such as the wall of text seen in the
above screen-shot it may be helpful to select adjacent paragraphs with the
cursor to copy and paste specific excerpts to another medium, if not for all the
textual formatting junk between each pair of lines.

setting the following css put me about halfway there. looks sweet without all
the +/−:

.diff-marker { visibility:hidden; }

(note, "display:none;" didn't work so well because these cells have no analogue
in the header rows and having them disappear completely causes awful cell
malignment issues.)

unfortunately there's no easy/reliable way to get rid of the spaces in the cells
specified by:

<td colspan="2">&nbsp;</td>

due to the lack of an identifying css class. perhaps we can call this element
another type of .diff-marker, or make up an appropriate name for it.

(actually this would be even more useful when previewing template subst output
in the "show changes" (wpDiff) view, in cases where i'm trying to copy multiple
lines of the previewed output for discussion's sake or to build a related
template, again without all the arithmetic signs, dimension-forcing dummy chars,
and other non-content junk.)


Version: unspecified
Severity: enhancement
URL: http://i55.tinypic.com/r10xn4.png

Details

Reference
bz26354

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport set Reference to bz26354.
bzimport added a subscriber: Unknown Object (MLST).

Actually, this is not so much related to bug 25697, which added a &nbsp; to empty .diff-marker cells, so no problem there.

The <td colspan="2">&nbsp;</td> has always been there; it spans 2 columns just to give empty space. But it coud do with a class. How about .diff-empty?

M8R-cyc3n3 wrote:

The <td colspan="2">&nbsp;</td> has always been there; it spans 2 columns just
to give empty space. But it coud do with a class. How about .diff-empty?

okay, that sounds fine. or if these spaces are now redundant to those added
per your request in bug 25697 (and are no longer important to anyone) we
could see about removing them completely. regards.

As long as one cell in the row has content (either text or &nbsp;), there shouldn't be any danger of collapsing table rows. And since every row has a diff.marker cell with guaranteed content, removing the &nbsp; from <td colspan="2">&nbsp;</td> should be OK.

Created attachment 9790
Patch for wikidiff2.cpp

Add class="diff-empty" to empty rows.

Attached: