Background
MobileFrontend provides an InlineDifferenceEngine which rather than displaying the diff in a 2 column layout displays it in a single column (e.g. unified). This seems like it would be useful for core as most websites these days offer unified as well as 2 column layout diffs and the former is extremely useful on mobile.
The Mobilefrontend diff has been a nuisance point in recent changes to revisions (e.g. Multi content revisions) and it would be helpful to make unified diffs a first class citizen in some form. This inconsistency causes confusion due to the completely different implementations: (see T123413)
Note there is an increasing amount of UI problems with this page. For example, the bytes added icon is misaligned with text (T340262#9065036)
Proposal
- Put the MobileDiff code in core with any necessary modifications (The code for includes/diff/DifferenceEngine.php is pretty messy and is likely to need heavy refactoring to achieve this).
- Update core diff page to allow switching to the inline diff and surface this in the desktop UI. (T240608)
- Remove the code in MobileFrontend that has been upstreamed to core. (T240622)
- It should be possible that https://en.wikipedia.org/w/index.php?title=San_Francisco&type=revision&diff=687927333&oldid=687926997&diffonly=1&useskin=minerva&diff-type=inline&diffmode=source renders a single column diff and replicates the functionality of https://en.m.wikipedia.org/wiki/Special:MobileDiff/687926997 (T240624)
Next steps
- T358293: Update MobileFrontend to use this link and retire Special:MobileDiff page (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/547263/)
- T358294: Consider hiding or surfacing side by side diffs in mobile
Questions
- What other solutions provide inline diffs? Is MobileFrontend implementation the best one?
- What refactors are necessary in core / to mobile code to support such a change if the mobile implementation is favoured.