Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-2534

Enable opening multiple tasks in multiple tabs

    XMLWordPrintable

Details

    • Critical
    • Hide
      Update / restart of message bus required after Update!
      API users using /editor/session endpoint: providing a taskGuid on session API login is obsolete. Just login and open the task by putting the task ID in the URL: /editor/taskid/123/ - the auth call returns the URL for convenience.
      Show
      Update / restart of message bus required after Update! API users using /editor/session endpoint: providing a taskGuid on session API login is obsolete. Just login and open the task by putting the task ID in the URL: /editor/taskid/123/ - the auth call returns the URL for convenience.
    • Hide
      Multiple tasks can now be opened in different browser tabs within the same user session at the same time. This is especially interesting for embedded usage of translate5 where tasks are opened via custom links instead of the translate5 internal task overview.
      Show
      Multiple tasks can now be opened in different browser tabs within the same user session at the same time. This is especially interesting for embedded usage of translate5 where tasks are opened via custom links instead of the translate5 internal task overview.

    Description

      problem

      Opening multiple different tasks in multiple browser windows / tabs is currently not possible. A "highlander" solution (only one opened task per session) was forced with TRANSLATE-198 by taking over the session of the already opened task when logging into a new tab, although a different task was specified in the opening URL.

      solution

      The only correct solution is to enable opening multiple tasks in multiple tabs.

      technical todos

      • It must be ensured, that the current task ID is sent on each AJAX request in the context of an opened task
        • fast solution: put the task ID into the ajax headers (not suggested to be implemented)
        • correct solution: put the task ID in each URL requesting the server in the context of an opened task
          • should be easily possible by modifying Editor.data.restpath if correctly used
          • on server side (to be discussed): modify each route defintion to match the newly added taskID in the URL - or just use the .htaccess to map and remove the newly added taskID and convert it to a variable
        • Implement a controller plugin which loads the "CurrentTask" singleton / or just put it into the registry (to be discussed). The first approach has the advantage that we can extend the Task Model with a CurrentTask Model containing specific methods for the current task (same as planned for the authenticated user)
        • refactor all session->taskGuid usages to use the CurrentTask instance (will probably reduce task loadings then)
      • what should happen on closing one of five tabs:
        • instead of logging out via browser beacon, we should send a "requesting logout" request instead.
        • This new request uses the frontendmessage bus to find out, if the current session has still some open tabs, if yes do not log out, if it was the only window/tab proceed with the logout (logging out in combination with no other open websockets due connection loss problems is ignored so far)
      • The following current behavior must therefore be removed:
        • If an old user session exists with an opened task, reopen this again (must be removed). Yet taking over the session as such should stay.
        • Reopen task, that had been opened, if it is not specified to be opened via URL

      It must be ensured, that opening multiple tasks with the same user is only possible within the same browser session. This is important, because otherwise it would undermine our user-based hosting model. This restriction to a browser session should be able to remove via a system config level 1 (only accessable via DB). Does exist already: runtimeOptions.singleUserRestriction

       

      Attachments

        Issue Links

          Activity

            People

              tlauria Thomas Lauria
              tlauria Thomas Lauria
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: