mcdemarco / dotgraph

A Twine 2 proofing format that renders nodes as a GraphViz (dot) graph.
http://mcdemarco.net/tools/scree/dotgraph/
MIT License
7 stars 0 forks source link

Tag / passage name conflict causes issue when coloring by tag #10

Closed mcdemarco closed 3 years ago

mcdemarco commented 4 years ago

I have discovered one problem...

If you have a Passage and a TAG in Twine with the same name, they get somehow merged into one Node when Proofing with dotgraph.

That can be a problem...

I have a Passage with the name "Norge" and a tag with the same name, when running dotgraph, I only get one Node with that name, but if I rename the Node to i.e. "Norge (NO)" I get one Node with the label "Norge (NO)" and one with the name "Norge" (Used as a Legend for the color).

Maybe you could add an ID to the Nodes (Passages), but not to the Tags or something similar?

Originally posted by @StoltHD in https://github.com/mcdemarco/dotgraph/issues/9#issuecomment-669098638

mcdemarco commented 4 years ago

When you color by tags, the tags appear as disconnected nodes to serve as a key to the colors. They are a different shape, but if one of them has the same name as a passage, the passage node will partly override the tag node (and the layout may be strange).

Dot doesn't generally bother with ids; instead you can label a node something different from the node's name. So one fix would be to give the tag nodes unique names and use labels on them.

In some cases (with a small number of tags) tag nodes also float around in a confusing way. I should probably cluster them to distinguish them from the real nodes.

For now, to avoid the extra nodes completely you can change your tags (as you did) or turn off coloration by tag. I will also add a separate setting to independently omit the tag key.

StoltHD commented 4 years ago

Yes, its not a big problem to work around, when you know about it... It was mostly as information I provided it... (Wish it was an easy way to rename TAG's in Twine).

I did play around a little with subgraphs and clustering the tags, but I did not find a really good solution for it, I haven't tried yet, but I think each TAG-node need to be "hard coded" with a position if you want them to be in a row in either corner, in middle top and so on, any attempt I tried yeasterday gave me some strange layout... and maybe all the TAG Nodes should be of the same size to, to get a nice legend...

PS. This is nothing I have any need of, I have just played a little with it since you was so kind to make a tool that really work...

and one other thing, the Timeout for adding locally stored formats, its not just yours, I tried to download a format called "Poof" and install it from disk, but I just get a timeout even when I have the copy on a really fast nvme ssd, so it has something to do with the desktop application (Twine 2).

ons. 5. aug. 2020 kl. 16:32 skrev M. C. DeMarco notifications@github.com:

When you color by tags, the tags appear as disconnected nodes to serve as a key to the colors. They are a different shape, but if one of them has the same name as a passage, the passage node will partly override the tag node (and the layout may be strange).

Dot doesn't generally bother with ids; instead you can label a node something different from the node's name. So one fix would be to give the tag nodes unique names and use labels on them.

In some cases (with a small number of tags) tag nodes also float around in a confusing way. I should probably cluster them to distinguish them from the real nodes.

For now, to avoid the extra nodes completely you can change your tags (as you did) or turn off coloration by tag. I will also add a separate setting to independently omit the tag key.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mcdemarco/dotgraph/issues/10#issuecomment-669228590, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGWEGB7POWSPRIBD4SIV47LR7FUQZANCNFSM4PVQ4UFQ .

StoltHD commented 4 years ago

Just tell me if you want me to test something for you with my little different usage, if you think it can help

mcdemarco commented 4 years ago

Thanks for the offer, but I think the tag issue is all set.

mcdemarco commented 3 years ago

Not sure why this was hanging around unclosed; possibly a problem importing from BitBucket.