Page MenuHomePhabricator

Support basic topic & community-defined translation collections with the current Recommendation API
Closed, ResolvedPublic

Description

This task covers 3 use-cases defined under T367873 that would support the MVP versions of T368422 and T368718.

This exploration will consider approaches to, given a language pair, find articles to (a) create and (b) expand with a new section in the following cases:

  • Find articles related to a given topic area from "articletopic:" search.
  • Find articles in the intersection of two or more topic areas
  • Find articles that are part of active campaigns.
Test Steps
  1. Filter status. Showing at the suggestions list which is the active filter and options to change it.
  2. Adjust suggestions view. A view listing topic areas in different categories for the user to pick.
  3. ✅ ❓❌⬜AC1 :T368422: Custom translation suggestions: Basic topic selection

2024-11-12_15-09-21.mp4.gif (880×430 px, 1 MB)

Test Case 2: Ensure Search for Articles in the Intersection of Multiple Topic Areas Works

Make a request to the Recommendation API with multiple articletopic:<topic> queries for a specific language pair.
Verify that the API returns articles that intersect the specified topics.
✅❓❌⬜ AC2: Confirm that the API correctly returns articles that are part of the intersection of multiple topic areas.

QA Results - Test Mobile ContentTranslation

ACStatusDetails
1T373961#10314998
2T373961#10318963

Event Timeline

PWaigi-WMF changed the task status from Open to In Progress.Sep 4 2024, 5:43 AM
PWaigi-WMF assigned this task to santhosh.
PWaigi-WMF triaged this task as Medium priority.
PWaigi-WMF moved this task from Backlog to Needs QA on the LPL Hypothesis board.
PWaigi-WMF renamed this task from Support basic topic & community-defined list suggestions with the current Recommendation API to Support basic topic & community-defined translation collections with the current Recommendation API.Oct 31 2024, 2:51 PM

@GMikesell-WMF From a QA perspective, this task is possibly best tested via the UI, which would be done in the context of T368422: Custom translation suggestions: Basic topic selection and T368718: Community-defined Translation Collections: Single selection mode UI. If you want to test the API directly, there is interactive documentation where you can request translation recommendations based on source/target languages and other parameters.

Regardless of the specific testing being done, I would like to keep this task open until the features mentioned above have been stable in production for a few weeks. It's already the case for the first one. The second one is scheduled to be released next week.

Status: ✅ PASS
Environment: Test Special:ContentTranslation
OS: macOS Sonoma 15.0
Browser: Chrome 130
Device: MBA
Emulated Device: NA

Test Artifact(s):

https://test.m.wikipedia.org/w/index.php?title=Special:ContentTranslation&active-list=suggestions&from=es&to=en&filter-type=topic&filter-id=art

Test Steps
  1. Filter status. Showing at the suggestions list which is the active filter and options to change it.
  2. Adjust suggestions view. A view listing topic areas in different categories for the user to pick.
  3. ✅ AC1 :T368422: Custom translation suggestions: Basic topic selection

2024-11-12_15-09-21.mp4.gif (880×430 px, 1 MB)

✅ AC2: T368718: Community-defined Translation Collections: Single selection mode UI- Confirm the Collections option appears as a filter chip in the "Automatic" section, alongside "For you" and "Popular topics".

Missing All Collections

UPDATE: PASS per T373961#10318963

2024-11-12_15-10-05.mp4.gif (882×430 px, 1 MB)

@GMikesell-WMF The AC2 is expected to fail, since the code for page collections in CX/SX unified dashboard has not yet been deployed.

Additionally, there is no way to test the second item in the list inside the task description (find articles in the intersection of two or more topic areas). However, we can verify that the API supports this feature by sending requests directly to the Recommendation API with more than one topic inside the topic URL parameter. In the example below we are fetching recommendations that are related to both "women" and "sports" topics:
https://api.wikimedia.org/service/lw/recommendation/api/v1/translation?source=en&target=el&topic=women%2Bsports&count=24

Note: one should use %2B to separate the targeted topics in these requests.