Page MenuHomePhabricator

CX2: Communicate session has expired on translation view
Closed, ResolvedPublic

Description

Currently, when the session expires or the user logs-out on a different tab, an error is shown in the document and the "publish" button remains active. This is problematic since (a) the user may not notice that the changes are not saved and continue working, and (b) we are not providing a clear path forward (just instructions on what to do).

Proposed solution

The following is proposed:

  • A dialog is shown when the issue is detected. It will block the user from further editing the document in order to avoid changes to get lost.
  • A "log-in" action is provided that opens in a new tab/window.
  • In the background, regular checks are made to verify if the issue still happens. If the issue is no longer happening, the dialog gets closed. We may want to pay special attention to the visibility change event to check if the user logged-in after returning from the other window.

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterCommunicate session has expired on translation view
mediawiki/extensions/ContentTranslation : masterMark sections as saved only when saving is successful

Event Timeline

Pginer-WMF triaged this task as Medium priority.Apr 12 2018, 10:19 AM
Pginer-WMF created this task.
Pginer-WMF updated the task description. (Show Details)
Petar.petkovic renamed this task from CX2: Communicate session has expired to CX2: Communicate session has expired on translation view.Jul 29 2018, 2:47 PM

Change 480896 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Communicate session has expired on translation view

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

Change 489441 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Mark sections as saved only when saving is successful

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

Change 489441 merged by Nikerabbit:
[mediawiki/extensions/ContentTranslation@master] Mark sections as saved only when saving is successful

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

Change 480896 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Communicate session has expired on translation view

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

Etonkovidova added a subscriber: Etonkovidova.

Checked in cx2-testing when a user session is expired, there is a Console error (which is expected, I suppose):
[CX] Unable to get cxserver token.
The message "An error occurred while saving the page" is still displayed along with the warning about expired session.

@Pginer-WMF I am moving it to check after deployment, unless you will see that something should be changed.

@Pginer-WMF I am moving it to check after deployment, unless you will see that something should be changed.

Thanks, @Etonkovidova. If the dialog is shown, I think we can close the ticket. Even if the additional error messages are unnecessary distraction, I'd not consider it a blocker for the task but some possible future polishing (low priority given that session expiry is already an edge case).

Petar.petkovic closed this task as Resolved.Apr 19 2019, 10:03 AM

@Pginer-WMF I am moving it to check after deployment, unless you will see that something should be changed.

Thanks, @Etonkovidova. If the dialog is shown, I think we can close the ticket. Even if the additional error messages are unnecessary distraction, I'd not consider it a blocker for the task but some possible future polishing (low priority given that session expiry is already an edge case).

Given this, and that reported error is logged in console and not affecting the dialog, I'm closing this.