Page MenuHomePhabricator

Improve diff compare screen
Closed, ResolvedPublic

Description

Proposal: https://meta.wikimedia.org/wiki/2015_Community_Wishlist_Survey/Editing#Improved_diff_compare_screen

The "Improve diff compare screen" proposal is in the Wishlist Survey top 10. The proposal leaves a lot of open space. Investigate and discuss definition of the problem, and proposed solutions.

See related tickets linked to this card.

Original proposal: Don't you just love diffs like this one. It must be possible to improve this diffcompare-view. For inspiration you can look at the wikEdDiff gadget. The Quixotic Potato (talk) 06:41, 29 September 2015 (UTC)

[Combined from separate proposal:] When someone moves a paragraph and then edits it, this edit is not shown separately by the "Difference between revisions" functionality. This problem also occurs when someone inserts a blank line above a paragraph and then edits it. Thanks, --Gnom (talk) 10:12, 12 November 2015 (UTC)

Community Tech preliminary assessment:

Support: Very high. There was unanimous support on the survey, although a couple of people wondered if this was too big for our team to handle. (They might be right, we'll see.) That being said -- the proposal itself was very vague, and there are a lot of different ways to define what needs to be improved.

Impact: Potentially high. This tool is commonly used by editors, and improvements could help many people’s workflows. However, the actual impact won't be clear until there's a concrete proposal.

Feasibility: TBD. We need to analyze what works in current diffs, and what the problems are that people would like us to solve. Some improvements may be easy while others would be major projects.

Risk: High. This wish is not well scoped yet, and there are no firm acceptance criteria. This will need considerable research/design research work, and the CT team does not have these capabilities. Changes to the diff page will also require significant community discussion to approve changes.

Status: We really want to work on this. It's a huge, important problem, and there's no other current WMF team that would take this on. We'll have to really dive into defining the problem, including lots of input from active contributors. Wikimedia Deutschland's TCB team also has "Show changes to the section text in a move" on their list. (link in German) We can work together. We'll focus on this in the spring.

Project page: https://meta.wikimedia.org/wiki/Community_Tech/Improved_diff_compare_screen

See also

Related Objects

StatusAssignedTask
ResolvedDannyH
OpenNone
DeclinedNone
OpenNone
OpenNone
ResolvedNone
ResolvedNiharika
ResolvedMaxSem
Resolvedakosiaris
ResolvedMaxSem
OpenNone
Resolvedthiemowmde
Resolved Lea_WMDE
Resolvedjkroll
DeclinedNone
ResolvedNone
ResolvedWMDE-Fisch
ResolvedTobi_WMDE_SW
Resolvedjkroll
ResolvedTobi_WMDE_SW
Resolvedjkroll
OpenNone
ResolvedPaladox
ResolvedAddshore
ResolvedAddshore
ResolvedTobi_WMDE_SW
ResolvedWMDE-Fisch
Resolvedjkroll
ResolvedLegoktm
Resolvedjkroll
OpenNone
Resolvedjkroll
ResolvedAndrew-WMDE
Resolvedjkroll
Resolved Lea_WMDE
ResolvedNone
Resolvedjkroll
ResolvedWMDE-Fisch
Resolvedjkroll
Resolvedjkroll
ResolvedWMDE-Fisch
Resolvedjkroll
Resolvedovasileva
Resolvedjkroll
ResolvedWMDE-Fisch
ResolvedMoritzMuehlenhoff
OpenWMDE-Fisch
ResolvedMoritzMuehlenhoff
Resolved Lea_WMDE
DuplicateNone
DuplicateNone
ResolvedJan_Dittrich
Resolvedthiemowmde
DuplicateNone
OpenNone
ResolvedWMDE-Fisch
ResolvedMoritzMuehlenhoff
ResolvedWMDE-Fisch
Resolvedjkroll
Resolved Lea_WMDE

Event Timeline

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

The unified diff screen of MobileFrontend, btw., doesn't look mich better for the given diff: https://en.m.wikipedia.org/wiki/Special:MobileDiff/683126701. However, I think it would be a step into the right direction, and upstreaming is already tracked at T117279: [EPIC] Core should provide inline diffs as well as side by side (Move InlineDifferenceEngine into core / remove MobileDiff).

hashar removed a subscriber: hashar.Mar 29 2016, 12:44 PM
Qgil added a subscriber: Qgil.Mar 31 2016, 9:32 AM

The Wikimedia-Hackathon-2016 starts tomorrow and this task is featured at T119703. We want to use T130776: Wikimedia Hackathon 2016 Opening Session to promote these projects and help recruiting volunteers to work for them.

If this task is ripe for hackathon work, please follow these instructions. If it is not ready, remove it from T119703 in order to avoid volunteers' frustration. Thank you!

An interesting way to do this is to allow a dropdown which applies different difference engines. I'd be interested in improving the MobileFrontend diff view and making it an available option in desktop as a starting point.

I'm investigating this in Caesarea Room if anyone wants to join me. It seems that the example diff given can be improved by simply increasing MAX_LINE_LENGTH so the Mobile diff could be a useful addition to the desktop page...

Trizek-WMF added a comment.EditedApr 1 2016, 9:45 AM

There is diffs that may need an improvement about how they are generated:

  • Add a paragraph: on mobile, should be focused on adding two lines (like on desktop) instead of focusing on text.
  •   are polluting diffs: on mobile or on desktop, there is some "strange additions" when a no backspace is replaced by a regular space. That's wired for a user.

I'm adding things to the meta page.

#Jdlrobson Have you seen Max's ticket about increasing the limit for paragraphs?

T128697: Smart limit for word-level diffs

Change 280904 had a related patch set uploaded (by Jdlrobson):
POC: More powerful diff

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

Played around with this:



Very rusty right now but if interest I'd be happy to continue with this hack.

Very rusty right now but if interest I'd be happy to continue with this hack.

Looks awesome. How can I help you make it real? :-)

Hinote added a subscriber: Hinote.Apr 1 2016, 9:31 PM

@Jdlrobson See also the work @MaxSem did in https://www.mediawiki.org/wiki/Requests_for_comment/Inline_diffs (though I cannot find the code used for that?)

Okay so my patch now just needs some review - but it makes unified and side by side options.


In terms of @MaxSem RFC, we'd need to further iterate to make this page mobile friendly but this would certainly help upstream the goodness from MobileFrontend.

Is it possible to change a little bit the interface to have it less high?

More explicit labels for the drop menu may help to remove the "choose view" label.

I switched away from OOUI forms (we can turn that on later with a simple parameter change)

FYI with the yellow/blue diff colours:

DannyH added a comment.Apr 3 2016, 7:14 AM

Can you do a strikethrough on the part that was replaced? Looking at the blue/yellow screenshot, I can't tell which is added vs deleted. Even if we were doing it as green/red, I don't know if those colors translate to all cultures anway.

Qgil added a comment.Apr 3 2016, 7:40 AM

Thank you for the progress on this task! Please sign up for the Hackathon showcase today: https://www.mediawiki.org/wiki/Wikimedia_Hackathon_2016/Showcase

No diff for free! :)

Jdlrobson added a comment.EditedApr 3 2016, 8:18 AM

Can you do a strikethrough on the part that was replaced? Looking at the blue/yellow screenshot, I can't tell which is added vs deleted. Even if we were doing it as green/red, I don't know if those colors translate to all cultures anway.

Strikethrough is really bad for accessibility. We'd need to either add a key or hope that this is learnable. Typical a '-' and '+' sign are used e.g. github but our unified diff is a bit more complex since words can be removed and added on a single line - and this gets messy very fast.

Is it possible to give the choice to user? Some would prefer striketrough or red & green or blue & yellow... Maybe set it up in preferences, to have the chosen and personalized comparison system that you want, and then be able to switch on every page if needed.

