Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reenable import from file on multi-user whiteboards #6977

Closed
2 tasks
ccanos opened this issue Oct 2, 2024 · 4 comments
Closed
2 tasks

Reenable import from file on multi-user whiteboards #6977

ccanos opened this issue Oct 2, 2024 · 4 comments

Comments

@ccanos
Copy link
Contributor

ccanos commented Oct 2, 2024

Description

As an Alkemio user I want to be able to import an exported Excalidraw JSON to my collaborative whiteboard.

Context

With the works performed on whiteboards we have disabled the functionality "LoadScene" from excalidraw that loads an exported JSON file because it was causing synchronization issues on multiuser whiteboards.
On single user whiteboards (template editing, whiteboard form fields) the functionality is still available

  • Causes: when Excalidraw loads a file, it replaces in memory the entire structure, all the previous elements are gone, so we cannot send a broadcast message to delete them, all the versions of the elements are the versions coming in the file, so sceneVersion gets also problematic.
  • Possible fixes:
    • An attempt to fix the sceneVersion has been done here: Bump the version of the elements when a scene is loaded from a blob excalidraw-fork#7 but this is not enough
    • The elements versions should be updated but also the previous elements should be kept as deleted
    • OR:
    • we can add a callback to the <Excalidraw component onLoadScene that can reset from outside all the elements, the scene version, and send a broadcast so every client do the same.

Acceptance criteria

  • Multi user whiteboards don't get desynchronized when one of the clients imports a JSON file
  • The content from the file is appended to the current scene

Additional Context

Screen shots / UX designs / data that are relevant.

Areas that will be affected

  • Importing from file
  • Scene update
  • Scene saving in the backend
  • Multi-user synchronization
@hero101
Copy link
Collaborator

hero101 commented Oct 3, 2024

I've moved it to Epic alkem-io/alkemio#1419

@techsmyth
Copy link
Member

@ccanos @hero101 loading from file should just add to the current whitboard, not replace. So same path as importing from template. Does that change the estimate?

@SimoneZaza
Copy link
Contributor

Let's prioritize this one as it is needed for backups saved locally (and with the whiteboard issues this becomes more important)

@Comoque1
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants