Page MenuHomePhabricator

Diff screen - display moved paragraphs
Closed, ResolvedPublic

Description

If a paragraph has been moved, we should indicate this in some way.

Information we'll have from the endpoint is:

  1. Whether the paragraph is a move destination or a move source paragraph.
  2. Moved destination paragraphs can potentially show additional internal edits by the user (deleted text & inserted text).
  3. Moved source paragraphs will show the paragraph in it's original form and placement. There will be no inserted text and no indication of what text is deleted.
  4. Moved paragraphs (both source and destination) will have a link to it's matching paragraph ID, and what direction in the document it's matching paragraph is relative to the current moved paragraph. (i.e. similar to mobile web we will have the ability to tap an up or down indicator and scroll to the other paragraph).

Also note moved paragraphs could also display on the single revision/changes screen.


Proposed designs

1 move in the same text block1 move across multiple text blocksMultiple moves
501 - History - 1 move in same text block.png (2×750 px, 311 KB)
502 - History - 1 move in different text block.png (1×750 px, 186 KB)
503 - History - multiple moves.png (3×750 px, 440 KB)
https://zpl.io/beOg3dmhttps://zpl.io/bzjY3lGhttps://zpl.io/adYA3L7
Design details
  • Moved text appears bolded and highlighted in yellow
  • Text only shown where it was moved to (eg. where it appears in the most recent revision of the diff)
  • Arrow with the direction of where the text was moved from is shown before the moved paragraph and also highlighted in yellow
  • Area where text was moved from is noted via an arrow which shows the direction of the move
  • If more than 1 section of text has been moved, each section is numbered
  • Tapping on the arrow brings the user to the moved paragraph's pair (eg. if you tap on paragraph moved you will go to where it was moved to and visa versa)

Event Timeline

JMinor triaged this task as Medium priority.
JMinor lowered the priority of this task from Medium to Low.

Notes from design review:
RH: Change the icon to not look so close to expand and collapse
Halfak: What section did it move into? Noting where a section change appeared could be helpful
PG: Removed area looks active, using above and below instead of arrows.
PG: This old ticket has some initial discussions on visual diffs. Some explorations considered the paragraph move too.
AH / PG / RH: Contrast issues with Orange and White + Too much orange generally -> Perhaps change to grey
RS: Teasing the unedited section

Per chats yesterday - for now if a paragraph has moved sections, at the source location display the section title instead of the distance to the next section. Ex. "Paragraph moved to section 'Education'". This is due to an endpoint limitation. I have made a followup task here for modifying wikidiff2 to output what we need for an intermediate section count.

https://github.com/wikimedia/wikipedia-ios/pull/3340

Update - blocked on https://phabricator.wikimedia.org/T236963. Once wikidiff2 is deployed we will have what we need from the endpoint to display section titles and moved section distances. My previous comment can be ignored, we will not need to reference the section title in the "Moved paragraph..." text.

I know this is a small feature with a big lift under the hood, so again kudos to @Tsevener and @cmadeo for the great work!

JMinor claimed this task.