Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-7084

SWF Viewer - UI blinks and state is lost, once reloading diagram continuously

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Hide
      1. Create a new diagram with a single state pointing to the end state
      2. Edit the name of the state, as the user types the whole diagram blinks.

      Actual result

      The whole diagram is blinking when the user edits state's fields.

      Expected result

      The whole diagram should not blink when the user edits state's fields.

      • The workflow may blink if the user changes the workflow id (it is being used to identify if a new workflow is being loaded)
      • A selected node must remain selected in between reloads, unless its name is being changed. (Node names are being used to keep the selection)
      • The zoom level should remain the same in between reloads.
      Show
      Create a new diagram with a single state pointing to the end state Edit the name of the state, as the user types the whole diagram blinks. Actual result The whole diagram is blinking when the user edits state's fields. Expected result The whole diagram should not blink when the user edits state's fields. The workflow may blink if the user changes the workflow id (it is being used to identify if a new workflow is being loaded) A selected node must remain selected in between reloads, unless its name is being changed. (Node names are being used to keep the selection) The zoom level should remain the same in between reloads.
    • ---
    • ---
    • 2022 Week 17-19 (from Apr 25), 2022 Week 20-22 (from May 16), 2022 Week 23-25 (from Jun 6), 2022 Week 26-28 (from Jun 27)

    Description

      Since the replacement from Mermaid to Stunner in our VSCode plugin for SWF, it has been identified that while changing the text, the diagram viewer may blink, if too many consecutive updates.

      Considerations:

      • This is not really a bug. The editor has been designed for owning the source of truth, and the lifecycle for the SWF Viewer is different
      • It is actually affecting the user experience in a negative way. in case of using the tooling editors (vscode, etc)
      • The goal for this task is to improve the performance and result in a smooth user experience by: identifying unnecessary operations, removing/reusing DOM elements as much as possible, and postponing scripting operations 
      • As a result from this, the expectation is to fix the bad experience, but further iterations on this lifecycle must be done in the whole tooling architecture, in order to achieve efficient workflow updates. See KOGITO-7198 for more information

      Issues:

      • UI blinks
      • In case of stressing the setContent calls, at some point also some exception at client side appears
      • State being lost
        • Mediators: the actual scale/translation viewport levels are being lost accross setContent calls
        • Selection: the actual node selection, if any, is being lost accross setContent calls

       

      Actions:

      • Avoid reloading the whole DOM elements on every single setContent call (avoid some DOM manipulations)
      • Preverve graph UUIDs when calling setContent multiple times, if possible
      • Preserve canvas root UUID
      • If workflow id changes, it will reload he whole editor
      • Memory checks

      Attachments

        Issue Links

          Activity

            People

              handreyrc Handrey Cunha
              romartin@redhat.com Roger Martinez
              Lubomir Terifaj Lubomir Terifaj
              Lubomir Terifaj Lubomir Terifaj
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: