UI changes for showing changes in moved text chunks
Closed, ResolvedPublic

Description

Implement UI changes for diff view to make moved paragraphs more visible.

jkroll created this task.Mar 9 2017, 2:59 PM
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptMar 9 2017, 2:59 PM

Taking Tim Starling's feedback on Gerrit into account, I've inserted named anchors in the diff output for moved paragraphs. The + and - symbols are replaced with "left shift" (<<) and "right shift" (>>) symbols. Hyperlinks allow to move between source and destination paragraphs. This is a good solution because

  • it shows which paragraphs were moved, even if they weren't changed
  • it's plain text, so it can be searched for in the browser
  • it doesn't require JavaScript or visual changes which have to be adjusted to each Skin, such as different background colors for moved blocks

The code is straightforward and doesn't have performance implications, so it doesn't require a separate patch set.

Example links:
https://wmde-wikidiff2-patched.wmflabs.org/core/index.php?title=Red_imported_fire_ant&diff=24&oldid=23
https://wmde-wikidiff2-patched.wmflabs.org/core/index.php?title=Red_imported_fire_ant&diff=25&oldid=24
https://wmde-wikidiff2-patched.wmflabs.org/core/index.php?title=Red_imported_fire_ant&diff=26&oldid=25

Feedback welcome.

Lea_WMDE changed the status of subtask T140340: Connect moved paragraphs by arrows from Stalled to Open.Jun 30 2017, 11:06 AM
Alsee added a subscriber: Alsee.Sep 17 2017, 5:48 AM

First, a huge thank you for working on showing moves in diff! YEAY!

This is minor, but the example links use a curved arrow to mark moved paragraphs... that arrow is a bit strange and confusing at first sight. I would suggest replacing it with up and down arrows, pointing toward the copy in the other column.

@Alsee thank you for the feedback! What's there right now is very low level and we have a plan of changing the current layout to something more user-friendly which we are tracking in T140340.