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.
|mediawiki/extensions/ContentTranslation : master||Links: Enable removing target link when clicking on source link|
|Open||None||T76456 Language Engineering tracker of trackers (tracking)|
|Open||None||T76449 [Epic] ContentTranslation - Translation view|
|Open||None||T76455 [Epic] ContentTranslation - Link Adaptation|
|Resolved||• Jsahleen||T85928 Clicking on "Remove link" after clicking on a source link does not remove the corresponding target link.|
- Mentioned In
- rMEXT063f8a89a706: Updated mediawiki/extensions Project: mediawiki/extensions/ContentTranslation…
rECTX1866cd55642f: Links: Enable removing target link when clicking on source link
- Mentioned Here
- T85931: It is not possible to add a link to the translation without selecting text and clicking on the source link
@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?
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).