CX mobile editor: Action buttons for edited template provide the wrong options
Closed, ResolvedPublicBUG REPORT

Description

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

  1. On mobile, visit CX and select a section with a template to translate. The template must be adaptable to the target language -that's often the case for infoboxes inside lead sections.
  2. Proceed to the mobile editor. Click on the template to select it.
  3. Click on the 'Review and edit the translation' button inside the template translation card at the bottom.
  4. Edit the target template to add/remove/change some of its fields.
  5. Save your changes and go back to the "Pick a sentence" screen.
  6. Click the template that you just translated again, to select it.

What happens?:
The action buttons at the bottom of the screen as still the same "Previous", "Apply", "Skip" buttons, that are used for untranslated templates and sentences. That leads to issues:

  • the "Skip" button should also log the "editor_segment_skip" event and only be used for untranslated segments. If it's just a navigation from translated segments, the "editor_segment_skip" event should not be logged.
  • Even worse, when the user clicks on the "Apply" button -which can also be done accidentally-, all the edits in the target template are reset and the user's effort can be accidentally lost. I don't believe this is intentional here, as there is no design for this functionality, but even if we want to provide a "reset template" option, we should communicate it differently.

What should have happened instead?:
The action buttons below the translated template should be the same as for the translated sentences, as defined in T260128. These are the "Previous" and "Next" buttons.

Screenshot of the proposed action buttons:

Screenshot 2025-06-13 at 10.09.00.png (838×440 px, 187 KB)

Screencast of the problematic behaviour on el wiki:

Derived Requirement

When a user finishes editing a translated template in the Content Translation (CX) mobile editor, the action buttons displayed upon revisiting that template must reflect its translated state. Specifically:

  1. If the template has already been translated, only the "Previous" and "Next" buttons (as defined in T260128) should be shown — not "Apply" or "Skip".
  2. The "Skip" button must be reserved only for untranslated segments and must not be shown when revisiting already translated templates.
  3. The "Apply" button must not reset translated template fields unless explicitly intended by the user (via a clearly labeled reset action).
  4. The system must not log the editor_segment_skip event for already translated segments.
  5. Interaction with previously edited templates must be non-destructive, preserving user edits.
Test Steps

Test Case 1: The action buttons below the translated template should be the same as for the translated sentences

  1. On mobile, visit CX and select a section with a template to translate. The template must be adaptable to the target language -that's often the case for infoboxes inside lead sections.
  2. Proceed to the mobile editor. Click on the template to select it.
  3. Click on the 'Review and edit the translation' button inside the template translation card at the bottom.
  4. Edit the target template to add/remove/change some of its fields.
  5. Save your changes and go back to the "Pick a sentence" screen.
  6. Click the template that you just translated again, to select it.
  7. ✅❓❌⬜ AC1: Confirmed the action buttons below the translated template should be the same as for the translated sentences. These are the "Previous" and "Next" buttons.

QA Results - TestWiki

ACStatusDetails
1T396836#10952510

Event Timeline

ngkountas triaged this task as Medium priority.
ngkountas added a project: ContentTranslation.
ngkountas moved this task from Needs Triage to Translation editor on the ContentTranslation board.

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

[mediawiki/extensions/ContentTranslation@master] CX editor: Use translated segment action buttons for translated template

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

Change #1156735 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX editor: Use translated segment action buttons for translated template

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

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

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

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

Change #1159555 merged by jenkins-bot:

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

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

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

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.6] CX3 Build 1.0.0+20250616

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

Change #1160123 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@wmf/1.45.0-wmf.6] CX3 Build 1.0.0+20250616

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

Mentioned in SAL (#wikimedia-operations) [2025-06-17T14:24:43Z] <sbisson@deploy1003> sbisson: Backport for [[gerrit:1160123|CX3 Build 1.0.0+20250616 (T374695 T395415 T396628 T396711 T396716 T396836)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-06-17T14:33:53Z] <sbisson@deploy1003> Finished scap sync-world: Backport for [[gerrit:1160123|CX3 Build 1.0.0+20250616 (T374695 T395415 T396628 T396711 T396716 T396836)]] (duration: 11m 21s)

@ngkountas Confirmed the action buttons below the translated template should be the same as for the translated sentences, as seen in the gif. These are the "Previous" and "Next" buttons. I will move this to Sign-off. Thanks for all your work!

Test Result - TestWiki

Status: ✅ PASS
Environment: TestWiki
OS: macOS Sequoia 15.5
Browser: Chrome 135
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: The action buttons below the translated template should be the same as for the translated sentences

  1. On mobile, visit CX and select a section with a template to translate. The template must be adaptable to the target language -that's often the case for infoboxes inside lead sections.
  2. Proceed to the mobile editor. Click on the template to select it.
  3. Click on the 'Review and edit the translation' button inside the template translation card at the bottom.
  4. Edit the target template to add/remove/change some of its fields.
  5. Save your changes and go back to the "Pick a sentence" screen.
  6. Click the template that you just translated again, to select it.
  7. AC1: Confirmed the action buttons below the translated template should be the same as for the translated sentences. These are the "Previous" and "Next" buttons.

gif

2025-06-24_16-44-19.mp4.gif (1×572 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.