Skip to content

Commit e947472

Browse files
committed
minor QOL changes in appearance
1 parent 97f8e77 commit e947472

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import io.github.vinceglb.filekit.dialogs.FileKitType
2323
import io.github.vinceglb.filekit.dialogs.compose.rememberFilePickerLauncher
2424
import io.github.vinceglb.filekit.readString
2525

26+
2627
@Composable
2728
public fun App() {
2829
Box {

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Box
77
import androidx.compose.foundation.layout.Column
88
import androidx.compose.foundation.layout.Row
99
import androidx.compose.foundation.layout.Spacer
10+
import androidx.compose.foundation.layout.fillMaxSize
1011
import androidx.compose.foundation.layout.padding
1112
import androidx.compose.material.Text
1213
import androidx.compose.runtime.Composable
@@ -43,19 +44,23 @@ public data class WorkflowNode (
4344

4445
/**
4546
* Since the workflow nodes present a tree structure, we utilize a recursive function to draw the tree
46-
*
47+
* The Column holds a subtree of nodes, and the Row holds all the children of the current node
4748
*/
4849
@Composable
4950
public fun DrawWorkflowTree(
5051
node: WorkflowNode,
5152
) {
5253
Column(
53-
modifier = Modifier.padding(10.dp).border(1.dp,Color.Black),
54+
modifier = Modifier
55+
.padding(5.dp)
56+
.border(1.dp,Color.Black)
57+
.fillMaxSize(),
5458
horizontalAlignment = Alignment.CenterHorizontally,
5559
) {
60+
// draws itself
5661
drawNode(node)
57-
if (node.children.isEmpty()) return@Column
5862

63+
// draws children recursively
5964
Row (
6065
horizontalArrangement = Arrangement.Center,
6166
verticalAlignment = Alignment.Top

0 commit comments

Comments
 (0)