Page MenuHomePhabricator

New Translation: Responsive adaptations for larger screens
Closed, ResolvedPublic

Assigned To
Authored By
Pginer-WMF
Jun 10 2021, 12:30 PM
Referenced Files
F58954487: 2025-03-31_13-49-46.png
Mar 31 2025, 9:13 PM
F58954485: 2025-03-31_13-50-21.png
Mar 31 2025, 9:13 PM
F58954483: 2025-03-31_13-50-47.png
Mar 31 2025, 9:13 PM
F58953726: 2025-03-31_12-08-24.png
Mar 31 2025, 9:13 PM
F58953722: 2025-03-31_11-55-41.png
Mar 31 2025, 9:13 PM
F58953716: 2025-03-31_12-09-59.png
Mar 31 2025, 9:13 PM
F58936269: image.png
Mar 28 2025, 4:44 PM
F58936255: image.png
Mar 28 2025, 4:44 PM

Description

In Section Translation the process to start a new translation (T241590) involves the steps of search and confirmation. These are currently supported on mobile but on wider screens their elements become too far apart. This ticket proposes to make responsive adjustments to better adapt the UI to wider screens by following the same responsive column pattern used in the dashboard, which naturally constrains content width on larger screens while maintaining consistency across the application.

Layout

  • On mobile: Takes full width(col-12)
  • On tablet: Content constrained to 75% width(col-tablet-9)
  • On desktop: Content further constrained to ~58% width(col-desktop-7)
  • Components maintain consistent layout across all views:
    • Article title and image
    • Language selector
    • Translation options
    • License & Terms
  • Close(X) button returns to dashboard.
  • When starting new translation("New translation" button ----> search ------> select article):
    • Use same responsive column approach

Spacing

  • Add 'margin-block-start: 76px' to the confirmation screen to maintain visual consistency with the dashboard view.
    • This spacing compensates for the dashboard elements(blue button, title, and filters)
Section 1.png (921×1 px, 492 KB)

In addition, for desktop (when it leads to Content Translation), the option for translating the whole article (overwriting the existing one) will still be provided:

New translation - Confirm desktop.png (768×1 px, 347 KB)

Derived Requirements

  1. Responsive Layout Adjustments for New Translation Flow
    • Mobile (col-12): Full-width layout for search and confirmation steps.
    • Tablet (col-tablet-9): Content constrained to 75% width for better readability.
    • Desktop (col-desktop-7): Content constrained to ~58% width to match dashboard layout.
  1. Consistent Component Layout
    • Ensure uniform positioning of the following elements across all views:
      • Article title & image
      • Language selector
      • Translation options
      • License & Terms
      • Close (X) button, which should return to the dashboard.
  1. Spacing Adjustments for Consistency
    • Add 'margin-block-start: 76px' to the confirmation screen to align with the dashboard view.
    • Maintain spacing consistency across different screen sizes.
  1. Desktop-Specific Adjustments
    • On desktop, when transitioning to Content Translation, the option to translate the entire article (overwriting the existing one) should still be provided.
Test Steps

Test Case: Responsive Layout Adaptations for New Translation Flow

  1. Mobile View
    • Open the unified dashboard on mobile.
    • Tap "New translation" and proceed to the search step.
    • ✅❓❌⬜ AC1: Verify that the search and confirmation steps take full width (col-12).
  1. Tablet View
    • Open the dashboard on a tablet-sized screen.
    • Tap "New translation" and proceed through the flow.
    • ✅❓❌⬜ AC2: Confirm that content is constrained to 75% width (col-tablet-9).
  1. Desktop View
    • Open the dashboard on a desktop screen.
    • Tap "New translation" and proceed to the confirmation step.
    • ✅❓❌⬜ AC3: Ensure that content is constrained to ~58% width (col-desktop-7).
    • ✅❓❌⬜ AC4: Verify that the "Translate whole article" option is available when transitioning to Content Translation.
  1. Spacing Consistency
    • ✅❓❌⬜ AC5: Check that 'margin-block-start: 76px' is applied to the confirmation screen to maintain alignment with the dashboard.
  1. Component Layout & Navigation
    • ✅❓❌⬜ AC6: Ensure that all key elements (title, image, language selector, translation options, license & terms, and close button) maintain consistent positioning across all screen sizes.
    • ✅❓❌⬜ AC7: Verify that clicking the Close (X) button correctly returns to the dashboard.

QA Results - Test Wiki

Event Timeline

Pginer-WMF triaged this task as Medium priority.

A couple of things to please confirm:

  • Should the confirmation step be presented in a modal dialog everywhere it is currently used? There are several places, including the favorites list, both page and section suggestions, the search view, etc. I believe it should for consistency but would like to clarify
  • There are a couple of overlays we already use with a lighter color (see images below). Should the desktop overlay for this confirmation modal have the same appearance for consistency?
image.png (1×2 px, 487 KB)
image.png (1×2 px, 430 KB)

Thanks

A couple of things to please confirm:

  • Should the confirmation step be presented in a modal dialog everywhere it is currently used? There are several places, including the favorites list, both page and section suggestions, the search view, etc. I believe it should for consistency but would like to clarify

Yes. Presenting this step in a dialog form prevents content to become too wide. It makes sense to apply this approach independently of where the user came to it.

  • There are a couple of overlays we already use with a lighter color (see images below). Should the desktop overlay for this confirmation modal have the same appearance for consistency?

Makes sense to start by using the standard overlays for consistency. If we observe a need to use something different (in general or particular cases) we can consider it later.

Change #1113534 had a related patch set uploaded (by Eamedina; author: Eamedina):

[mediawiki/extensions/ContentTranslation@master] Responsive adaptation for larger screens: confirmer dialog (Codex)

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

After working on this and exploring a couple of dialog options (our own UI lib dialog and the Codex dialog), we've discovered a few unintended consequences that we need to address and make a decision about:

  • There at least two other dialogs that can be currently displayed from within the confirmer view, shown below. This would lead to the (presumably) undesired behavior of displaying one dialog (confirmer) and then another dialog (either of the two below).
  • My understanding is there are external entry points that land on confirmer view, we need to decide how to handle such cases if the confirmer is constrained to a dialog.
UnreviewedTranslationDialogSxConfirmTranslationStartDialog
image.png (850×1 px, 353 KB)
image.png (1×1 px, 226 KB)

Having said the above, I'm curious to understand a bit more about the motivation behind this ticket. If the main issue is content becoming too wide or too far apart in wider screens, have we considered using CSS to avoid the wide gaps but without introducing the dialog and replacing the view?

Having said the above, I'm curious to understand a bit more about the motivation behind this ticket. If the main issue is content becoming too wide or too far apart in wider screens, have we considered using CSS to avoid the wide gaps but without introducing the dialog and replacing the view?

The main motivation is about making the best use of the available space. On desktop, the elements become too stretched, making the visual hierarchy harder to process.
We can consider options that achieve this while avoiding the complications of using a dialog. One option that was considered recently was to show this step as part of a container in the page with limited width.

@Pginer-WMF Until we conclude to a specific design, should we consider this task as stalled?

@Pginer-WMF Until we conclude to a specific design, should we consider this task as stalled?

Yes. I think it may be better to clarify the different details first. Checking that the approach works well when transitioning form both the previous dashboard steps and when landing from the outside (direct or entry points).

Thank you Pau! I guess we can move it back to the "Priority backlog" for now. Leaving this to @eamedina

Change #1113534 abandoned by Eamedina:

[mediawiki/extensions/ContentTranslation@master] Responsive adaptation for larger screens: confirmer dialog (Codex)

Reason:

Alternative design approach requested

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

ngkountas renamed this task from New translation: Responsive adaptations for larger screens to Confirm translation: Responsive adaptations for larger screens.Feb 17 2025, 8:15 PM

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

[mediawiki/extensions/ContentTranslation@master] Confirm translation: Make step responsive for larger screens

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

ngkountas renamed this task from Confirm translation: Responsive adaptations for larger screens to New Translation: Responsive adaptations for larger screens.Feb 18 2025, 1:55 PM

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

[mediawiki/extensions/ContentTranslation@master] Search for an article: Make step responsive for larger screens

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

Change #1120482 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Confirm translation: Make step responsive for larger screens

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

Change #1120555 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Search for an article: Make step responsive for larger screens

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

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

[mediawiki/extensions/ContentTranslation@master] Confirm a translation: Fix background color for mobile screens

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

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

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

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

Change #1122111 merged by jenkins-bot:

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

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

@eamedina Please review my findings below, thanks! Also, I don't see the overlay with overlay on desktop that says Base20 (#54595D) Opacity: 85%.

Test Result - TestWiki

Status: ❓Need More Info / ❌ FAIL
Environment: TestWiki
OS: macOS Sonoma 15.3.1
Browser: Chrome 133
Device: MacBook Air

Test Artifact(s):

Test Steps

Test Case: Responsive Layout Adaptations for New Translation Flow

  1. Mobile View
    • Open the unified dashboard on mobile.
    • Tap "New translation" and proceed to the search step.
    • AC1: Verify that the search and confirmation steps take full width (col-12).

2025-03-04_15-25-23.png (1×1 px, 275 KB)

  1. Tablet View
    • Open the dashboard on a tablet-sized screen.
    • Tap "New translation" and proceed through the flow.
    • AC2: Confirm that content is constrained to 75% width (col-tablet-9).

Why is this crossed out unlike the others?

2025-03-04_15-28-08.png (1×1 px, 289 KB)

  1. Desktop View
    • Open the dashboard on a desktop screen.
    • Tap "New translation" and proceed to the confirmation step.
    • AC3: Ensure that content is constrained to ~58% width (col-desktop-7).

Is it ok being 58.3333333%

2025-03-04_15-23-38.png (1×1 px, 358 KB)

  • ✅*AC4:** Verify that the when starting new translation("New translation" button ----> search ------> select article):

Use same responsive column approach

2025-03-04_16-07-34.mp4.gif (916×1 px, 2 MB)

  1. Spacing Consistency
    • AC5: Check that 'margin-block-start: 76px' is applied to the confirmation screen to maintain alignment with the dashboard.

Where else can I find 76px?

2025-03-04_15-42-09.png (1×1 px, 615 KB)

  1. Component Layout & Navigation
    • AC6: Ensure that all key elements (title, image, language selector, translation options, license & terms, and close button) maintain consistent positioning across all screen sizes.

Should mobile have the same options as desktop and tablet?

DesktopTabletMobile
2025-03-04_16-17-19.png (753×772 px, 238 KB)
2025-03-04_16-16-48.png (748×552 px, 85 KB)
2025-03-04_16-17-02.png (559×651 px, 77 KB)
  • AC7: Verify that clicking the Close (X) button correctly returns to the dashboard.
DesktopTabletMobile
2025-03-04_16-11-42.mp4.gif (912×918 px, 1 MB)
2025-03-04_16-15-06.mp4.gif (756×616 px, 423 KB)
2025-03-04_16-13-24.mp4.gif (644×576 px, 1 MB)

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

[mediawiki/extensions/ContentTranslation@master] Fix paddings for CX header

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

Change #1124714 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX: Fix header and main panel paddings

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

Change #1128494 had a related patch set uploaded (by Eamedina; author: Eamedina):

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

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

Change #1128494 merged by jenkins-bot:

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

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

@ngkountas I'm not sure what was changed from the ones below since they looked the same as the previous screenshots.

  1. Tablet View
      • Open the dashboard on a tablet-sized screen.
    • Tap "New translation" and proceed through the flow. > - ❓AC2: Confirm that content is constrained to 75% width (col-tablet-9).

Why is this crossed out unlike the others?

2025-03-04_15-28-08.png (1×1 px, 289 KB)

  1. Desktop View
    • Open the dashboard on a desktop screen.
    • Tap "New translation" and proceed to the confirmation step.
    • AC3: Ensure that content is constrained to ~58% width (col-desktop-7).

Is it ok being 58.3333333%

2025-03-04_15-23-38.png (1×1 px, 358 KB)

I'm not sure if anything changed compared to what I had before as seen in the screenshots.
https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&filter-id=Wiki%20Loves%20Ramadan%202025%2FLandmarks%201&filter-type=collections&from=es&to=it&page=Sluishuis#/sx

TabletDesktop
2025-03-25_14-04-47.png (1×1 px, 210 KB)
2025-03-25_14-06-03.png (1×1 px, 300 KB)
  1. Spacing Consistency
    • AC5: Check that 'margin-block-start: 76px' is applied to the confirmation screen to maintain alignment with the dashboard.

Where else can I find 76px?

2025-03-04_15-42-09.png (1×1 px, 615 KB)

I'm not sure if anything changed compared to what I had before as seen in the screenshots.
https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&filter-id=Wiki%20Loves%20Ramadan%202025%2FLandmarks%201&filter-type=collections&from=es&to=it&page=Premios%20Ignotus#/sx

