What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

In the current style of diff pages, all changes made in an edit are shown as deletions and additions.

This makes it rather difficult to distinguish between formatting and capitalization changes from content changes. It is also misleading as the revision would appear as though a lot of content is changing, when in truth, only a small part of content is changing, and the rest of the changes are merely formatting improvements. This can lead to rejection of legitimate edits because of how the reviewer misinterpreted the diff display.

This is most pronounced in the Inline view, but can also be seen easily in the Side-by-Side views. As an example, I have the following original screenshot:

Original SO inline diff showing changes as additions and deletions

In the example, you can see that there's a lot of red and a lot of green. You can also see double words like "i I" and "unix Unix". At first glance, it's not easy to judge how much of changes are merely formatting or capitalization changes, and how much change the actual text content.

My suggestion is to show formatting and capitalization changes in a different way. I have created the following mock-up to demonstrate how this might look like:

Mock-up showing unimportant difference as changes, rather than additions and deletions

In this, the formatting and capitalization changes are shown in a pale shade of yellow, without any repetitions. It's easy to focus on actual text changes which are still shown in red and green. For example, the change of "data's are" to "data is" or the deletion of "pasting my" are easier to spot.

I believe reviewers would be more interested in focusing on the text content changes when reviewing revisions, and highlighting only such changes distinguished from less important changes could be very helpful in determining whether an edit is worthy of an Approve vote.

I would imagine the detection algorithm could be tweaked to compare the deleted text (red) and the added text (green) -- if the plain text content matches (ignoring case), mark this as a change (yellow). It could also be further refined to detect substrings (on word level) where text content matches, splitting them appropriately into change and deletion/addition (e.g. "Unix environment" in screenshots above).

The suggestion can be expanded to both Side-by-Side views by showing the less important changes in yellow on both sides.

share|improve this question
1  
This doesn't allow me to see how words were changed in capitalisation. Some caps changes are trivial, both forms correct, but a mere yellow background won't let me see if the old version was correctly capitalized as well. –  Martijn Pieters Dec 15 '13 at 9:14
    
You can see that easily in the Side-by-Side views where the old version will be on the left side, still distinguished by being highlighted with the yellow background. I only chose the Inline view to show the impact, but I noticed that the site normally defaults to the Side-by-Side views. –  ADTC Dec 15 '13 at 9:16
    
Also, I don't mind if the old version is shown as striked out instead of being hidden in the Inline view. But the main purpose of this suggestion is to distinguish between trivial changes and non-trivial changes. So as long as the trivial changes are marked differently, it doesn't really matter much whether the old version and new version are shown together in Inline view. Sure, it will lead to a neater display, but only at the expense of the reduced disclosure. –  ADTC Dec 15 '13 at 9:24

You must log in to answer this question.

Browse other questions tagged .