Code Monkey home page Code Monkey logo

dotgraph's People

Contributors

mcdemarco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotgraph's Issues

"Color by tag" nodes without tags should be white, not gray

When "Black & white" is selected, all nodes except for start and end nodes default to a white background color. When "Color by tag" is enabled, all nodes without tags default to a grey background color. I would much prefer if "no tag" equated to white, instead of gray.

[Issue created by morbus: 2018-01-12]
[Last updated on bitbucket: 2018-05-08]

[Comment created by morbus: 2018-01-12]
I was initially thinking the patch would be something like this, but it works a little too well: starting and ending nodes are ALSO colored white, when THOSE particular nodes I'd want to retain grey under "Color by tag". Screenshot guide: 1 and 2 are the current behavior; 3 is the patched behavior with "Color by tag".

[Comment created by morbus: 2018-01-12]
With the patch, I could simulate what I wanted with my own custom tags, but that doesn't feel ideal.

[Comment created by mcdemarco: 2018-05-08]
Clean up tag coloring re: issue #3.

→ <<cset 791bb1229574>>

[Comment created by mcdemarco: 2018-05-08]
Set explicit colors for various uncolored cases that were coming out gray (in a hidden config option, paletteExceptions).

Problem with Scandinavian Characters

It seems that there are some problem with Passage Names that have Norwegian Characters ÆØÅ æøå in them ...

The Characters are just gone in the Graph and in the dot file.

Unable to remove tooltips completely from DOT

I'm trying to remove tooltips entirely from the created Dot source. I uncheck "Include word counts (hover)", but the tooltips still appear. Either they're set to the passage ID (when passage titles are on), or they're set to the passage title (when passage IDs are on). I'd like the ability to remove the tooltips entirely as, ultimately, they're confusing (to me, at least). When I set "passage titles" on, I don't care about DotGraphs (?) internal (?) IDs - they don't mean anything to me, the reader, or ultimately, the choice map itself...

Perhaps:

"When passage titles are used, and word counts are off, disable the tooltip completely".

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

[Comment created by mcdemarco: 2018-01-14]
GraphViz always adds a tooltip, so removing it completely isn’t really an option. I could add an option to default it to the same value as the node itself.

[Comment created by morbus: 2018-01-16]
Mmm. I suppose that'd be the only way forward.

[Comment created by mcdemarco: 2019-06-04]
Rev. 48 adds an internal option to turn off tooltips, which reverts them to Graphviz defaults.

Allow rendered prefixing of passage titles (use case: a checkbox)

Hey there. Morbus and M. C. DeMarco have talked about this through email. For onlookers:

I'd like to make a choice map that includes checkboxes on the nodes, such that I could print out the image or SVG, carry it with me as I read the book, and check off what passages I've read on the printout (instead of, say, in the book itself). I'd like this to be done at the rendering level, NOT within the source Twine or Twee file.

My first attempt at this is attached, along with a screenshot showing its use.

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

[Comment created by morbus: 2018-01-16]

[Comment created by mcdemarco: 2019-06-04]
Added in rev. 51. Did not add a UI for it because of content corruption; it's best to pass the desired prefix or postfix in the settings using HTML entities.

[Comment created by mcdemarco: 2019-06-04]
Fix some fixes. Note: previous feature was re: issue #7.

→ <>

Allow user-defined coloring for tags

I'm currently mapping a story that increases a stat either a little (+), a little more (++), or a lot (+++). I tag passages as "Stat+", "Stat++", and "Stat+++". These three tags get three different colors in the default implementation. I'd like the ability to define my own colors for tags, perhaps something like "tagColors: [ {"tagone+": "#111111"}, {"tagone++": #111111"}, ... ]". This would allow me to either a) color similar tags the same color [useful in combination with #11] or b) shade similar tags in the same way ("all blue shades mean this stat will be increased. got it.").

When "color by tag" is enabled, specialPassageList breaks?

I'm having a hard time tracking this down.

Starting with a twee2 entry like this:

#!markdown

::StoryTitle
Investigations in Lovecraft Country #1: Alone Against the Flames — v20180827 @ github.com/morbus/gamebook-choicemaps

::StoryAuthor
MetaArcade

::StorySettings
dotgraph:{"color":"tag","countWords":false,"omitTags":["annotation"],"showNodeNames":true}

And with a configuration per the attached screenshot, the "StoryAuthor" node is being shown. If I remove the "StoryAuthor" in the twee2 file, "StorySettings" is shown instead. If I retain "Story Author" and "StorySettings", but switch their positions (such that "StorySettings" is first in the file), then "StorySettings" is shown.

If I switch "color" to "length" or "bw", the bug does not occur.

Source .tw2 file is located here:

https://github.com/morbus/gamebook-choicemaps/tree/master/choicemaps/investigations-in-lovecraft-country-1-alone-against-the-flames--2018--ios-id1343328830

[Issue created by morbus: 2018-09-07]
[Last updated on bitbucket: 2018-09-09]

