dustin / graphex

Dependency graph viewer CLI tool
Other
10 stars 3 forks source link

Make Looking Glass JSON roundtrip #10

Open ramirez7 opened 1 year ago

ramirez7 commented 1 year ago

Right now, we lose information such as the color of the nodes. If we preserve those through transformations, then things like filtering etc could also be subcommands in addition to options during generation.

ramirez7 commented 1 year ago

Alternatively, maybe our main format should just be one we own.

dustin commented 1 year ago

Yeah, in an older version, there was a bit more structure, but it didn't seem necessary. Building some values that can contain attributes again independently of the links is doable. It could also just be a sparse node-attributes map and maybe an edge map. Otherwise, fall back to the Data.Graph inspired design.

dustin commented 1 year ago

The looking glass stuff is getting just a bit weird. It's got a set of attributes attached per-node, but the color isn't one of them. It wouldn't be hard to special case that, I guess.

There's also the title, which would could store as an attribute of "" as the overall document. Kind of a hack, but Doing It Right seems like a lot of work that doesn't really help all that much.