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

Why "checkpoint" not "Checkpoint" (or "End" not "end")? #2

Closed mcdemarco closed 4 years ago

mcdemarco commented 4 years ago

G'day!

Was there a design reason behind having the two known-by-DotGraph tags:

#!javascript
checkpointTag: "checkpoint",
endTag: "End",

be in different cases?

Could you we standardize to either ("checkpoint", "end") or ("Checkpoint", "End")?

[Issue created by morbus: 2018-01-11] [Last updated on bitbucket: 2019-06-04]

[Comment created by morbus: 2018-01-11] This might be an interesting place to talk about DotGraph prefixes, which was also hinted at in #1.

That is, should these be ("dgCheckpoint", "dgEnd") instead? On a purely high-level, I like the idea of enforcing namespaces for special tags that DotGraph understands. On the other hand, the likelihood of "[cC]heckpoint" and [eE]nd" being used as tags is great, meaning DotGraph gets to understand them "for free".

Maybe we should make these configurable, pre-filled, inputs in the configuration form, similar to what was done in #1.

[Comment created by mcdemarco: 2018-01-11] I think checkpoint is actually used as a special tag in Twine (though I'm not positive about that; there are other ways to checkpoint) and End is one that ought to be a special tag but isn't. I was certainly thinking of making special (to DotGraph) tags configurable somehow, since there are more special tags in Twine (though most tend to remove the passage from flow for one reason or another).

Making them case-insensitive is also an option. Adding some namespace that insures they would never appear in a Twine story without rewriting your tags sounds counterproductive, though.

[Comment created by morbus: 2018-01-12] Some quick Twine spelunking:

None of the formats I've checked support "checkpoint" or "end". Sugarcube is the closest, with support for "bookmark" which, when used with the Rewind feature, acts as checkpoints. I'm not entirely sure if that's the same meaning you were going for in DotGraph, due to newb/ignorance.

[Comment created by morbus: 2018-01-12] And here's a "really?! you shouldn't have! no. seriously." patch to standardize on lowercase.

[Comment created by mcdemarco: 2018-01-23] The end tag exists in uppercase in the wild (and nowhere in Twine), so forcing it to lowercase after the fact is also counter-indicated. Note that since the end tag is set in the configuration, you can change it to lowercase (or something else entirely) by passing your own configuration in using the StorySettings passage:

dotgraph:{endTag: "end", checkpointTag: "checkMe"}

Let me know if this is entirely undocumented and confusing...

[Comment created by morbus: 2018-01-23] Yeah, I've been using the dotgraph settings to control things.

EDIT: Actually, I've only been setting UI values via StorySettings - I wasn't aware I could affect the non-UI configs too.

What about making tags case-insensitive?

[Comment created by mcdemarco: 2018-01-23] Case-insensitivity still seems like a useful default, but not the highest priority on the list--especially since I'd like to make it configurable. Since there's no obvious instance of case-sensitive tags out there to work around, I could be talked out of the configurability part of the change.

[Comment created by mcdemarco: 2019-06-04] Downcased "end" in rev. 47; only Twine.private remains uppercased. I no longer plan to implement tag case insensitivity.

[Comment created by mcdemarco: 2019-06-04] Downcase end tag re issue #2.

→ <>