Page MenuHomePhabricator

Clicking a link in the original panel leaves the editor
Closed, ResolvedPublic

Description

Currently when the user is in the "edit a sentence" step (T251928) to correct the initial machine translation, clicking on a link from the original panel causes the browser to navigate away:

Screenshot 2021-02-16 at 11.36.36 2.png (548×531 px, 92 KB)

In order to better support the exploration of links we can consider one of the options below:

  • Show a preview card for the link at the bottom of the page. Ideally reusing work form Page previews or the Android app equivalent.
  • Open links in a new tab/window if the above is too complicated technically.

Related: T299755: Clicking a link in the reference inspector leaves the editor

Event Timeline

Pginer-WMF created this task.

Wikipedia preview component could be used to support this feature but it would bring an increase of 46.1kb (when minified + gzipped) in size - according to bundlephobia.com -, which is probably not acceptable for this case.

Change 805109 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] Fix: Clicking a link in the original content panel leaves the editor

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

Wikipedia preview component could be used to support this feature but it would bring an increase of 46.1kb (when minified + gzipped) in size - according to bundlephobia.com -, which is probably not acceptable for this case.

I had filed a bug about this long time back - https://github.com/wikimedia/wikipedia-preview/issues/137That libraries bundle size is unreasonabbly high.

In https://gerrit.wikimedia.org/r/805109 I just added target="_blank" to all links in the panel.

Change 805109 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Fix: Clicking a link in the original content panel leaves the editor

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

@santhosh it does seem this is still happening.

Article used: Meningitis
SX Translation: english --> igbo
browser: Google Chrome

See attachment

EChukwukere-WMF changed the task status from Open to In Progress.Jul 1 2022, 4:42 AM

I am going to push this story back to in progress

As demonstrated by the following screencast this issue seems to be currently fixed. The test case is exact the same that Emeka used in the previous screencast. Another issue appears, as the link redirects to an invalid URL but we can create a separate task for this one. Moving this one to "Needs QA" so that it can be verified.

@ngkountas in your video it did open the link in another tab in the browser

I am using a mobile emulator ( it should not matter). It is displayed a preview card for the link ( see attached pic and video), but in your video it is skiping the preview card for the link and then opens in a new tab in the mobile browser.

I want to confirm , that according to the story description, that it is either of both methods ? correct ?

Screen Shot 2022-08-03 at 9.45.58 PM.png (853×1 px, 87 KB)

I want to confirm , that according to the story description, that it is either of both methods ? correct ?

Both cases are different. Links inside the editor show the link card at the bottom to preview or edit them. However, this ticket is focused on those links at the grey panel above the editor. This panel is intended to show the original sentence which can also include links.

As demonstrated by the following screencast this issue seems to be currently fixed. The test case is exact the same that Emeka used in the previous screencast. Another issue appears, as the link redirects to an invalid URL but we can create a separate task for this one. Moving this one to "Needs QA" so that it can be verified.

I created a separate ticket for the issue described: T314558: Links in the original panel lead to the wrong url
Thanks for the clear description and illustrative video!

@Pginer-WMF thanks for that clarification. It does makes sense. I have attached two screens here from chrome and safari

Screen Shot 2022-08-08 at 10.00.53 PM.png (769×472 px, 161 KB)

Screen Shot 2022-08-08 at 10.16.28 PM.png (793×476 px, 104 KB)

moving this to done