[Comment created by morbus: 2018-09-07]
Seems like this is being caused in writeTagKey(), where the startName is being set, as the created gv is:

#!
"Athleticism-Check" -> "StoryAuthor" [style=invis]
"Intelligence-Check" -> "StoryAuthor" [style=invis]
"Appearance-Check" -> "StoryAuthor" [style=invis]
"Clue-Over-the-Edge" -> "StoryAuthor" [style=invis]

[Comment created by morbus: 2018-09-07]
This might be related to how twee2 is building the file. I'm seeing this:

#!
<tw-storydata name="..." startnode="1" creator="Twee2" ... />
<tw-passagedata pid="1" name="StoryAuthor" tags="" position="">

That'd also explain why it's always "the first entry in the .tw2 file after the StoryTitle" too.

[Comment created by morbus: 2018-09-07]
This appears to be my fault: I'm not using twee2's default "::Start" passage.

[Comment created by morbus: 2018-09-07]
Closing. Solved by switching:

#!
::The motor coach is late
(options)

with:

#!
::Start
[[The motor coach is late]]

::The motor coach is late
(options)

[Comment created by mcdemarco: 2018-09-09]
Yes, BitBucket sent me your messages gradually, and at some point I decided the problem was mainly the lack of a start passage. But DotGraph should still behave a bit better in that situation, so I'm not closing it yet.

"Omit by tags" should default to known or expected omissions

While looking at the known-Twine-tags for #2, I noticed a number of known-tags had to do with hiding nodes from the rendered display, or otherwise indicates nodes that are not considered part of the story map itself (think "Omit special passages" == "Omit special tags"). These tags should probably be defaulted as omissions within DotGraph as well:

https://twinery.org/wiki/tag

  • annotation
  • stylesheet
  • transition
  • script
  • Twine.private

https://twine2.neocities.org/#passagetag_header

  • header
  • footer
  • startup
  • debug-header
  • debug-footer
  • debug-startup

http://www.motoslave.net/sugarcube/1/docs/special-names.html#special-tags
http://www.motoslave.net/sugarcube/2/docs/special-names.html#special-tags

  • script
  • stylesheet
  • widget

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

[Comment created by morbus: 2018-01-14]
Perhaps something like this.

[Comment created by morbus: 2018-01-16]
We should probably include twee2's known tags too:

  • stylesheet
  • script
  • haml
  • twee2

[Comment created by mcdemarco: 2019-06-04]
Added these as a default omission list for the next release. The existing omit tags functionality remains and will continue to omit special tags if that’s how someone has them set up.

[Comment created by mcdemarco: 2019-06-04]
Added in rev. 46.

Dot "Save Source" should use .gv, not .txt, file extension

Per Wikipedia:

https://en.wikipedia.org/wiki/DOT_(graph_description_language)

"DOT is a plain text graph description language. DOT graphs are typically files with the file extension gv or dot. The extension gv is preferred to avoid confusion with the extension dot used by early (pre-2007) versions of Microsoft Word."

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

[Comment created by morbus: 2018-01-14]

[Comment created by mcdemarco: 2019-06-04]
Changed default in rev. 50.

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

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.

→ <>

Tag / passage name conflict causes issue when coloring by tag

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 #9 (comment)

Add option to suffix tags in passage

When a story has a lot of tags, and especially when it has multiple tags per passage, the generated Graph leaves a lot to be desired: 1) There is effectively no end-user inferable meaning to the coloring of a tag; 2) Tags are only ever displayed at the top of the graph, which might be hundreds of pixels away from where you're currently looking; 3) Multiple tags just "don't work" (meaningfully) since only one color is ever seen.

To combat this, I'd like an option to "Add tags as title suffix" or "Suffix title with tags". Presumably this would override/ignore any existing (non-UI) "suffix" values or, alternatively, show up BEFORE the configured "suffix". The end result would be something like the following (though, I wish there were someway of bolding the word "Tags"):

Screen Shot 2021-02-04 at 11 09 00 AM

The above approach COULD be done in a .tw2 file (and was, for that screenshot), but it's messy:

::What's next?
[[Fly directly to a big city\nTags: tagone, tagtwo]]
[[Head to the mountain pass]]
[[Send one of my goblin minions]]
[[That's enough activity]]

::Fly directly to a big city\nTags: tagone, tagtwo [tagone, tagtwo]

Alternatively, maybe just displaying "[tagone, tagtwo]" as the suffix would work (no "Tags: ").

Tag to omit certain passages from overview

There are certain passages I use (such as for debugging) that would be great to be able to omit from the overview using a tag such as dgomit

Thanks!

[Issue created by hbiki: 2017-06-20]
[Last updated on bitbucket: 2017-08-18]

[Comment created by mcdemarco: 2017-08-18]
Implemented in 2.0.2. It will omit whatever tag or tags you choose; note that this may disconnect your graph.

[Comment created by hbiki: 2017-06-20]
Illume uses illumeIgnore. Perhaps dgIgnore or dotgraphIgnore would work...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.