Page MenuHomePhabricator

Improve diff compare screen
Closed, ResolvedPublic

Assigned To
Authored By
DannyH
Dec 15 2015, 12:46 AM
Referenced Files
F3821584: moving up higher - split.jpg
Apr 3 2016, 9:41 AM
F3821585: moving up higher - unified.jpg
Apr 3 2016, 9:41 AM
F3821543: moving and changing - unified view.jpg
Apr 3 2016, 9:33 AM
F3821550: splitting paragraph - split view.jpg
Apr 3 2016, 9:33 AM
F3821551: splitting paragraph - unified view.jpg
Apr 3 2016, 9:33 AM
F3821548: replacing phrase - unified view.jpg
Apr 3 2016, 9:33 AM
F3821547: replacing phrase - split view.jpg
Apr 3 2016, 9:33 AM
F3821536: moving and changing - split view.jpg
Apr 3 2016, 9:33 AM
Tokens
"Party Time" token, awarded by Liuxinyu970226."Love" token, awarded by Jdforrester-WMF."Love" token, awarded by Trizek-WMF."Love" token, awarded by waldyrious.

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

StatusSubtypeAssignedTask
Resolved DannyH
ResolvedNone
Resolved Niharika
ResolvedMaxSem
Resolvedakosiaris
ResolvedMaxSem
Resolvedthiemowmde
ResolvedLea_WMDE
Resolved jkroll
DeclinedNone
ResolvedNone
ResolvedWMDE-Fisch
ResolvedTobi_WMDE_SW
Resolved jkroll
ResolvedTobi_WMDE_SW
Resolved jkroll
ResolvedPaladox
ResolvedAddshore
ResolvedAddshore
ResolvedTobi_WMDE_SW
ResolvedWMDE-Fisch
Resolved jkroll
ResolvedLegoktm
Resolved jkroll
ResolvedNone
Resolved jkroll
ResolvedAndrew-WMDE
Resolved jkroll
ResolvedLea_WMDE
ResolvedNone
Resolved jkroll
ResolvedWMDE-Fisch
Resolved jkroll
Resolved jkroll
ResolvedWMDE-Fisch
Resolved jkroll
Resolvedovasileva
Resolved jkroll
ResolvedWMDE-Fisch
ResolvedMoritzMuehlenhoff
ResolvedWMDE-Fisch
ResolvedMoritzMuehlenhoff
ResolvedLea_WMDE
DuplicateNone
DuplicateNone
ResolvedJan_Dittrich
Resolvedthiemowmde
DuplicateNone
ResolvedJdlrobson
ResolvedWMDE-Fisch
ResolvedMoritzMuehlenhoff
ResolvedWMDE-Fisch
Resolved jkroll
ResolvedLea_WMDE

Event Timeline

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

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...

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:

Screen Shot 2016-04-01 at 4.14.40 PM.png (608×872 px, 115 KB)

Screen Shot 2016-04-01 at 4.14.50 PM.png (605×872 px, 195 KB)

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? :-)

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

Screen Shot 2016-04-02 at 10.11.40 AM.png (458×593 px, 49 KB)

Screen Shot 2016-04-02 at 10.15.33 AM.png (565×1 px, 77 KB)

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?

Screen_Shot_2016-04-02_at_10.15.33_AM.png (487×1 px, 61 KB)

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)

Screen Shot 2016-04-02 at 5.56.49 PM.png (460×1 px, 68 KB)

Screen Shot 2016-04-02 at 5.56.57 PM.png (418×1 px, 119 KB)

FYI with the yellow/blue diff colours:

Screen Shot 2016-04-02 at 6.01.12 PM.png (680×1 px, 265 KB)

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.

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

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:

Screen Shot 2016-04-03 at 11.41.15 AM.png (144×678 px, 31 KB)

Screen Shot 2016-04-03 at 11.43.50 AM.png (176×1 px, 46 KB)

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 --

moving and changing - split view.jpg (758×967 px, 596 KB)

moving and changing - unified view.jpg (562×1 px, 541 KB)

Replacing a phrase --

replacing phrase - split view.jpg (660×965 px, 607 KB)

replacing phrase - unified view.jpg (509×975 px, 460 KB)

Splitting a paragraph --

splitting paragraph - split view.jpg (698×964 px, 490 KB)

splitting paragraph - unified view.jpg (507×1 px, 545 KB)

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

moving up higher - split.jpg (716×1 px, 583 KB)

moving up higher - unified.jpg (677×1 px, 580 KB)

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

replacing phrase - unified view.jpg (509×975 px, 460 KB)

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 😄

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?

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?

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 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"?

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