Page MenuHomePhabricator

Prose diffs unusable for changes with large blocks of unmodified text
Closed, DuplicatePublic

Description

The prose diff generator is not handling the case where changes surround a (significantly) large unchanged block of text:

Example (reproduction steps):

  1. create a new wiki page with let's say a few pages of contents (2000 words copied from http://www.loremipsum.de/ should do the trick)
  2. edit the wiki page, adding a new line at the top and a new line at the bottom of the page and save
  3. review the changes

What happens is that the change between the two versions is displayed as the entire text from the first version removed, and the entire text of the second version added. This makes it virtually impossible to review changes, as one has to "manually" look for the changed parts of the text. Screenshot with the actual changes marked with red circles:

prose-fail.png (502×610 px, 64 KB)

What would be better is a diff where only the actual changes are marked, for example like this:

prose-correct.png (257×590 px, 23 KB)

Reproducable on test instance at phacility.com with these versions:

phabricator 111c63955155046bbd57c3836c78d460ebe13dfb (Sat, Nov 5) 
arcanist e17fe43ca3fe6dc6dd0b5ce056f56310ea1d3d51 (Fri, Oct 21) 
phutil 40e473e057885dab5de4fb42901f7fff2d340a6a (Sat, Nov 5) 
libcore 59c8aee1927a8d88793df8db7415670f21d2a122 (Tue, Oct 25) 
services aec5715392fe357b5f4d42e2dc2f476f7b21d56b (Sep 17 2016)