CCALI / a2jauthor

CALI A2JAuthor document automation authoring and viewing platform
https://www.a2jauthor.org
Other
4 stars 1 forks source link

Save needed when going from Pages view to Map view #126

Open normon66 opened 3 years ago

normon66 commented 3 years ago

When entering Map mode from Pages mode, an automatic save would be beneficial.

  1. If pages are added while in Pages mode and then you go to Map before forcing a save, the added page(s) will show up in the list of pages (this takes a few seconds), but they do not show up in the Map view itself. Further, if you double-click one of the newly-added pages from the page list, nothing happens, the authoring becomes unresponsive, and the below error is thrown in the console: image

  2. Similarly, if a page is deleted while in Pages mode and then the Map mode is entered before a save takes place, that deleted page still shows up in the page list, as well as the Map view itself. Double-clicking either results in a blank popup as seen below, though authoring itself does remain responsive. image

There are likely other similar issues resulting from the lag between Pages and Map.

JessicaFrank commented 3 years ago

Add a save upon leaving pages tab.

mikemitchel commented 3 years ago

Tried a couple of solutions to this problem, but it caused either the spinner to keep spinning or the previous behavior where the Tab transition UI would lock up until the map was ready to load. Real solution will involve:

Refactoring the Pages tab to a CanJS component so we can save during teardown of that component. (hopefully only this) Possibly upgrading/changing the jointjs map code to be in async mode, which will be a big refactor as well

mikemitchel commented 3 years ago

saving this branch that used nested promises to try and control for the save, then Map tab load, but caused the UI lag in case any of these ideas are helpful for the full fix: https://github.com/CCALI/a2jauthor/tree/134-save-pre-map

normon66 commented 3 years ago

@mikemitchel - instead of forcing a save upon leaving Pages, what about forcing when when entering Map?

mikemitchel commented 3 years ago

@normon66 that's the second solution that caused the UI to hang on larger interviews.