Page MenuHomePhabricator

Preserve in-progress translations if user logs in or navigates away after adding translations
Closed, ResolvedPublic5 Story Points

Description

User story

  1. As a user, I would like to land back on the translation page with my added translations intact after login.
  2. As a user, I would like to have my in-progress translations preserved temporarily in case my browser/computer crashes.

Combining these two user stories as they seem related.

Requirements

  • If a user is on the Translate page and they click Login after adding translations, their translations should be preserved and the user should land back on the same page after they complete the login.
  • If a user navigates away (or their tab crashes etc) from the translate tab in the middle of adding translations, their translations for the image should be temporarily preserved (15 minutes is good enough). In case they had multiple in-progress translations, preserve translations for all of those.

Event Timeline

Niharika triaged this task as Normal priority.Jan 7 2019, 6:37 AM
Niharika created this task.
Restricted Application added a project: Community-Tech. · View Herald TranscriptJan 7 2019, 6:37 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Niharika set the point value for this task to 3.Jan 9 2019, 12:14 AM
Niharika moved this task from To be estimated/discussed to Estimated on the Community-Tech board.
Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.

the user should land back on the same page after they complete the login.

This part is ready for review: https://github.com/wikimedia/svgtranslate/pull/71

In case they had multiple in-progress translations, preserve translations for all of those.

Does this include switching to and from other To languages (i.e. without reloading the page)? I've been assuming it does, but that may be wrong (I think we did talk about not doing that a while ago).

the user should land back on the same page after they complete the login.

This part is ready for review: https://github.com/wikimedia/svgtranslate/pull/71

In case they had multiple in-progress translations, preserve translations for all of those.

Does this include switching to and from other To languages (i.e. without reloading the page)? I've been assuming it does, but that may be wrong (I think we did talk about not doing that a while ago).

@Samwilson I meant if they had multiple tabs open with the tool and were in the process of translating multiple files. Switching between multiple To languages should not preserve translations. We should discard existing translations when they decide to change the language (which is what we have the popup for).
Is this clearer?

Samwilson added a comment.EditedFeb 20 2019, 1:28 AM

I meant if they had multiple tabs open with the tool and were in the process of translating multiple files. Switching between multiple To languages should not preserve translations. We should discard existing translations when they decide to change the language (which is what we have the popup for).
Is this clearer?

Yep! That makes sense. Thanks.

Niharika changed the point value for this task from 3 to 5.Feb 21 2019, 12:29 AM

I was too hasty above with "rest of this"... but a chunk more has been done and is ready for QA: the From and To languages should be correctly remembered when you login or close the window.

I'd like to get this part QA'd (it's now live on the staging site) before going on with the message form inputs themselves, in case there's some structural problem.

@Samwilson This works well for me. The languages seem to be correctly remembered as they should.
Let's get the rest of this done.

Samwilson removed Samwilson as the assignee of this task.Mar 29 2019, 1:12 AM
Samwilson moved this task from In Development to Ready on the Community-Tech-Sprint board.
Samwilson added a subscriber: Samwilson.
Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.
aezell added a subscriber: aezell.Apr 19 2019, 3:55 PM

I did a rudimentary test on this and it seems to work fine.

dom_walden added a subscriber: dom_walden.EditedApr 25 2019, 12:26 PM

Requirements

  • If a user navigates away (or their tab crashes etc) from the translate tab in the middle of adding translations, their translations for the image should be temporarily preserved (15 minutes is good enough). In case they had multiple in-progress translations, preserve translations for all of those.

It is my understanding that the tool only stores partial translations for one file/tab at a time, the one you have most recently worked on. If you have multiple translations in progress, closing or navigating away (incl. logging in) from a tab you have not recently used will lose your unsaved translation.

We may need to recommend users not translate more than one file at a time, or use different browsers for each file.

EDIT: In fact, the local storage is shared across tabs, so if you have two translations on the go you may find translations you do on one tab appearing in the other (if you, for example, refresh the page). Or, if you translate one image after another, the translations for the previous image can appear in the current image.

Requirements

  • If a user navigates away (or their tab crashes etc) from the translate tab in the middle of adding translations, their translations for the image should be temporarily preserved (15 minutes is good enough). In case they had multiple in-progress translations, preserve translations for all of those.

It is my understanding that the tool only stores partial translations for one file/tab at a time, the one you have most recently worked on. If you have multiple translations in progress, closing or navigating away (incl. logging in) from a tab you have not recently used will lose your unsaved translation.
We may need to recommend users not translate more than one file at a time, or use different browsers for each file.

Gotcha. I can live with only being able to have one translation in progress at a time. I will add that to the documentation.

@dom_walden Dropping this in the QA column for you in case there's any further QA work you want to do here. :) Thank you!

Commits linked to this task have been released in svgtranslate 0.9.0.

@dom_walden Dropping this in the QA column for you in case there's any further QA work you want to do here. :) Thank you!

I have nothing else to add. I raised bug T223380 for:

...if you translate one image after another, the translations for the previous image can appear in the current image.

as that affects users who are translating one image after another.

Niharika closed this task as Resolved.May 19 2019, 11:09 AM
Niharika moved this task from Product sign-off to Done on the Community-Tech-Sprint board.

Thanks Dom!