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

Conflicting segment focus between front- and backend

    XMLWordPrintable

Details

    • Medium
    • URL links to segments work now. The segment id from the URL hash gets prioritized over the last edited segment id.

    Description

      In the segment grid, segments can be focused either interactively or programmatically. E.g. when opening a task for the first time, then focus the 1st segment. In some circumstances different parts of the application try to focus different segments:

      1) Work file clicked with sorters enabled.
      Clicking on a work file in the left sidebar focusses the first segment that is associated with it, say #1. When the grid is sorted somehow, the segment data has to be loaded without sorters to find the correct position. During this reload the backend inserts the last edited segment to focus into the data, say #999. When store load is handled, a JS error occurs.

      Error: model is undefined - scrollTo/options.callback@Grid.js:419

      2) Page Reload in Editor
      When reopening a task, the last edited segment is focused, based on data from the server. (TRANSLATE-1134). Also the task-id and segment-id are shown in the URL by which it is possible to link to a focused segment. (TRANSLATE-2069).
      After translating a segment, say #123, and ending via Ctrl+Return, the next one #124 is automatically focused and opened for editing and the URL is updated. If you then reload, frontend wants to focus #124 via URL, but backend trumps this with #123.

      It should be checked when the frontend wants to focus a segment and in that cases the backend should not try to focus one via addJumpToSegmentIndex.

      Attachments

        1. 1-WorkfileSeg0-LastEditedSeg999-1.gif
          659 kB
          Christoph Lamparter
        2. 2-PreviousSegmentAfterReload.gif
          282 kB
          Christoph Lamparter

        Issue Links

          Activity

            People

              christophlamparter Christoph Lamparter (Inactive)
              christophlamparter Christoph Lamparter (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: