znai icon indicating copy to clipboard operation
znai copied to clipboard

flow charts: email shape does not render multiple lines

Open tsiq-karold opened this issue 4 years ago • 1 comments

Example flow chart json:

{
  "nodes": [
    {
      "id": "foo",
      "label": "foo\nbar"
    },
    {
      "id": "bar",
      "label": "foo\nbar",
      "shape": "email"
    }
  ],
  "edges": [
    ["foo", "bar"]
  ]
}

Rendered flow chart: Screenshot 2021-06-28 at 11 22 30

As you can see the default shape renders the multiple lines correctly, the email shape does not.

tsiq-karold avatar Jun 28 '21 10:06 tsiq-karold

I've also encountered this with the database shape so I wonder if this is a problem with anything other than the default rectangle.

tsiq-karold avatar Jun 28 '21 10:06 tsiq-karold

I have observed the same issue when specifying colorGroup

suhasdara avatar Nov 23 '22 15:11 suhasdara

@suhasdara thanks for letting me know. Do you use a regular shape? Any chance you can elaborate on your full use case?

MykolaGolubyev avatar Nov 23 '22 15:11 MykolaGolubyev

Yes I use a regular shape but with different colors. Essentially I need my nodes to be one of two colors. My labels also contain the newline character and I have exactly the same issue as what the original person reported when explicitly setting colorGroup: "b". I tried using highlight instead of colorGroup and that causes the same problem as well. Essentially, any formatting of the node other than the default seems to cause the problem.

suhasdara avatar Nov 23 '22 16:11 suhasdara

@suhasdara thank you for the pointers. I am able to reproduce now. Working on a fix. Still curios what do you use diagrams for! If you have a moment, could you please post here - https://github.com/testingisdocumenting/znai/discussions/824 ?

MykolaGolubyev avatar Nov 25 '22 15:11 MykolaGolubyev

this has been released as 1.62: https://testingisdocumenting.org/znai/release-notes/2022#1-62

MykolaGolubyev avatar Dec 13 '22 15:12 MykolaGolubyev