Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Default RankDirection not being serialized #103

Closed
SuprisingPlum opened this issue Feb 23, 2023 · 7 comments
Closed

Default RankDirection not being serialized #103

SuprisingPlum opened this issue Feb 23, 2023 · 7 comments

Comments

@SuprisingPlum
Copy link

SuprisingPlum commented Feb 23, 2023

Steps to reproduce

  1. Create new work space with C4 diagrams
  2. Click on the diagram

Expected Result

Diagram appears and is clickable

Actual Result

Blank page appears like in the screenshot below

image

@SuprisingPlum
Copy link
Author

Additional notes:

  • This has only recently been an issue so likely due to recent updates to this repo
  • I am using the free tier

@simonbrowndotje
Copy link
Contributor

Can't really help without more information I'm afraid.

  • Are there any errors in your web browser's developer console?
  • Lite/cloud service/on-premises?
  • If cloud, what's the workspace ID?
  • Do the demos render for you (e.g. https://structurizr.com/share/36141/diagrams)?
  • Does using a different web browser resolve the issue?
  • Have you tried a hard refresh in your web browser?

@SuprisingPlum
Copy link
Author

SuprisingPlum commented Feb 23, 2023

Hi,

  • The only error we have in the console is the attached
  • We are using the cloud service
  • Workspace ID is 79735
  • The demos render fine for me
  • I am using the latest version of Chrome and tried hard refreshes
  • I have also tried reloading older versions of the workspace which were displaying previously but now do not render on the page

Thanks for the quick response
structurizr.com-1677157686282.log

@simonbrowndotje
Copy link
Contributor

Thanks for the information. It looks like you're using the Structurizr for .NET library - the rank direction setting for your views isn't being set. Can you share the part of the .NET code that enables automatic layout?

@SuprisingPlum
Copy link
Author

SuprisingPlum commented Feb 23, 2023

Here is the code where we add the different elements and set the layout for the C1 diagram

var c1View = views.CreateSystemContextView(softwareSystem, "C1", "C1"); c1View.AddAllSoftwareSystems(); c1View.AddAllPeople(); c1View.EnableAutomaticLayout();

@simonbrowndotje simonbrowndotje transferred this issue from structurizr/ui Feb 23, 2023
@simonbrowndotje simonbrowndotje changed the title Diagrams don't display on site Default RankDirection not being serialized Feb 23, 2023
@simonbrowndotje
Copy link
Contributor

The default value for RankDirection wasn't being serialized, and automatic layout was failing.

v1.1.1 is now available on Nuget, which should resolve your issue.

@SuprisingPlum
Copy link
Author

Updated the Nuget package to v1.1.1 and tested. The diagrams are being displayed as expected. Thank you for the quick response and fix!

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

No branches or pull requests

2 participants