Page MenuHomePhabricator

Table row height in the VisualEditor is increased before editing cells, and after editing in VisualDiff
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Open https://en.wikipedia.org/wiki/List_of_countries_by_infant_and_under-five_mortality_rates?veaction=edit in the visual mode. Scroll down to the CIA Factbook section.
  2. Before doing any editing, note the increase in the height of the empty header cell above the row number column. The rows no longer align across the table.
  3. Type a different number in several of the cells in the "2017" column.
  4. Publish > Review your changes > Switch to the visual diff

Expected results:
All rows will look the same height.

New content will be highlighted.

Actual results:
The rows that you just added content to are taller than the others. (This is made more obvious by the presence of the row number column on the left.)

New content is not highlighted.

Screenshot at https://www.mediawiki.org/wiki/File:VE_review_of_addition_of_last_3_2017_numbers.jpg

image.png (1,365×839 px, 359 KB)

Reported by @Timeshifter at https://www.mediawiki.org/wiki/Topic:Uhevp8skbmtz0hn9

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Whatamidoing-WMF renamed this task from Table row height is too tall when adding content to Table row height is too tall in the VisualDiff when adding content to exsting cells.Jul 28 2018, 3:51 PM
Whatamidoing-WMF updated the task description. (Show Details)

It's occurred to me that the extra height might be intentional, i.e., to make room for the highlighting that should be present but is missing. If that's the case, then this could be closed as Declined and the problem with new content not being highlighted can be merged to one about diffing tables (or this one re-titled and re-purposed for that).

Timeshifter renamed this task from Table row height is too tall in the VisualDiff when adding content to exsting cells to Table row height is too tall in the VisualDiff when adding content to existing cells.Jul 30 2018, 10:26 AM

I did another test. Just click on the visual edit button on the article:
*https://en.wikipedia.org/wiki/List_of_countries_by_infant_and_under-five_mortality_rates?veaction=edit

Before any editing is done the empty header cell above the row numbers has had its height increased. It is easy to tell because the row number column rows now no longer align with the table rows to the right. Due to the increase in the header cell height.

I rarely use the visual editor, so when I started noticing all this misalignment before and after editing I started the Mediawiki thread. I now realize that the VisualDiff is going to be difficult no matter what. It has long been difficult to decipher many wikitext diffs. So I understand how it could be even more difficult to show additions and removals with a visual editor. Especially in tables.

So I would be happy if there was no height increases in cells before clicking on publish or review. It is supposed to be a WYSIWYG visual editor.

Timeshifter renamed this task from Table row height is too tall in the VisualDiff when adding content to existing cells to Table row height in the VisualEditor is increased before editing cells, and after editing in VisualDiff.Jul 30 2018, 10:58 AM
Deskana moved this task from To Triage to TR6: Visual diffs on the VisualEditor board.

This problem with row height being increased would not be a problem if there were not a separate row-number table adjacent to the main table.

There would be no misalignment of the rows if the column of row numbers was integral to, and part of, the main table.

So if T42618 was resolved then this problem here would not be a real problem either. In fact, the row height increase would be helpful (along with possible highlighting) as a way to show the Visual Diff. So I suggest finishing this enhancement:

T42618 : jquery.tablesorter: Add support for a "fixed" column of row numbers.

This isn't reproducible on that page any more after the table in it was changed, and when trying to reproduce with old revisions, I always get an error that "It took too long to compute your changes". A minimal test case would be appreciated.

This issue might actually be fixed by the fix for T295252.

Esanders claimed this task.
Esanders subscribed.

As pointed out above, we have done some work with wrapper paragraphs recently which may have fixed this.

I can't see any height difference in the table diffs, feel free to re-open if you think this is not the case:

image.png (372×129 px, 11 KB)