2025-03-25_14-07-40.png (1×1 px, 556 KB)

  1. Component Layout & Navigation
    • AC6: Ensure that all key elements (title, image, language selector, translation options, license & terms, and close button) maintain consistent positioning across all screen sizes.

Should mobile have the same options as desktop and tablet?

DesktopTabletMobile
2025-03-04_16-17-19.png (753×772 px, 238 KB)
2025-03-04_16-16-48.png (748×552 px, 85 KB)
2025-03-04_16-17-02.png (559×651 px, 77 KB)

I'm not sure if anything changed compared to what I had before as seen in the screenshots.
https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&filter-id=Wiki%20Loves%20Ramadan%202025%2FLandmarks%201&filter-type=collections&from=es&page=Ingrid%20Garc%C3%ADa-Jonsson&to=it#/sx

2025-03-25_14-08-50.png (609×1 px, 88 KB)

@GMikesell-WMF you may want to re-test this task.

AC2

As mentioned in a slack thread, regarding AC2, spacing looks good on my end (tested on test.wikipedia.org and Chrome browser), with the main panel occupying the 75% of the screen width in both "Search for an article" and "Confirm a translation" step:

image.png (1×1 px, 263 KB)
image.png (1×1 px, 398 KB)

@eamedina also verifies that it tests well on his end:

image.png (1×2 px, 206 KB)
AC3

Regaring AC3, it's perfectly ok for the content to be contrained to 58.333% of the screen width. In fact, col-7 means 7/12 of the total width which equal with 0.58333.

AC5

This can now be ignored as this requirement is no longer in place. You can see that the corresponding segment in task description is now crossed out.

AC6

Options on mobile should be different than the options on tablet/desktop devices. You can also check the epic task about this step (T241590) for more details.

@ngkountas Thanks for the info! @eamedina Confirmed New Translation: Responsive adaptations for larger screens, as seen in the screenshots below. I will move this to sign-off. Thanks for all your work!

Test Result - TestWiki

Status: ✅ PASS
Environment: TestWiki
OS: macOS Sonoma 15.3.1
Browser: Chrome 133
Device: MacBook Air

Test Artifact(s):

Test Steps

Test Case: Responsive Layout Adaptations for New Translation Flow

  1. Mobile View
    • Open the unified dashboard on mobile.
    • Tap "New translation" and proceed to the search step.
    • AC1: Verify that the search and confirmation steps take full width (col-12).

2025-03-31_12-09-59.png (811×877 px, 145 KB)

  1. Tablet View
    • Open the dashboard on a tablet-sized screen.
    • Tap "New translation" and proceed through the flow.
    • AC2: Confirm that content is constrained to 75% width (col-tablet-9).

2025-03-31_11-55-41.png (841×1 px, 161 KB)

  1. Desktop View
    • Open the dashboard on a desktop screen.
    • Tap "New translation" and proceed to the confirmation step.
    • AC3: Ensure that content is constrained to ~58% width (col-desktop-7).

2025-03-31_12-08-24.png (843×1 px, 231 KB)

  • ✅*AC4:** Verify that the when starting new translation("New translation" button ----> search ------> select article):

Use same responsive column approach

2025-03-04_16-07-34.mp4.gif (916×1 px, 2 MB)

  1. Spacing Consistency
    • ⬜  AC5: Check that 'margin-block-start: 76px' is applied to the confirmation screen to maintain alignment with the dashboard.

N/a via T284741#10686964

  1. Component Layout & Navigation
    • AC6: Ensure that all key elements (title, image, language selector, translation options, license & terms, and close button) maintain consistent positioning across all screen sizes.
DesktopTabletMobile
2025-03-31_13-50-47.png (778×1 px, 355 KB)
2025-03-31_13-50-21.png (635×946 px, 213 KB)
2025-03-31_13-49-46.png (770×830 px, 285 KB)

AC7: Verify that clicking the Close (X) button correctly returns to the dashboard.

DesktopTabletMobile
2025-03-04_16-11-42.mp4.gif (912×918 px, 1 MB)
2025-03-04_16-15-06.mp4.gif (756×616 px, 423 KB)
2025-03-04_16-13-24.mp4.gif (644×576 px, 1 MB)
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from Needs QA to Design Signoff on the LPL Hypothesis board.