Page MenuHomePhabricator

Let users choose a visual or wikitext diff in the review-your-changes tab
Closed, ResolvedPublic40 Estimated Story Points

Description

Overview

It is not currently possible to see a visual diff before saving an edit made in visual editor. It would be nice to offer the option of visual diffs, in case a user is not fluent in wikitext or would prefer a visual diff for some other reason.

A visual diff should:

  • Indicate the visual state of the document before and after the changes
  • Highlight the differences (could be side-by-side or inline)
  • Display the changes within the relevant context (aligned, if side-by-side)
  • Generate the diff at an acceptable speed
  • Detect and display different types of changes (text changes, structural changes, changes to tables, galleries, formulae, etc)

Research, requirements and design

Research for defining requirements:

  • Types of edits made
  • Diffing algorithms, bearing in mind the types of edits made
  • Existing diff tools (their functionality, design, performance)
  • Particular needs of different languages, platforms and user groups

As always, design should consider:

  • Interface design
    • Workflow, graphics
    • API design (provide/use... available outside of VE?)
  • Internal design
    • Client-server model
    • Language/libraries/browsers/versioning
    • Algorithms
    • Data storage
    • Performance optimisation
    • Security

Work steps

Research:

  • Choose a suitable diff library (existing or make a new one) for preliminary work
  • Use the library to gather data on the types of diffs generated by edits

Build:

  • Build prototype, integrated into visual editor, that can produce sensible diffs at an acceptable speed from typical and edge-case edits
  • Decide what to incorporate from research of existing tools, including context and highlighting
  • Discuss design with designers, implement user interface accordingly and do more formal testing on typical and edge-cases
  • Discuss further design improvements with designers
  • Release alpha
  • Make improvements until prototype passes usability tests
  • Release beta

Related Objects

Status Subtype Assigned Task
Open None
Open None
Resolved Tchanders
Resolved Tchanders
Resolved Tchanders
Resolved Tchanders
Resolved Tchanders
Resolved Esanders
Resolved Tchanders
Resolved Esanders
Resolved Tchanders
Resolved Jdforrester-WMF
Resolved Tchanders
Resolved Jdforrester-WMF
Resolved Tchanders
Resolved Tchanders
Resolved Jdforrester-WMF
Resolved Esanders
Resolved Esanders
Resolved Tchanders
Resolved Jdforrester-WMF
Resolved Esanders
Resolved Esanders
Resolved Tchanders
Resolved Esanders
Resolved Tchanders
Resolved Esanders

Event Timeline

Jdforrester-WMF renamed this task from Visual editor users see wysiwyg diffs to Let users choose a visual or wikitext diff in the "Review your changes" tab.Aug 19 2016, 9:50 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF set the point value for this task to 40.

Should T39931 be merged at this point?

Should T39931 be merged at this point?

No? I don't think they're related.

I think T39931 describes inline annotations to show which ares of the document have changed, perhaps not even in detail (e.g. a gutter marker showing which lines have been modified) and perhaps not showing deletions. This ticket is for more precise visual diffs showing exactly what changed.

Agreed - T39931 is more about highlighting changed areas as you're editing, if I'm reading it correctly. This current task is more about offering a visual diff as an alternative to the wikitext diff you can currently request just before saving.

Change 311173 had a related patch set uploaded (by Tchanders):
Make it possible to see visual diffs in VE core

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

Change 311173 merged by jenkins-bot:
Make it possible to see visual diffs in VE core

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

Jdforrester-WMF renamed this task from Let users choose a visual or wikitext diff in the "Review your changes" tab to Let users choose a visual or wikitext diff in the review-your-changes tab.Nov 22 2016, 10:00 PM

Change 338101 had a related patch set uploaded (by Jforrester; owner: Esanders):
[mediawiki/extensions/VisualEditor] Introduce visual differ in the save dialog

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

Change 338101 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor] Introduce visual differ in the save dialog

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

OK, the first version of this is now done. There's lots more to do to make it a great experience, at which point we'll want to make it the default diff view, but I'll mark this as Resolved for now.