Skip to content

Commit 1ce9943

Browse files
committed
Change node data being visualized
The only important fields of a node is its state, props, and rendering. Its and the parent node's ID's are less significant, and have been moved out of their own detailed cards to avoid cluttering up the info panel
1 parent 25d04a4 commit 1ce9943

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

workflow-trace-viewer/src/jvmMain/kotlin/com/squareup/workflow1/traceviewer/model/Node.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@ internal data class Node(
3434

3535
companion object {
3636
fun getNodeFields(): List<String> {
37-
return listOf("id", "parent", "parentId", "props", "state", "rendering")
37+
return listOf("props", "state", "rendering")
3838
}
3939

4040
fun getNodeData(node: Node, field: String): String {
4141
return when (field.lowercase()) {
42-
"id" -> node.id
43-
"parent" -> node.parent
44-
"parentid" -> node.parentId
4542
"props" -> node.props
4643
"state" -> node.state
4744
"rendering" -> node.rendering

workflow-trace-viewer/src/jvmMain/kotlin/com/squareup/workflow1/traceviewer/ui/WorkflowInfoPanel.kt

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,22 @@ private fun NodePanelDetails(
9898
}
9999
item {
100100
Text(
101-
text = node.current.name,
102-
style = MaterialTheme.typography.h6,
103-
modifier = Modifier.padding(top = 8.dp, bottom = 8.dp),
101+
text = "${node.current.parent} (ID: ${node.current.parentId})",
102+
style = MaterialTheme.typography.subtitle2,
103+
color = Color.Gray,
104+
modifier = Modifier.padding(top = 8.dp)
105+
)
106+
Text(
107+
text = "",
108+
style = MaterialTheme.typography.subtitle1,
109+
color = Color.Gray,
110+
modifier = Modifier.padding(start = 8.dp)
111+
)
112+
Text(
113+
text = "${node.current.name} (ID: ${node.current.id})",
114+
style = MaterialTheme.typography.h5,
115+
fontWeight = FontWeight.SemiBold,
116+
modifier = Modifier.padding(8.dp),
104117
textAlign = TextAlign.Center
105118
)
106119
}

0 commit comments

Comments
 (0)