Requests for comment/Inline diffs

I propose to integrate inline (one-column) diffs from MobileFrontend into MediaWiki core. Mobile screens are smaller so standard side-by-side diffs aren't good. To address this, the mobile team developed a new diff mode which we feel might be useful for desktop too. Example diff.

Implementation details
Inline diffs use existing core diff code as much as possible, therefore the code is very compact and has the same performance characteristics as two-column diffs. Just two small classes: diff formatter and a DifferenceEngine subclass - this should not create maintenance problems.

Because performance matters, Wikimedia's PHP extension wikidiff2 already supports inline diffs.

Intended goals
Primary: Whether inline diffs should be integrated into core.

Secondary: if we decide to integrate, I'd like comments on some details.
 * Current mobile designs don't show numbers of modified lines, however the diffs contain everything for core to display them, for example:   . How exactly should line numbers look like? My current idea is "Lines 123/456" and it looks ugly.
 * How to switch between diff modes? My current thought is to display old diffs by default but offer a link to inline version on diff view and remember this choice (in user prefs? via cookie?).
 * Large inline diffs can be cryptic - should MediaWiki automatically switch to side-by-side mode if the change is huge?

Comments

 * The red/green color scheme presents accessability issues for color-blind readers. Should the default yellow/blue scheme be used? Should +/− indicators be used? — Edokter  ( talk ) — 19:00, 13 February 2014 (UTC)
 * This is a mobile design which is not necessary to be ported to desktop - however our design team claims that it covers most cases of colorblindness. Yellow and blue covers more cases however unlike side-by-side diffs these colors don't give you idea what was removed and what added. We tried pluses and minuses, looked ugly. Probably, removals can be stricken out. Max Semenik (talk) 22:53, 13 February 2014 (UTC)


 * Please use a standard style. More in general however, dwdiff -c is rather outstanding for clarity IMHO. --Nemo 23:27, 13 February 2014 (UTC)
 * I'm not good enough for commenting the proposal, but thanks a bunch for working on diffs! They're a crucial part of MediaWiki and they're so completely neglected. --Nemo 23:27, 13 February 2014 (UTC)
 * "How to switch between diff modes?" I agree with displaying old diffs with a link to this format by default and having a user preference for it. Perhaps some URL parameter like diffalgo could be used. πr2 (t • c) 01:21, 28 February 2014 (UTC)
 * There's also the inline diff currently seen/used in Navpopups, eg File:Navpopups diff screenshot.png, which could potentially benefit from any work accomplished here. –Quiddity (talk) 22:03, 6 March 2014 (UTC)
 * There's also en:User:Cacycle/wikEdDiff (a userscript) which creates an inline diff, eg File:WikEdDiff screenshot.png. –Quiddity (talk) 20:02, 29 March 2014 (UTC)