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).

Screen Shot 2018-04-09 at 5.01.31 PM.png (319×1 px, 63 KB)

Proposed solution

CX-error-session-dialog.png (720×1 px, 215 KB)

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.

Event Timeline

Pginer-WMF created this task.
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 subscribed.

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.

Screen Shot 2019-03-22 at 6.40.11 PM.png (434×734 px, 46 KB)

@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).

@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.