User:DWalden (WMF)/Copy paste diffs/2021-10-21 dwalden

From mediawiki.org

Charter[edit]

Testing diffs in RTL languages, for https://phabricator.wikimedia.org/T290731.

In particular, I wanted to answer the questions:

  1. Is what is being copied from the diffs correct? What if I copy it to back onto the wiki?
  2. How well does this feature work with edit conflicts?

Coverage[edit]

Browsers Firefox (78)
Languages https://he.wikipedia.beta.wmflabs.org, https://fa.wikipedia.beta.wmflabs.org
Skins Vector (new)
MediaWiki version 1.38.0-alpha (9a7d9c1) 06:09, 21 October 2021

Notes[edit]

I wanted this to be a reasonably stressful test so I picked articles on he and fa beta wikis which were reasonably complicated and wrote a script to randomly modify their wikitext. I hoped to have fairly large and complicated diffs.

After I saved the modified wikitext for an article, I then viewed the diff when comparing the latest revision with the previous revision. I opened the source editor for the same article on a different page and I copied the wikitext from the diff itself into the source editor. I then viewed that diff (by clicking "Show changes"). My hope was that I would see no changes, as the wikitext I copied from the diff is the same as the wikitext saved to the article.

In practice, there were some differences as a certain amount of extra whitespace is picked up when copying from the diff. Notice below the copied wikitext on the left. I have select some text to highlight the fact that extra newlines and tabs are included when you copy from the diff.

I did this for several articles, but found nothing other than the extra newlines and tabs when copying from diffs.

I briefly tested edit conflicts. While editing a page, if another user saves an edit to the page, when you attempt to publish your changes you get the edit conflict interface, which includes a diff. I have no experience with them before, so I am not sure how users use them. I assume that a reasonable use might be using the diff to isolate only the wikitext that is different and copying from there into the source editor.

When doing this there is a certain amount of reformatting that the user will need to do. So far, I have only had to remove extra tabs and newlines. See below for an example.

(Example from fawiki: )

Compare to production (screenshot below) where there is more extra formatting included when copying from the diff.

Production (testwiki)