Page MenuHomePhabricator

CX: Two translate buttons are displayed in "Compare contents" step
Open, In Progress, LowPublic2 Estimated Story PointsBUG REPORT

Description

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

  1. Switch to mobile mode (dev tools) and select a tablet screen.
  2. From the unified dashboard select an article to expand by translating a new section.
  3. Pick a section to translate and proceed to the "Compare contents" step

What happens?:
Two "Translate" buttons are displayed (one with "Translate this section" and one with "Translate" label).

What should have happened instead?:
The second one ("Translate") should not be displayed, until the user scrolls to the content header.

Screenshot from bn production wiki:

bn.wikipedia.org_w_index.php_title=%E0%A6%AC%E0%A6%BF%E0%A6%B6%E0%A7%87%E0%A6%B7_%E0%A6%AC%E0%A6%BF%E0%A6%B7%E0%A6%AF%E0%A6%BC%E0%A6%AC%E0%A6%B8%E0%A7%8D%E0%A6%A4%E0%A7%81_%E0%A6%85%E0%A6%A8%E0%A7%81%E0%A6%AC%E0%A6%BE%E0%A6%A6&active-list=s.png (1×768 px, 241 KB)


Derived Requirement

Ensure that in the "Compare contents" step of translating a section, only one 'Translate' button is visible initially. The second 'Translate' button should appear only when the user scrolls to the content header.

Test Result - Beta|Prod

Status: ✅ PASS / ❓ Need More Info / ❌ FAIL
Environment: beta/bnwiki
OS: macOS Tahoe 26.2
Browser: Chrome 143
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure only one 'Translate' button is visible initially in "Compare contents" step

  1. Open Wikipedia in desktop Chrome.
  2. Switch to mobile view using Dev Tools and select a tablet screen size.
  3. Navigate to the Unified Dashboard.
  4. Select an article and choose to translate a new section.
  5. Proceed to the "Compare contents" step.
  6. ✅❓❌⬜ AC1: Only one 'Translate' button ('Translate this section') is visible initially; the second 'Translate' button is not displayed.

Test Case 2: Ensure second 'Translate' button appears after scrolling to content header

  1. From the "Compare contents" step, scroll down to the content header.
  2. ✅❓❌⬜ AC2: The second 'Translate' button becomes visible once the user scrolls to the content header.

QA Results - TestWiki

ACStatusDetails
1T413258#11546296
2T413258#11608762

Event Timeline

ngkountas changed the task status from Open to In Progress.Dec 19 2025, 6:36 PM
ngkountas triaged this task as Low priority.
ngkountas moved this task from Incoming to In-progress on the LPL Hypothesis board.
ngkountas set the point value for this task to 2.

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

[mediawiki/extensions/ContentTranslation@master] Compare contents: Always hide secondary "Translate" button on route load

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

Change #1219958 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Compare contents: Always hide secondary "Translate" button on route load

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

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

[mediawiki/extensions/ContentTranslation@master] Redirect to desktop editor: Include target title URL param if available

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

Change #1224783 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Redirect to desktop editor: Include target title URL param if available

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

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

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

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

Change #1225595 merged by jenkins-bot:

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

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

@ngkountas Please review AC2, thanks!

Test Result - Test Wiki

Status: ✅ PASS / ❌ FAIL
Environment: Test Wiki
OS: macOS Tahoe 26.2
Browser: Chrome 143
Device: MBA
Emulated Device: iPhone 14 pro max, iPad Mini

Test Artifact(s):

Test Steps

Test Case 1: Ensure only one 'Translate' button is visible initially in "Compare contents" step

  1. Open Wikipedia in desktop Chrome.
  2. Switch to mobile view using Dev Tools and select a tablet screen size.
  3. Navigate to the Unified Dashboard.
  4. Select an article and choose to translate a new section.
  5. Proceed to the "Compare contents" step.
  6. AC1: Only one 'Translate' button ('Translate this section') is visible initially; the second 'Translate' button is not displayed.
DesktopMobileMobile- NominationiPad Mini

Test Case 2: Ensure second 'Translate' button appears after scrolling to content header

  1. From the "Compare contents" step, scroll down to the content header.
  2. AC2: The second 'Translate' button becomes visible once the user scrolls to the content header.

Translate does not appear when you scroll on mobile as it does on Desktop and Tablet
See AC1

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

[mediawiki/extensions/ContentTranslation@master] CX compare contents: Fix intersection observer for mobile

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

Change #1233185 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX compare contents: Fix intersection observer for mobile

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

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

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

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

Change #1233234 merged by jenkins-bot:

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

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

@ngkountas Translate now appears in Mobile as seen in the video below. I will move this to Sign-off. Thanks for all your work!

Test Case 2: Ensure second 'Translate' button appears after scrolling to content header

From the "Compare contents" step, scroll down to the content header.
❌ AC2: The second 'Translate' button becomes visible once the user scrolls to the content header.

Translate does not appear when you scroll on mobile as it does on Desktop and Tablet


Mobile now works correctly

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