MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / node_style

Function node_style

atomic-cli/src/commands/query/mod.rs:551–566  ·  view source on GitHub ↗

Returns `(fillcolor, shape)` for a given node kind.

(kind: &str)

Source from the content-addressed store, hash-verified

549
550/// Returns `(fillcolor, shape)` for a given node kind.
551fn node_style(kind: &str) -> (&'static str, &'static str) {
552 match Class::from_iri(kind) {
553 Some(Class::File) => ("#d5f5e3", "box"),
554 Some(Class::Change) => ("#fadbd8", "note"),
555 Some(Class::View) => ("#e8daef", "pentagon"),
556 Some(
557 Class::Goal
558 | Class::WorkIntent
559 | Class::FeatureIntent
560 | Class::BugIntent
561 | Class::ReviewIntent,
562 ) => ("#d1f2eb", "hexagon"),
563 Some(Class::Memory | Class::Identity) => ("#fef9e7", "box"),
564 _ => ("#f2f3f4", "box"),
565 }
566}
567
568/// Build a human-readable label for a node in DOT output.
569fn node_label(node: &KgNode) -> String {

Callers 1

emit_dotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected