Page MenuHomePhabricator

Allow resolution suggestions of edit conflicts on talk pages
Open, Needs TriagePublic

Description

Motivation
The Two-Column-Edit-Conflict-View extension is a (soon to be default) beta feature that offers a different way to solve edit conflicts. Since most edit conflicts happen in the main namespace the extension is focused on this use case. However, many people are annoyed from running into edit conflicts on talk pages, where all they wanted to do is reply to another person, and have this appear underneath.

User story
As a Wikimedia editor,
I want to see my comment below conflicting other people's comments, whenever I answer at the same time as them,
so that I don't need to deal with edit conflicts

Mock

4.0 EC For Discussion Pages Main Page.jpg (1×1 px, 472 KB)

Acceptance Criteria

  • If there is exactly one change on the page, and the page is a talk page, and the changes were attempted at the exact same spot as another conflicting edit (with exactly one change), then we show users a suggestion to solve this (see mock)
  • When the user is getting into that edit conflict for talk pages for the first time, they will be shown a popup explaining the circumstances and how to deal with them (similar to the regular edit conflict). This popup can be disabled for future scenarios. (Mock to be delivered)
  • If users don't take any action and click on "apply changes", their text will be inserted immediately under the conflicting one.
  • If users choose to take action they can do the following:
    • users are able to drag and drop their or the other user's comment to change the order of these two paragraphs. This will only be possible for the two conflicting comments and only in in the specific spot the conflict occured.
    • users are able to edit their own comment by clicking the edit pen. They wont be able to edit the other user's comment. This would need to be done in a separate edit if at all.
  • Users should be able to get a preview before publishing the edit.

Nice to haves

  • There is a per-wiki configurable message that allows communities to define their edit conflict marker (e.g. (EC)). If this was filled for a community, it should be added to the beginning of the user's text.
  • If people want to leave the page without clicking the "publish" button, they should see a browser warning that their content would be lost. (see T207149)
  • Design metrics for success / failure of this use case.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 530148 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/core@master] [WIP] Provide hooks to alter 3-way merging

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

I've added some experimental hooks which allow us to alter both the inputs and outputs of the 3-way merge function. This is probably overkill, I expect that we'll only need the "after" hook where we can intercept any failures and use special edge case algorithms. Also regarding the hook, we're passing the title in order to limit the special case to pages with Title#isTalkPage == true. Passing the EditPage object would give us additional flexibility, but for now I'd prefer to limit the potential for hidden dependencies, and explicitly pass any necessary information.

The next step is to fork https://www.mediawiki.org/wiki/Extension:BoilerPlate into a new GitHub repo, an extension that will implement the new hooks. The extension.json's will declare a Hooks item to handle EditPage::threeWayMerge:after, which accepts the Title, old page content, "other" changed content and "my" changed content.

Outcome of today's story time:

  • We will create a spike ticket for properly detecting the exact type of edit. E.g. we are not sure how to detect "both edits tried to add text at the exact same position" from what wikidiff2 gives us.
  • The mock screenshot displays a little image and a preview. We suggest to merge this: No image, just the preview text, but the two conflicting paragraphs are highlighted (probably in color). Pinging @Hanna_Petruschat_WMDE to make a call on this. This also needs a tech spike: How to color paragraphs in a diff?
  • Tech spike: Should this feature be a separate extension?

After reviewing it again I figured that it would be more consistent to use the same interaction behaviour as for the edit conflict. That means:

  • we are showing a pop up the first time this special edit conflict happens.
  • The pop up gives an explanation on what is happening.
  • The user can click "Ok" and optionally set a checkmark to the "never show this again" option.
  • After closing the pop up it only shows the preview and the option to swith to the "general edit conflict resolution page"

This means, the mock above is outdated. I'm working on creating a new one. The new one will not show the explanatory text and illustration but only a short intro to the situation and then directly the proposed resolution in a preview.

I would assume that this would also mean not to color in the paragraphs as the explanation should make everything clear. I would in general not be in favor of coloring the preview as it then wouldn't be a real preview anymore.

Decisions during todays story time:

  • Needs to happen on all talk pages, as well as the project namespace.
  • We show a diff instead of a preview.
  • There are 3 buttons: "Accept resolution", "Show preview", and "Resolve manually", in this order.
  • "Resolve manually" does not go to the old UI, but to the TwoColConflict UI.
  • We want to track all decisions: How many accept the auto-resolution, how often this specific preview is used, and how many go back to the UI.

Technical spikes:

  • Write an algorithm that can detect what's possible to auto-resolve, and can auto-merge it. → 8 pts.
  • How to go back to the UI, which means resubmitting everything (incl. the old rev ID). → Not a separate ticket.
Lena_WMDE renamed this task from Allow (semi-)automated resolution of edit conflicts on discussion pages to Allow (semi-)automated resolution of edit conflicts on talk pages.Feb 11 2020, 3:23 PM
Lena_WMDE updated the task description. (Show Details)
WMDE-Fisch renamed this task from Allow (semi-)automated resolution of edit conflicts on talk pages to Allow resolution suggestions of edit conflicts on talk pages.Mar 18 2020, 7:21 AM
Lena_WMDE set the point value for this task to 13.Mar 18 2020, 10:48 AM
WMDE-Fisch removed the point value for this task.Mar 18 2020, 12:26 PM
WMDE-Fisch subscribed.

I'll remove this ticket from the current board. All steps are now represented in sub tasks. Not all of them are part of the current sprint and it makes more sense to track them separately.

Change 584874 had a related patch set uploaded (by Awight; owner: Awight):
[operations/mediawiki-config@master] Disable TwoColConflict talk page workflow

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

Change 584876 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/TwoColConflict@master] Default to enable talk page use case (for CI)

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

Change 584876 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Default to enable talk page use case (for CI)

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

Change 584889 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/TwoColConflict@master] Revert "Revert "Default to enable talk page use case (for CI)""

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

Change 584874 merged by jenkins-bot:
[operations/mediawiki-config@master] Disable TwoColConflict talk page workflow

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

Mentioned in SAL (#wikimedia-operations) [2020-03-31T11:29:04Z] <lucaswerkmeister-wmde@deploy1001> Synchronized wmf-config/CommonSettings.php: SWAT: [[gerrit:584874|Disable TwoColConflict talk page workflow (T230231)]] (duration: 00m 58s)

Mentioned in SAL (#wikimedia-operations) [2020-03-31T11:30:13Z] <lucaswerkmeister-wmde@deploy1001> Synchronized wmf-config/CommonSettings.php: SWAT: [[gerrit:584874|Disable TwoColConflict talk page workflow (T230231)]], take II (duration: 00m 57s)

Change 584889 merged by jenkins-bot:
[mediawiki/extensions/TwoColConflict@master] Revert "Revert "Default to enable talk page use case (for CI)""

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

Change 530148 abandoned by Awight:
[WIP] Provide hooks to alter 3-way merging

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