-
-
Notifications
You must be signed in to change notification settings - Fork 59
All diagrams keep losing their formatting #180
Description
Expected
When I make changes to the workspace.dsl, these should be reflected in the diagrams on the web editor, with the diagrams keeping their formatting (the position of the elements).
Actual
Quite often, I make some changes to the workspace.dsl, and when these are picked up by the website, all my diagrams lose their formatting, regardless of whether the I changed any of the elements on them. (As in, all the elements go back to the top-left corner of the diagram).
The only solution I've found is to keep saving copies of the workspace.dsl and workspace.json, and when this happens, go back to a previous version and add the changes back in, perhaps saving more regularly.
Steps to reproduce
- Write some DSL including multiple diagrams
- Format the diagrams in the web editor and save the changes
- Update and save the DSL (I've not been able to work out exactly what sort of change causes this issue - I try to save the DSL regularly to minimise the chances, but it still happens quite often)
- Wait for the website to reload
- Look sadly at your diagrams and see the formatting is gone (the diagrams look correct in the thumbnails, but as you click on them, you see the formatting is gone and the thumbnail updates to the unformatted version)
- Realise you forgot to back up the workspace dsl/json for a while and wonder whether it will be quicker to add all your changes back into the dsl or reformat all your diagrams again.
Version/build information
C:\WINDOWS\system32>C:\Apps\microsoft-jdk-21.0.5-windows-x64\jdk-21.0.5+11\bin\java -jar C:\Users\gcro\Downloads\structurizr-lite.war C:\Apps\Structurizr\Case
[main 2025-01-23T09:46:17.714Z] update#setState idle
(node:21368) [DEP0168] DeprecationWarning: Uncaught N-API callback exception detected, please run node with option --force-node-api-uncaught-exceptions-policy=true to handle those exceptions properly.
(Use code --trace-deprecation ... to show where the warning was created)
2025-01-23T09:46:18.790Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Starting StructurizrLite using Java 21.0.5 with PID 14404 (C:\Users\gcro\Downloads\structurizr-lite.war started by gcro in C:\WINDOWS\system32)
2025-01-23T09:46:18.800Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : No active profile set, falling back to 1 default profile: "default"
2025-01-23T09:46:25.062Z WARN 14404 --- [ main] o.a.l.i.v.VectorizationProvider : Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Started StructurizrLite in 7.154 seconds (process running for 8.823)
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : ***********************************************************************************
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : _____ _ _ _
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : / | | | | ()
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : | ( | |_ _ __ _ _ | | _ _ _ __ _ _____ __
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : _ | | '| | | |/ | | | | | '| | / '|
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : __) | || | | || | (| || || | | | |/ /| |
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : |/ _|| _,|_|_|_,|| |/|_|
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite :
2025-01-23T09:46:25.479Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Structurizr Lite
2025-01-23T09:46:25.495Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : - build: 2024.11.04 (2024-11-04T11:32:50Z)
2025-01-23T09:46:25.497Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : - structurizr-java: v3.1.0
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : - structurizr-dsl: v3.1.0
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : - structurizr-graphviz: v3.1.0
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite :
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Workspace path: C:\Apps\Structurizr\Case
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Workspace filename: workspace[.dsl|.json]
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Workspaces: 1
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : URL:
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Auto-save interval: 0ms
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Auto-refresh interval: 2000ms
2025-01-23T09:46:25.501Z WARN 14404 --- [ main] com.structurizr.lite.StructurizrLite : Cannot run program "dot": CreateProcess error=2, The system cannot find the file specified
2025-01-23T09:46:25.501Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : Graphviz (dot): false
2025-01-23T09:46:25.516Z INFO 14404 --- [ main] com.structurizr.lite.StructurizrLite : ***********************************************************************************
Severity
Major
Priority
Low (I have no budget and there's no rush, please fix this for free)
More information
Possible the same issue as this: #5
(I believe I may have lost my formatting before simply by leaving the program running for a while, e.g. overnight, but I've not confirmed this).
The troubleshooting on the website mentions an issue related to the merging algorithm which may be the cause: https://docs.structurizr.com/lite/troubleshooting#diagram-layout-is-lost-when-using-manual-layout
All my diagrams have keys though, which I don't change. I do sometimes move things around in the DSL file, but it's hard not to.