Page MenuHomePhabricator

Enable desktop diff page on mobile site
Closed, ResolvedPublic

Description

As documented in T240624#9296077 the mobile diff page can be replaced with the desktop diff page using the following code:

$wgMFUseDesktopDiffPage = [
	"base" => true,
	 "amc" => true
];

The main differences are:

  • Diff colors are now blue and yellow rather than green and red (this fixes concerns raised in T90948)
  • At desktop resolutions diffs revert to the desktop version. e.g. visual mode
  • The page actions shows instead of the title within the diff
  • The diff no longer shows information on bytes added/removed.

TODO

  • Make the configuration change on beta cluster
  • Fix blockers (T353407 T353404)
  • Get product owner/designer to sign off the differences.
  • Enable on pilot wikis
  • Enable for English Wikipedia anonymous users.
  • Deploy everywhere

sign off steps

  • Create task for decommissioning the MobileDiff page. T358293

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenBUG REPORTNone
OpenNone
StalledNone
OpenFeatureNone
DuplicateNone
ResolvedNone
OpenNone
OpenNone
OpenFeatureNone
OpenNone
ResolvedNone
ResolvedNone
OpenFeatureNone
OpenNone
ResolvedHalfak
OpenNone
OpenNone
OpenFeatureNone
StalledNone
OpenNone
OpenNone
OpenNone
ResolvedPetrb
OpenNone
OpenNone
Resolvedtstarling
OpenNone
DeclinedNone
ResolvedBUG REPORTJdlrobson
ResolvedNone
ResolvedNone
ResolvedBUG REPORTSBisson
ResolvedJdlrobson
ResolvedBUG REPORTJdlrobson
ResolvedJSengupta-WMF
OpenBUG REPORTNone
OpenBUG REPORTNone
ResolvedJdlrobson

Event Timeline

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

[operations/mediawiki-config@master] [BC] Enable desktop diff and history pages on mobile

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

Change 982925 merged by jenkins-bot:

[operations/mediawiki-config@master] [BC] Enable desktop diff and history pages on mobile

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

Mentioned in SAL (#wikimedia-operations) [2023-12-13T22:48:01Z] <jhuneidi@deploy2002> Started scap: Backport for [[gerrit:982867|Update wgStatsTarget to port 9125 (T240685)]], [[gerrit:982925|[BC] Enable desktop diff and history pages on mobile (T350181 T353388)]]

Mentioned in SAL (#wikimedia-operations) [2023-12-13T22:49:33Z] <jhuneidi@deploy2002> jhuneidi and jdlrobson and cwhite: Backport for [[gerrit:982867|Update wgStatsTarget to port 9125 (T240685)]], [[gerrit:982925|[BC] Enable desktop diff and history pages on mobile (T350181 T353388)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-12-13T22:57:43Z] <jhuneidi@deploy2002> Finished scap: Backport for [[gerrit:982867|Update wgStatsTarget to port 9125 (T240685)]], [[gerrit:982925|[BC] Enable desktop diff and history pages on mobile (T350181 T353388)]] (duration: 09m 42s)

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

[operations/mediawiki-config@master] Add wg prefix

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

Change 982936 merged by jenkins-bot:

[operations/mediawiki-config@master] Add wg prefix

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

This is looking really great, but I do think we need to decide what to do with added/removed colours. Green and red have some basis in being 'positive' (added) and 'negative' (removed), whereas yellow and blue have no meaning. A new user would have no idea which was which. The CommTech team made some design proposals on how to address this, such as having a legend indicating which colour is which. What do you think?

This is looking really great, but I do think we need to decide what to do with added/removed colours. Green and red have some basis in being 'positive' (added) and 'negative' (removed), whereas yellow and blue have no meaning. A new user would have no idea which was which. The CommTech team made some design proposals on how to address this, such as having a legend indicating which colour is which. What do you think?

I've just read that page properly and it turns out this legend does exist in production when you turn inline view on - could we add it to the mobile view too?

Screenshot 2023-12-14 at 15.45.16.png (442×1 px, 100 KB)

@Samwalton9-WMF that is exactly what we are talking about in T353479

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

[operations/mediawiki-config@master] Enable desktop diff HTML on mobile pages for all logged in users

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

Just BTW, but it is weird that visual is red-green and wikitext (inline) diff is yellow-blue. Shouldn't they both be red-green?

obraz.png (2×1 px, 274 KB)
obraz.png (2×1 px, 268 KB)

Get product owner/designer to sign off the differences.

I'm happy with this change - it's clearly a net positive.

Change 994224 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable desktop diff HTML on mobile pages for all logged in users

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

Mentioned in SAL (#wikimedia-operations) [2024-02-05T21:31:28Z] <cjming@deploy2002> Started scap: Backport for [[gerrit:994224|Enable desktop diff HTML on mobile pages for all logged in users (T350181)]]

Mentioned in SAL (#wikimedia-operations) [2024-02-05T21:32:49Z] <cjming@deploy2002> jdlrobson and cjming: Backport for [[gerrit:994224|Enable desktop diff HTML on mobile pages for all logged in users (T350181)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-02-05T21:40:57Z] <cjming@deploy2002> Finished scap: Backport for [[gerrit:994224|Enable desktop diff HTML on mobile pages for all logged in users (T350181)]] (duration: 09m 29s)

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

[operations/mediawiki-config@master] Enable desktop diff for anonymous users as well

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

@Nux can you please raise a bug for the VisualEditor-VisualDiffs extension (it's better for a bug report to come from someone other than me!)? This seems unrelated since this inconsistency happens on desktop too)

Screenshot 2024-01-30 at 5.45.08 PM.png (754×1 px, 183 KB)

I was hoping I wasn't too late to make all of them red-green (so changing mobile/wikitext, not VE)... I think I agree with Sam here:

This is looking really great, but I do think we need to decide what to do with added/removed colours. Green and red have some basis in being 'positive' (added) and 'negative' (removed), whereas yellow and blue have no meaning. A new user would have no idea which was which. The CommTech team made some design proposals on how to address this, such as having a legend indicating which colour is which. What do you think?

The legend is cool and helpful either way. I was just hoping maybe we could go back to red-green, which is more obvious (at least in Europe and its descendants). Well maybe not go back... It was yellow-green before.

But I guess it's too late to suggest that. No biggie. I already have a custom style for diffs for myself (so not pushing) :)

Sorry, I forgot I have a much smaller request. Could you flip the legend in HTML? I think "removed" belongs on the left side, and this is where inline diff puts "removed".

I have CSS for that, but I think it would be better to do it in the structure.

obraz.png (475×924 px, 40 KB)

.mw-diff-inline-legend {
	display:flex;
	flex-direction: row-reverse;
}

Diff colors: see T90948: Identify the best diff style (mobile or desktop) and use it on both mobile and desktop, which has related links and rationale for why blue and yellow exist. The short answer is red-green color blindness, especially in the context of inline diffs. That task has already been linked here and is the correct place to discuss further if at all.

FWIW, there are other contexts that use yellow and blue for "caution" and "everything's fine", respectively — my wireless router, for example. [grin]

Would it be possible to make the colors a user preference? If we provided good enough choices, that could take care of basically every type of color blindness, as well as plain ol' personal preference.

Diff colors: see T90948: Identify the best diff style (mobile or desktop) and use it on both mobile and desktop, which has related links and rationale for why blue and yellow exist. The short answer is red-green color blindness, especially in the context of inline diffs. That task has already been linked here and is the correct place to discuss further if at all.

Thanks, I added my comment there: T90948#9527537

And sorry, I didn't know it is considered such a big decision, but I guess it makes sense, as diffs are important part of patrolling changes. I should have probably looked around a bit more.

@Dcljr It's definitely possible. The colors are relatively easy to configure using gadget/user CSS. I see there is already the existing gadget "Display diffs with the old yellow-and-green colors and design" (https://en.wikipedia.org/wiki/MediaWiki:Gadget-OldDiff.css). If you want feel to free to propose a ticket to make these configurable in preferences (although I'm not sure if that will be prioritized)

@Nux for the flipping I created a new ticket: T357150

The coloring looks off if you click on Special:MobileDiff. e.g. this: https://fa.wikipedia.org/wiki/Special:MobileDiff/38611902

grafik.png (430×984 px, 49 KB)

Can we just drop the code for MobileDiff and make it redirect to the general diff now? That'll clean up a lot.

Can we just drop the code for MobileDiff and make it redirect to the general diff now? That'll clean up a lot.

@Ladsgroup this is what the EPIC ticket in T117279 is about and what I've been working towards over the last year or so (and we're almost there) :-)
MobileDiff is dropped on logged in users in production already. After I've fixed a few bugs we've identified in the last week we'll drop it from mobile (either next week or week after) and then I'll open a task to decommission (delete) the MobileDiff code and leave a redirect by the end of February.

Change 997585 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable desktop diff for anonymous users on enwiki

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

Mentioned in SAL (#wikimedia-operations) [2024-02-20T21:22:23Z] <cjming@deploy2002> Started scap: Backport for [[gerrit:997585|Enable desktop diff for anonymous users on enwiki (T350181)]]

Mentioned in SAL (#wikimedia-operations) [2024-02-20T21:23:52Z] <cjming@deploy2002> jdlrobson and cjming: Backport for [[gerrit:997585|Enable desktop diff for anonymous users on enwiki (T350181)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-02-20T21:35:42Z] <cjming@deploy2002> Finished scap: Backport for [[gerrit:997585|Enable desktop diff for anonymous users on enwiki (T350181)]] (duration: 13m 19s)

Jdlrobson updated the task description. (Show Details)