Page MenuHomePhabricator

Improve platform detection to avoid Section Translation to become unusable on wide windows
Closed, ResolvedPublic

Description

As part of T328936, the confirmation step decides whether to use the desktop or mobile editor depending on the platform. However, the device detection seems to be based on screen dimensions which is problematic when trying to use the mobile experience on desktop (e.g., for testing the mobile experience).

I was accessing the mobile version of Test Wikipedia from a desktop device and noticed that when the window was wide it was not possible to start a new translation. It seems that the Confirm dialog is redirecting to the desktop experience but keeping the ".m." in the url results in the dashboard reloading instead of starting the translation:

Note that this does not happen when using a real mobile device or a small window on desktop.
Given that the editor is something that cannot be switched very dynamically (e.g., based on users adjusting the window size in the middle of a translation), we may want to analyze which could be the best approach to determine the device.

For this particular case, I think we could follow a similar approach to the presence (or absence) of the ".m." in the URL. If the user is accessing https://test.m.wikipedia.org/wiki/Special:ContentTranslation the editor to use should be the mobile one. this wold support mobile users but also others on desktop that may want to test the mobile version.

Event Timeline

Pginer-WMF renamed this task from Improve platform detection to avoid Section Translaiton to become unusable on wide windows to Improve platform detection to avoid Section Translation to become unusable on wide windows.Jun 1 2023, 10:02 AM
Pginer-WMF triaged this task as Medium priority.
Pginer-WMF created this task.

Change 929152 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] SX: Improve usability on desktop/large windows

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

Change 929152 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Improve usability on desktop/large windows

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

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

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230626

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

Change 932684 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230626

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

Test Status: QA PASS

using both the Web and mobile view