Page MenuHomePhabricator

Copy/pasting links on Flow has multiple unexpected behaviors
Open, LowestPublic8 Estimated Story Points

Description

If you copy/paste a pre-existing link on Flow, several cases disturbances can happen. I've identified several of them but they don't work every time.

Copy a link

  1. start or reply to a conversation
  2. copy a link from somewhere
  3. paste: impossible to paste it

If you press space before pasting or if you paste is after typing a text, it sometimes works, but you sometimes only have rough text, without links or a blank space inserted.

Copy an username

  1. start or reply to a conversation
  2. copy the username from the Flow post signature
  3. paste: impossible to paste it (a blank is left)

If you press space before pasting or if you paste is after typing a text, it does not work.

Clear a link
You have managed to paste the link with the source link (congrats!)

  1. click on that link
  2. click on the formatting icon F4000648
  3. it is not working

It works when you create the link (select text, click on "link" icon, choose a page and add it).

Event Timeline

Trizek-WMF triaged this task as High priority.EditedMay 12 2016, 1:10 PM

Triaged as High: it is a very basic functionality with a big impact.

It looks like the blank space issue may be the following round-trip issue:

  • User pastes link to https://de.wikipedia.org/wiki/Foo
  • Parsoid html2wt (incorrectly) turns this into [[de:Foo]]
  • Parsoid wt2html (correctly) interprets that as a language link and renders nothing

which sounds like a bug in Parsoid

Should I split that task in sub-tasks?

Should I split that task in sub-tasks?

Yes please.

Checked
Copy a link

  1. Enter the following as wikitext production (tested on frwiki and testwiki). Save.
Internal link: [[Rab]]

Internal link with a name: [[Rab|Rab island]]

External link without a name: [http://www.google.com]

External link with a name: [http://www.google.com Google has the most powerful search engine]
  1. Open another Reply in VE mode and copy from the previously posted text

Nothing will be posted. The error will be displayed.

Uncaught TypeError: Cannot read property 'getType' of undefined
openAnnotation
ve.dm.Converter.static.openAndCloseAnnotations
ve.ce.ContentBranchNode.getRenderedContents
ve.ce.ContentBranchNode.renderContents
ve.ce.ContentBranchNode.onSplice
VeCeBranchNode
VeCeContentBranchNode
VeCeParagraphNode
oo.Factory.create
ve.ce.BranchNode.onSplice
oo.EventEmitter.emit
ve.dm.BranchNode.splice
ve.batchSplice	
ve.dm.Document.rebuildNodes	
ve.dm.DocumentSynchronizer.synchronizers.rebuild	
ve.dm.DocumentSynchronizer.synchronize	
ve.dm.TransactionProcessor.process	
ve.dm.Document.commit	
ve.dm.Surface.changeInternal	
ve.dm.Surface.change
ve.ce.Surface.afterPaste

Checked Copy a username in testwiki and frwiki - copying all kinds of username links/signatures seems to be fine.

The username links formatted as the samples below can be copied/pasted successfully.

[[User:ET70]] 
[[User:Etonkovidova|<bdi>Etonkovidova</bdi>]] 

@[http://en.wikipedia.beta.wmflabs.org/w/index.php?title=User:ET80&action=edit&redlink=1 ET80]
{{FlowMention|Etonkovidova}}

Checked Clear a link

It works when you create the link (select text, click on "link" icon, choose a page and add it).

Seems that it was something special in the format of the link. In regular cases - when the link is formatted e.g. [[Amyannan umsqedac:Issimo 15|Amyannan umsqedac:Issimo 15]] - all options in Edit link are working.

The only interesting thing is - if I copy non-existing link to another reply, e.g. the link which is

<a href="/w/index.php?title=Amyannan_umsqedac:Issimo_15&amp;action=edit&amp;redlink=1" class="new" title="Amyannan umsqedac: Issimo 15" rel="mw:WikiLink" data-parsoid="{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Amyannan_umsqedac:Issimo_15&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;Amyannan umsqedac:Issimo 15&quot;},&quot;dsr&quot;:[0,60,30,2]}"><font><font>Amyannan umsqedac: Issimo 15</font></font></a>

the non-exisiting link gets displayed as an existing link:

<a rel="mw:ExtLink" href="https://fr.wikipedia.org/w/index.php?title=Amyannan_umsqedac:Issimo_15&amp;action=edit&amp;redlink=1" data-parsoid="{&quot;targetOff&quot;:156,&quot;contentOffsets&quot;:[156,184],&quot;dsr&quot;:[62,185,94,1]}" class="external"><font><font class="">Amyannan umsqedac: Issimo 15</font></font></a>

And a user sees it as

Screen Shot 2016-06-10 at 7.14.03 PM.png (168×746 px, 26 KB)

Deskana lowered the priority of this task from High to Lowest.Aug 30 2018, 10:10 AM