Page MenuHomePhabricator

Custom translation suggestions: Direct access to filtered suggestions
Closed, ResolvedPublic

Description

As part of the work to support Custom translation suggestions (T113257), users are able to apply filters to find topics that are relevant to their interests. This ticket proposes to make it possible to keep and share their selection, and avoiding the selection to go away accidentally as the user navigates. Below, you can find more details on

Keep and share

As topics are selected by a user to adjust their suggestions, that topic selection should become part of the URL parameters. This will allow the integration of external tools, linking from wiki pages (such as wiki projects or campaigns), bookmarking, sharing and other ways to keep track of specific knowledge gaps. For example, a wiki page for a campaign about art, should be able to provide a link where users land in Content Translation with the suggestions filtered to show art topics.

Even if the default view for the Dashboard currently is to show in-progress translation (when they are available), the selection of topics will lead users directly to the suggestions view instead.

Persistence
In addition, switching through the dashboard views (Suggestions, In-progress, and Published) should keep the adjustments made for the suggestions. There is not a strong requirement to persist the selected suggestions over a long period of time, so simple technical solutions can be considered to support the persistence requirements.

Additional considerations

  • Initially a simple approach for topic selection (T368422) is proposed where users can pick us one topic, future improvements will support multi-selection. The approach for this ticket should be compatible with the future multi-selection. That is, it should be possible to encode in the url multiple selection, lists etc.

Event Timeline

Pginer-WMF renamed this task from Direct access to filtered suggestions to Custom translation suggestions: Direct access to filtered suggestions.Jul 15 2024, 12:56 PM

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

[mediawiki/extensions/ContentTranslation@master] Unified dashboard: Use URL params as state for suggestions filter

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

Change #1073285 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] Unified dashboard: Use URL params as state for suggestions filter

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

This ticket proposes for URLs to work in both directions:

  1. When changing filters in the UI the URL should be updated so that the resulting URL can be shared as direct access. This does not work currently (more details below).
  2. Adding a parameter to the URL should lead the browser to the filtered view of suggestions. This, I could not test since I don't know which parameter to add to the url.

Regarding 1, in the screenshot blow it can be seen how the "Arts" filter is selected. However, the url does not include any parameter related to the filter:

Screenshot 2024-10-10 at 10.48.55.png (485×941 px, 78 KB)

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

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

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

Change #1079550 merged by jenkins-bot:

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

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

The filtering is reflected in the URL in both directions: a url providing access to a specific filter, and any change of filters resulting in the URL to be updated.

Screenshot 2024-10-25 at 09.58.17.png (865×1 px, 173 KB)

The processing of the URL seems not to be very flexible with issues in the parameters. Given that campaign organizers may be creating some of these URLs, and ORES topics may change, we may want to make sure that a broken URL does not lead to a broken tool. I created a follow-up ticket in T378172: Incomplete URLs for Custom translation suggestions do not fail gracefully