Page MenuHomePhabricator

Pasted ISBNs should trigger the ISBN typing auto-linking
Closed, ResolvedPublic8 Story Points

Description

In T117165#3105301, @Schnark wrote:

IMHO the behavior got actually worse:

  1. Copy 978-3-642-14564-3
  2. Open a page for editing in VE, type "ISBN ".
  3. Paste the copied ISBN.
  4. Try to get it autolinked.

    Result in 1.29.0-wmf.15: It will get linked if (and only if) you type a space. Result in 1.29.0-alpha: No matter what you do, the ISBN will not be linked. Desired result: It should get linked either directly after you paste it or at least after your next action (whether you type anything or move the cursor or whatever)

If you delete and re-add the last character it works (because it's typed content), but…

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 22 2017, 8:03 PM
Elitre added a subscriber: Elitre.Mar 23 2017, 6:05 PM
matmarex claimed this task.Mar 28 2017, 3:05 PM

Change 345233 had a related patch set uploaded (by Bartosz Dziewoński):
[VisualEditor/VisualEditor@master] ve.ce.Surface: Check sequences after paste

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

This should resolve the specific example. But we still can't autolink ISBNs inside big pasted blocks of text (unless we detect them to be wikitext).

Change 345620 had a related patch set uploaded (by Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Check magic link autolink sequences also after paste

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

Change 345233 had a related patch set uploaded (by Jforrester; owner: Bartosz Dziewoński):
[VisualEditor/VisualEditor@master] ve.ui.Sequences: Allow optional execution after pastes

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

Change 345233 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] ve.ui.Sequences: Allow optional execution after pastes

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

Change 345794 had a related patch set uploaded (by Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (a6c25d08e)

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

Change 345794 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (a6c25d08e)

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

Change 345620 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Check magic link autolink sequences also after paste

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

Jdforrester-WMF closed this task as Resolved.Apr 1 2017, 3:18 PM
Jdforrester-WMF removed a project: Patch-For-Review.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptApr 1 2017, 3:18 PM

This, or something like it (ISBN with number inserted wrapped in nowiki tags) is still happening, even though all of the related bugs appear to be closed. See this April 25, 2017 edit:

https://en.wikipedia.org/w/index.php?title=John_Granger&type=revision&diff=777115220&oldid=777037585

That's probably a case of T162291: Autolinking for URLs and magic links (ISBN etc.) not applied when copy-pasting a block of text. We fixed all the cases where you paste just the ISBN number, but the way we apply "autocorrections" currently can't handle the case where the ISBN is pasted together with other text.