Page MenuHomePhabricator

Scroll textfield and editor to the first edit conflict
Closed, ResolvedPublic

Description

Warning:
This task is preliminary, based on all the prototype feedback received until August 31st 2016. However, the request for feedback is still ongoing, hence the task is subject to change.

Task:
When the edit merge screen is opened, users should immediately see conflicting text.
Therefore, please

  • scroll the "Conflicting Changes" textfield to the first appearance of an edit conflict
  • scroll the "Editor with version to be published" editor to the text that equals "currently published" in the first edit conflict

Mock:
See also the mock for a general idea (although the scrolling there is only correct in the left column, not in the right)

Background:
This is part of fulfilling wish #1 of the German-speaking community wishlist 2015 (T139601).
The solution is a result of on-wiki discussion and Wikimania 2016 sessions and testings, as well as feedback we received to the prototype.

Event Timeline

Lea_WMDE created this task.Sep 2 2016, 3:45 PM
WMDE-leszek triaged this task as Normal priority.Oct 18 2016, 12:46 PM

We talked about scrolling a bit more in the PM-meeting on 18/01/2017:

  • the behavior described in the description still stands
  • additionally, the editor should scroll to the relevant position whenever the user scrolls to a certain conflict in the "Conflicting changes" box

@Jan_Dittrich made the following suggestion as a rough implementation idea:

  • Get diff for “mine” and “theirs”.
  • In a non-visible element, render it with the same style, same size of containing box like the editor right hand, but with markup (spans around changes). No additional padding/margin due to that!
  • Get offset of that span around change, relative to parent element+scroll position. save that.
  • Get the equivalent element in the RENDERED version
  • On click on that rendered element in the diff view, set the scroll position of the editor to the offset.

A prototype (for another project) is available at https://github.com/jdittrich/ep_autocomp, specifically at https://github.com/jdittrich/ep_autocomp/blob/master/static/js/autocomp.js#L478 and https://github.com/jdittrich/ep_autocomp/blob/master/static/js/autocomp.js#L544

WMDE-Fisch moved this task from Todo to Sprint ready on the WMDE-QWERTY-Team board.

Change 333026 had a related patch set uploaded (by WMDE-Fisch):
Auto-scroll editor to foreign change

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

Change 333026 merged by jenkins-bot:
Auto-scroll text editor to changes

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

Addshore closed this task as Resolved.Jan 31 2017, 12:59 PM

Agreed on auto scrolling to the first own change instead of the first conflict since that makes more sense.

Change 335239 had a related patch set uploaded (by WMDE-Fisch):
Scroll to first own change instead of first conflict

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

Change 335239 merged by jenkins-bot:
Scroll to first own change instead of first conflict

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

Tobi_WMDE_SW moved this task from Done to Demoed on the WMDE-QWERTY-Team board.Feb 10 2017, 10:57 AM