Page MenuHomePhabricator

Clicking on "Remove link" after clicking on a source link does not remove the corresponding target link.
Closed, ResolvedPublic

Description

When you click on a source link the target link card is shown with the "Remove link" option. However, clicking on "Remove link" does not remove the corresponding target link.

Event Timeline

Jsahleen raised the priority of this task from to Needs Triage.
Jsahleen updated the task description. (Show Details)
Jsahleen added subscribers: Aklapper, Jsahleen.
santhosh triaged this task as Normal priority.Jan 7 2015, 4:26 AM
santhosh removed a project: Technical-Debt.
santhosh set Security to None.

@Pginer-WMF. I want to double check with you when the remove link card should be shown.

It obviously should be shown when clicking on a removable target link, but should it also be shown when clicking on a source link? If so, should it only be shown when the selection is inside a removable target link? Or should it be shown whenever there is a corresponding target link?

Thanks.

When you click on a source link you normally expect two cards to be shown (if the article exist in both source and target Wikipedias), depending on the presence of the link in the translation:

  • If the link is not present in the translation, you expect the link to be added. The target link card represents a potential link you can add. Once you add it, the target link card represents the link you just added and it makes sense for the action to become "remove link" in that case (which will operate the target link).
  • If the link is present in the translation, the source and target link is highlighted so you expect the target link card to represent the link in the translation and actions (remove link) to be applied to it. Add another link would be a reasonable usecase, but I think hat need is less frequent.

The behaviour described allows you to start with an empty paragraph, click on a source link to view the target article card and add it to the translation by clicking on "add link". Observe how the link is added and the card turns into "remove link" and click on it to undo what you just did.

Note that the 2nd case conflicts with the support for T85931: It is not possible to add a link to the translation without selecting text and clicking on the source link The solution could be to show "add link" only if there is not already a link in the translation equivalent paragraph (or sentence if we have such info). If there is one, show "remove link" to remove it. Users willing to add another link to the same article will need to select some text first and click the source article instad. If we identify that adding another link without selecting text is an important usecase we may want to add an additional explicit action, but I think this may be an edge case not worth supporting at the moment.

should it only be shown when the selection is inside a removable target link?

I would not make information depend on the cursor position in the target area. Having text selected is a different story as described above since it defined more clearly the intent (turn text into a link).

Change 184427 had a related patch set uploaded (by Jsahleen):
Links: Enable removing target link when clicking on source link

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

Patch-For-Review

The patch ended up being quite simple and fixes an important bit of functionality. We might want to consider including it in the current release.

Change 184427 merged by jenkins-bot:
Links: Enable removing target link when clicking on source link

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

Jsahleen moved this task from In Review to Done on the LE-Sprint-81 board.Jan 13 2015, 10:49 AM
Arrbee closed this task as Resolved.Jan 13 2015, 2:35 PM
Arrbee added a subscriber: Arrbee.
RandomDSdevel updated the task description. (Show Details)Mar 2 2015, 8:34 PM