Page MenuHomePhabricator

[EPIC] Core should provide inline diffs as well as side by side (Move InlineDifferenceEngine into core / remove MobileDiff)
Closed, ResolvedPublic

Description

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)

Screenshot 2023-08-02 at 5.23.17 PM.png (1×988 px, 103 KB)

Proposal

Next steps

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.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
OpenNone
DeclinedNone
OpenNone
ResolvedBUG REPORTJdlrobson
OpenFeatureNone
ResolvedNone
Resolvedovasileva
ResolvedJdlrobson
ResolvedAmmarpad
ResolvedJdlrobson
ResolvedJdlrobson
Resolvedphuedx
ResolvedJdlrobson
Resolvedovasileva
Resolvedovasileva
ResolvedBUG REPORTEsanders
ResolvedJdlrobson
InvalidNone
DeclinedNone
ResolvedJdlrobson
ResolvedJdlrobson
DeclinedNone
ResolvedNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 547766 abandoned by Jdlrobson:
[mediawiki/skins/MinervaNeue@master] Style the desktop diff page of Minerva to look like Special:MobileDiff

Reason:
Not much bandwidth for this right now, but happy to provide code review for efforts pushing us in that direction.

https://gerrit.wikimedia.org/r/547766

LGoto moved this task from Q2 2020-2021 to Nice to Have on the Vector 2022 board.
LGoto subscribed.

Sorry moved this on accident, please disregard.

Change 962091 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Distinguish between table and inline diffs

https://gerrit.wikimedia.org/r/962091

Change 962095 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Style the desktop diff page of Minerva to look like Special:MobileDiff

https://gerrit.wikimedia.org/r/962095

Change 962091 merged by jenkins-bot:

[mediawiki/core@master] DifferenceEngine: Distinguish between table and inline diffs

https://gerrit.wikimedia.org/r/962091

Change 963393 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] DifferenceEngine: Comments on diff page should be themeable

https://gerrit.wikimedia.org/r/963393

Change 963395 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] DifferenceEngine: Make timestamps data readable

https://gerrit.wikimedia.org/r/963395

Change 963395 merged by jenkins-bot:

[mediawiki/core@master] DifferenceEngine: Make timestamps data readable

https://gerrit.wikimedia.org/r/963395

Change 963393 merged by jenkins-bot:

[mediawiki/core@master] DifferenceEngine: Comments on diff page should be themeable

https://gerrit.wikimedia.org/r/963393

Consider hiding or surfacing side by side diffs in mobile

I would like to have side by side available as an option on mobile, since inline diffs are sometimes an illegible mess of alternating words, e.g. an extreme case in https://en.m.wikipedia.org/wiki/Special:MobileDiff/1180439256:

Screenshot_20231016_143926_Firefox.jpg (2×1 px, 695 KB)

The process I used to use to switch from mobile diff to desktop diff used to be quite tedious, but I realized just a moment ago that clicking on "Desktop" works perfectly and takes just one click! So that's good enough for me.

I would like to have side by side available as an option on mobile, since inline diffs are sometimes an illegible mess of alternating words, e.g. an extreme case in https://en.m.wikipedia.org/wiki/Special:MobileDiff/1180439256: F38450324

The way this inline diff is presented, is really unhelpful. The algorithm may try to choose common words in both sides to group changes together. But the way it's choosing "spaces" to group them, splitting word by word instead of presenting the entire edit as a single deletion + insertion group, is very unreasonable. It seems like wikEdDiff works better for this, as the example provided in the description of T346460.

Sometimes the spaces can be the LCS, so they are highlighted as the context and all the words are shown as differences. See T326773: Wikidiff2 considers each space to be a separate word for my thoughts on this.

Jdlrobson updated the task description. (Show Details)