Page MenuHomePhabricator

How should wikidata/structured data diffs appear on mobile?
Open, Needs TriagePublic

Description

As noted in T243235 any change to wikidata value appears as a side by side diff in mobile.

https://commons.m.wikimedia.org/wiki/Special:MobileDiff/388741403
IT also appears like this on Wikidata: https://m.wikidata.org/wiki/Special:MobileDiff/1065024945

Screenshot_20200121-090348.png (480×960 px, 97 KB)

Screenshot_20200121-090309.png (480×960 px, 45 KB)

it's unclear if this has always been this way or is a recent regression as a result of upstreaming diff code from MobileFrontend to core.

Developer notes

MobileFrontend's Special:MobileDiff page now makes use of wikidiff2 to render diffs using DifferenceEngine in core.

The diff-type inline parameter is only supposed to work on content types that use TextSlotDiffRenderer. I'm not sure what SlotDiffRenderer this is using, but I'd hazard a guess it's got a custom diff renderer so won't support it. If this diff previously displayed differently in mobile this was likely not intentional.

Waiting on hearing back from StructuredData team about what's going on here as I don't have a knowledge of the inner workings of how these extensions work.

Possibly https://github.com/wikimedia/mediawiki-extensions-WikibaseMediaInfo/tree/master/src/Diff is related?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Addshore have diffs on wikidata always looked like https://m.wikidata.org/wiki/Special:MobileDiff/1065024945 ? If not do you know anything about the innerworkings of thoses diffs and what's happened here?

Note following CSS provides a quick fix:

.diff-marker,
td:first-child {
  display: none;
}

.diff-addedline {
  display: block;
  width: 100%;
}

.diff-addedline {
  border: none;
  background: none;
}
.diff-addedline .diffchange, .diff-deletedline .diffchange {
  border-radius: 0;
}

https://m.wikidata.org/wiki/Special:MobileDiff/1065024945

Screen Shot 2020-01-28 at 9.33.19 PM.png (1×1 px, 161 KB)