Page MenuHomePhabricator

Adjust custom and default access to views in the translation dashboard
Closed, ResolvedPublic

Description

The unified translation dashboard deviates form the current desktop dashboard in the way it deals with the access to the different views (suggestions, in-progress and published). This ticket proposes adjusting the following aspects:

  • Default view. Currently the default of the unified dashboard is always the "Suggestions" view. This is expected when there are no in-progress translations for the user. However, if there are in-progress translations, the default view should be the "In-progress" view.
  • Reach a specific view from the url. Currently it is not possible to link to a specific view in the unified dashboard. Like the desktop version, it should be possible to link to specific views, and switching views should be reflected in the url. Ideally this should be supported using the same hash parameters (#suggestions, #draft, and #published) to avoid breaking existing bookmarks and external tool integrations.

Event Timeline

ngkountas changed the task status from Open to In Progress.Dec 13 2023, 8:17 AM
ngkountas claimed this task.

Sadly, because of the fact that Unified Dashboard uses Vue Router with "hash" history mode, we cannot use URL hash to indicate the active dashboard list. We'll use a URL parameter instead (e.g. ?active-list=draft).

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

[mediawiki/extensions/ContentTranslation@master] Add composable to properly set the default active dashboard list

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

Change 982791 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Add composable to properly set the default active dashboard list

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

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

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0 20231218

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

Change 983678 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0 20231218

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

This task can be considered as done as proved by the screencast below. As one can see, if no active-list URL parameter is provided, the "in-progress" list will be displayed by default, if in-progress translations exist (and the active-list URL param will be set to draft). When a different list is selected (e.g. published), the active-list URL param is updated to the corresponding value, and if the page is refreshed, the list is properly initialized to the previously selected list.