Page MenuHomePhabricator

CX draft continuation: Combine the two translation data fetch requests into a single one
Closed, ResolvedPublic

Description

Currently when resuming a draft translation on desktop, the frontend sends two dedicated requests to the backend:

  1. one to check if such draft exists (if no such draft, the backend also checks for conflicts here)
  2. and another one to fetch the draft translated contents

However, those two requests can be combined into a single one: if draft translation found, also fetch the translated contents within the same request. Then, if no draft translation found, check for conflicts. That would summarize the combined functionality of the two requests.

Removing the redundant request will save waiting time for the user and simplify the code.

Event Timeline

ngkountas changed the task status from Open to In Progress.Oct 11 2023, 11:05 AM
ngkountas triaged this task as Medium priority.

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

[mediawiki/extensions/ContentTranslation@master] CX contenttranslation list: Add 'desktop-editor-draft' usecase

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

Change 964864 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX contenttranslation list: Add 'desktop-editor-draft' usecase

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

Currently, restoring a draft translation on desktop, only needs a single request to fetch the draft translation information and the translation corpora units, as demonstrated in the following screencast (captured from el production wiki):

The task can be considered as done.