excalidraw-vscode icon indicating copy to clipboard operation
excalidraw-vscode copied to clipboard

File has changes immediately after opening the file

Open fultonm opened this issue 1 year ago • 9 comments

After opening an excalidraw file in VsCode, the file always has changes even if the file has not really been touched yet.

Short screen recording demonstrating the behavior: https://1drv.ms/v/s!AiSCz54h8oiP2DWiRl2ThvtWDyzw?e=G9KR5u

I believe this issue starts to occur when objects are grouped. Without grouping, the file doesn't have changes immediately after opening.

This makes it difficult to know which files have actually been modified, and also creates some anxiety about clicking save/discard changes. Since I am not sure if the file has been ghost-modified from this bug or if the file really had changes.

To figure out what changes there were, I initialized a git repository, and found the version, versionNonce, and updated fields were all modified.

So a potential fix could have the extension wait until the file has been modified by the user before changing these fields.

fultonm avatar Mar 26 '24 16:03 fultonm

Is this a known issue?

Can others reproduce?

fultonm avatar Apr 03 '24 18:04 fultonm

Hello,

I have the same thing happening on my end.

I just created an folder with some .excalidraw files, and when opening them in VScode they appear with changes.

Is there any workaround ?

Enzo-PVsyst avatar Apr 24 '24 09:04 Enzo-PVsyst

I think I noticed Excalidraw for web also does this. So this may be an upstream issue.

can anyone confirm?

fultonm avatar Apr 24 '24 15:04 fultonm

I have the same behavior. Excalidraw changes fields version, versionNonce, updated of each element. It's hard to read diff of files because of these changes.

asinyagin avatar Jun 19 '24 13:06 asinyagin

I have exactly the same issue; as soon as I've opened a file it immediately presents with changes; diffing the raw text source shows precisely the fields mentioned by @asinyagin have changed. Any idea on how to resolve this?

We'd like to use Excalidraw extensively for a variety of visualization tasks, and share progress via git, but this problem leads to lots of merge issues due to committing files and changes that have not actually been changed.

lyrixderaven avatar Jul 30 '24 14:07 lyrixderaven