A couple of screenshots from Google Docs interface:

DannyH added a comment.EditedApr 3 2016, 9:26 AM

Playing with the current unified diff test, here's some interesting screenshots for later reference.

Moving a whole paragraph and changing a few words in the same diff --


Replacing a phrase --


Splitting a paragraph --


Moving an element from the bottom of the page up higher --


There is a previous/next idea on the classical comparison (F3821547) that we haven't yet on that screen:

Follow google Docs style, as Niharika pointed it, may solve that.

You can demo this here (until someone loads code on mediawiki/core): http://reading-web-staging.wmflabs.org/wiki/Pride_and_Prejudice?engine=unified&oldid=1511&diff=next

After the hackathon I can get this setup on a dedicated labs instancce.

You can demo this here (until someone loads code on mediawiki/core): http://reading-web-staging.wmflabs.org/wiki/Pride_and_Prejudice?engine=unified&oldid=1511&diff=next

It looks like someone cloned content from Wikipedia without caring of attribution 😄

Quoth added a subscriber: Quoth.Apr 12 2016, 8:53 PM
Qgil added a comment.Apr 18 2016, 8:57 AM

I have tried to summarize the progress on this task at https://meta.wikimedia.org/wiki/Wikimedia_Blog/Drafts/WIP_Wikimedia_Hackathon_2016_post#The_connection_with_the_Community_Wishlist. Is there any beautiful screenshot in Commons that we can reuse?

Restricted Application added a project: TCB-Team. · View Herald TranscriptApr 19 2016, 11:32 AM

Note, there was some extensive discussion of WikEdDiff in IRC, at http://bots.wmflabs.org/~wm-bot/logs/%23mediawiki-core/20160415.txt and http://bots.wmflabs.org/~wm-bot/logs/%23mediawiki-core/20160416.txt (including the topics of performance, porting it to C++, running it as a Node service, and other things I'm not qualified to understand. :)

Note, there was some extensive discussion of WikEdDiff in IRC, at http://bots.wmflabs.org/~wm-bot/logs/%23mediawiki-core/20160415.txt and http://bots.wmflabs.org/~wm-bot/logs/%23mediawiki-core/20160416.txt (including the topics of performance, porting it to C++, running it as a Node service, and other things I'm not qualified to understand. :)

Thanks, @Quiddity. I am wondering if you/@MaxSem are aware of https://www.mediawiki.org/wiki/User:PerfektesChaos/WikidiffLX (It is implemented in C++ AFAICT).

Also, I see some links to https://diff-forge.wmflabs.org which I am unable to access. :(

Also, I see some links to https://diff-forge.wmflabs.org which I am unable to access. :(

Now that decision has been made, I've disabled the special page and nuked people's IPs from the database. Whenever I need more comparisons, I'll reenable it.

Now that decision has been made

Umm, which decision? And what was the outcome?

Qgil updated the task description. (Show Details)Apr 26 2016, 5:36 AM
Restricted Application added a subscriber: Luke081515. · View Herald TranscriptJun 25 2016, 10:22 PM
Qgil removed a subscriber: Qgil.Sep 1 2016, 5:43 AM

https://gerrit.wikimedia.org/r/#/c/280904/ is still waiting for review and would help T117279 and hopefully make the diff code a little more manageable. If it's not wanted please let me know explicitly so I don't spend anymore time working on this, but I think it has value and I'm keen to get some value out of it given the time investment I've made so far.

DannyH closed this task as Resolved.Dec 15 2016, 7:45 PM
DannyH claimed this task.

We're closing this ticket, because there won't be any more Community Tech work on this project.

@DannyH, is this "resolved" or "declined"?

Resolved, because the work was done by Max as T128697: Smart limit for word-level diffs

Great! Thanks for the clarification.

Change 280904 abandoned by Jdlrobson:
Allow one column diffs as well as side by side

Reason:
Doesn't look like this patch is going anywhere sadly. :/

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