All diagrams keep losing their formatting #194
Replies: 3 comments
-
I did some testing after raising this and I'm starting to think it might not be related to DSL changes. Specifically, when I lost all my formatting I went back to a previous backup of the workspace dsl & json. I then copied all the DSL changes back into workspace.dsl in one go, and it was fine. As expected, the new elements were all in the corner, but in general all the diagrams were still formatted. Looking at the json where the formatting was lost, I see the x & y of everything is set to 0 (but otherwise seems OK) "containerViews" : [ { |
Beta Was this translation helpful? Give feedback.
-
Reported this one year ago. Finally decided to fork and disable updates in json in preview mode. |
Beta Was this translation helpful? Give feedback.
-
Probably preventing pressing the home button in webUI multiple times before it has reloaded might resolve the issue... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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
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.
Beta Was this translation helpful? Give feedback.
All reactions