Page MenuHomePhabricator

Standardise a control for switching diff types from side by side to inline/visual
Open, Needs TriagePublic

Description

A new inline diff mode is available for diffs alongside the traditional side by side mode - this is the traditional mobile diff view. It should be made available on desktop.

URL: https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Spain&type=revision&diff=400071&oldid=397846&diff-type=inline

A visualdiff mode/control is also provided by VisualEditor

I think this is the code:
https://gerrit.wikimedia.org/g/mediawiki/extensions/VisualEditor/+/1d3386b8ac703e27893821dc6dfc285b73cf0bb4/includes/VisualEditorHooks.php#147

Proposal: We move this control into core and allow extensions to extend it.
By default the control would contain inline and side-by-side

I didn't know about visual diff recently so I had proposed a simple drop down for the control at the bottom of the diff


Acceptance criteria

  • When inlinediff or visualdiff mode is not available the control should not show.

Open questions

  • Designers: Is the ButtonWidget appropriate here or should a dropdown be used (think of mobile screens)?
  • Designers: If we are using ButtonWidger what should the inline icon be?
  • Designers: Where to place the control on the diff?
  • Is diffmode the right parameter or should diff-type be used?
  • Designers if diffmode is not available and the user requests inline mode should there be some sort of feedback that it's not available?

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
StalledNone
DuplicateNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
Resolvedppelberg
ResolvedKrinkle
OpenNone
OpenNone
OpenNone
ResolvedHalfak
OpenNone
OpenNone
StalledNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedPetrb
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

Change 548936 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/core@master] Allow end users to switch between available diffs

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

Designers: Is the ButtonWidget appropriate here

The current widget is a ButtonSelectWidget. Usually when we've had issues with these on mobile we've converted them to DropdownWidgets. If we do use a dropdown I don't think a submit button is necessary.

NB we also use this control in the save dialog

Is there any reason not to fold the code in VisualEditor into core and hook into it from VisualEditor?

daniel added a comment.EditedDec 18 2019, 9:21 PM

@Jdlrobson what was your intent in tagging TechCom on this? Was the tag just inherited?

Jdlrobson updated the task description. (Show Details)Jan 20 2020, 6:30 PM
Moushira removed a subscriber: Moushira.Jan 20 2020, 6:50 PM

Is there any reason not to fold the code in VisualEditor into core and hook into it from VisualEditor?

Presumably you could have diff modes even without VE installed.

Pchelolo added a subscriber: Pchelolo.

It seems like there's anything to review by CPT yet. Untagging us, please tag back if code review is needed.