Page MenuHomePhabricator

Inconsistent Navigation Behavior When Exiting "Select Section to Translate"
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
GMikesell-WMF
Mar 5 2025, 4:46 PM
Referenced Files
F62304580: 2025-06-12_08-41-54.mp4.gif
Jun 12 2025, 4:59 PM
F62304645: 2025-06-12_09-58-35.mp4.gif
Jun 12 2025, 4:59 PM
F62304578: 2025-06-12_08-41-00.mp4.gif
Jun 12 2025, 4:59 PM
F62304576: 2025-06-12_08-40-21.mp4.gif
Jun 12 2025, 4:59 PM
F59014499: Petit Crater.png
Apr 8 2025, 1:14 PM
F59014494: Petit Crater Content Translation.png
Apr 8 2025, 1:14 PM
F59014525: Petit Crater Content Translation (1).png
Apr 8 2025, 1:14 PM
F58613343: 2025-03-04_15-09-51.mp4.gif
Mar 5 2025, 4:46 PM

Description

Steps to replicate the issue (include links if applicable):

  1. Go to the Content Translation tool.
  2. In Suggestions, select an article in new sections
  3. Select an article and click "New translation".
  4. Click the back button, than "X" (close) button.
  5. Observe that the user is redirected to the Suggestion screen.
  6. Now go back to the same article and now choose "Select section to translate".
  7. Click the back button, than "X" (close) button.
  8. Observe that the user is redirected back to the section selection screen instead of the Suggestion screen.

What happens?:
"Select section to translate" incorrectly returns the user to the section selection screen instead of the Suggestion screen.

What should have happened instead?:
Exiting from both "New translation" and "Select section to translate" should consistently navigate the user back to the Suggestion screen.

Other information (browser name/version, screenshots, etc.):

2025-03-04_15-09-51.mp4.gif (966×1 px, 1 MB)

Derived Requirement

Ensure consistent navigation behavior when exiting from the "New translation" and "Select section to translate" flows so that the user is always redirected to the Suggestion screen after clicking the back or "X" (close) button.

Test Steps

Test Case 1: Ensure exiting "Select section to translate" also redirects to Suggestion screen

  1. Go to Special:ContentTranslation on beta.
  2. In the Suggestions tab, select a new article suggestion.
  3. Click Select section to translate.
  4. On the section picker screen, click the browser Back button.
  5. Click the X (close) button at the top right.
  6. ✅❓❌⬜ AC1: Verify that you are returned to the Suggestion screen, not the section picker.

QA Results - Test Wiki

ACStatusDetails
1T388031#10910387

Event Timeline

Reedy renamed this task from Inconsistent Navigation Behavior When Exiting "Select Section to Translate to Inconsistent Navigation Behavior When Exiting "Select Section to Translate".Mar 5 2025, 10:56 PM
Reedy updated the task description. (Show Details)
PWaigi-WMF moved this task from Backlog to Prioritized on the LPL Hypothesis board.

@GMikesell-WMF I tried replicating this but I wasn't able to: https://imgur.com/a/gVfI6Nt

Could you please confirm if you're still able to replicate? Thanks

I can reproduce it

On "Select section to translate" PageClick "back" button, back to "New translation" PageClick "X" button, back to Suggestion screen
Petit Crater Content Translation (1).png (1×750 px, 116 KB)
Petit Crater Content Translation.png (1×750 px, 277 KB)
Petit Crater.png (1×750 px, 204 KB)

@hueitan the sequence in your screenshots in the right behavior, not the issue reported here.

It turns out this was fixed by accident in the patch for T386344: Redirect to the target wiki when accessing the editor

The line in router.beforeEach that stores the previous route in the application store ended up too low in the function so it's not running in most cases. It does fix this bug because now the confirm step always assumes it is coming from an external endpoint (because there is no previous route) so it redirects to the dashboard.

However, previous route being now empty i a problem for useDashboardOpenInstrument.js. It uses it to assign the event source, which is now always direct as far as I can tell. The "previous route" is also used in useEditorInstrument.js to decide whether to log a new editor_open event, which sould not be done when coming back to the editor from a view with a higher workflowStep. I suspect this is also broken.

In terms of this very task, is there any scenarios where the confirm screen close button should go to the "previous route" instead of the dashboard? From article search maybe?

I've submitted a patch to the first the new instrumentation issues mentioned above and captured in T391500 and T391502. If/when that patch gets merged, the original navigation issue described in this task will be reproducible again.

Change #1151275 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SXTranslationConfirmer: Go back to "dashboard" when invalid target route

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

Change #1151275 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SXTranslationConfirmer: Go back to "dashboard" when invalid target route

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

Change #1151295 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SXTranslationConfirmer: Go back to "dashboard" when invalid target route

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

Change #1151295 abandoned by Nik Gkountas:

[mediawiki/extensions/ContentTranslation@master] SXTranslationConfirmer: Go back to "dashboard" when invalid target route

Reason:

Wrong patch

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

Change #1152798 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250602

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

Change #1152798 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 1.0.0+20250602

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

@ngkountas For the actual issue regarding the task, it is verified that you are returned to the Suggestion screen, not the section picker as seen in the gifs below. I will move this to Sign-off. I did notice that "New translation" acts differently, as seen in the side issue below. Please let me know if you want me to create a different task or not. Other than that, thanks for all your work!

Test Result - Test Wiki

Status: ✅ PASS
Environment: Test Wiki
OS: macOS Sequoia 15.5
Browser: Chrome 136
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&campaign=specialcx&cx-dashboard=desktop&filter-id=previous-edits&filter-type=automatic&from=en&to=cs&page=Pelvic%20inflammatory%20disease#/sx

Test Steps

Test Case 1: Ensure exiting "Select section to translate" also redirects to Suggestion screen

  1. Go to Special:ContentTranslation on beta.
  2. In the Suggestions tab, select a new article suggestion.
  3. Click Select section to translate.
  4. On the section picker screen, click the browser Back button.
  5. Click the X (close) button at the top right.
  6. AC1: Verify that you are returned to the Suggestion screen, not the section picker.
BrowserRight ClickMobile
2025-06-12_08-40-21.mp4.gif (1×1 px, 1 MB)
2025-06-12_08-41-00.mp4.gif (996×1 px, 1 MB)
2025-06-12_09-58-35.mp4.gif (992×1 px, 1 MB)

❌ Side Issue
Ensure exiting "New translation" redirects to Suggestion screen

  1. Repeat same steps from above 1-5 but select "New translation"
  2. Verify that you are returned to the Suggestion screen.

2025-06-12_08-41-54.mp4.gif (996×1 px, 3 MB)

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.