Page MenuHomePhabricator

VisualEditor: Can not paste new link anchor
Closed, ResolvedPublic

Description

If you try to change a link anchor by pasting plain text over the old anchor (or part of the old one), it won't work. The new text will just stay plain.

You can't use the link dialog for this either, since there is no anchor field.


Version: unspecified
Severity: enhancement

Details

Reference
bz48489

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:37 AM
bzimport set Reference to bz48489.

jiabao.foss wrote:

I have investigated this bug. When looking at the use case for pasting text as you insert it into the hyperlink you need to also consider other formatting being pasted in. In other editors you can see that the link also splits leaving the text plain. This is because if you pasted for example a table or a section into the center of a link it cant accept this as part of the link itself and must be split.

The solution I will work on is add a way to edit the displayed hyperlink text while the linkinspector dialog is open. this will allow users to paste box complex links and displayed text when using visualeditor.

Unfortunately this bug didn't get triaged in time, and I worry that you may have spent a lot of time working on a solution for a no-longer-existing problem.

The bug here has to do with pasting into the middle of a link not taking on the proper annotations. This appears to be fixed in master, and production is somewhat behind that.

The solution being offered here ( I9ae4aeed6099cbe9affdc2aa83045121bc0b8669 ) adds a "display text" input to the inspector - but I think this patch overlooks some important UX and technical issues.

We deliberately do not want to have a text field in the inspector for the display text, for a couple of reasons.

  1. The "display text" isn't just plain text, it could include formatting, templates, images, etc. This isn't going to work in a single line text input.
  1. Users already have a way to change the display text (or non-text) content, and if there are bugs there, we should resolve them there.

Yeah, sorry about this; I was behind in triaging bugs and didn't get to this in time. It's in fact actually a duplicate of an already-fixed bug that went out in wmf4 (but isn't yet deployed on enwiki - that will happen on Monday 20 May).

  • This bug has been marked as a duplicate of bug 48195 ***

jiabao.foss wrote:

Sorry that I did not know the link inspector could be rich text. Now looking forward to the new deployment of VE. It will be nice to read the solution, on the problem which I have worked on but did not get a good solution. Thank you for the reviews and explanations. I learned a lot from this attempt. :)

(In reply to comment #4)

Sorry that I did not know the link inspector could be rich text. Now looking
forward to the new deployment of VE. It will be nice to read the solution, on
the problem which I have worked on but did not get a good solution. Thank you
for the reviews and explanations. I learned a lot from this attempt. :)

Thank you for trying! If you want to get your teeth into something in VisualEditor relatively self-contained, but still touching on a considerable amount of the codebase (and which would be really great to have done), bug 47328 could be a good challenge. Will leave a comment there suggesting an approach.

jiabao.foss wrote:

That's very nice of you! I would love to investigate this bug.