Skip to content

Commit

Permalink
FranzCross,result-detail: add stack support
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed Nov 5, 2023
1 parent 7bbe400 commit d4e8d83
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion FranzCross/result-detail.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
(chart-view c)]
[(ReduceResult.number n)
(text-view (number->string n))]
[(ReduceResult.stack s)
(apply
(case (Stack-direction s)
[(horizontal) hpanel]
[(vertical) vpanel])
(map result-detail (Stack-children s)))]
[(ReduceResult.table columns rows)
(hpanel
#:min-size '(400 200)
Expand Down Expand Up @@ -80,7 +86,7 @@
(vpanel
(choice
#:stretch '(#t #f)
'(chart number table text)
'(chart number stack table text)
#:choice->label symbol->string
#:selection @kind
@kind:=))
Expand All @@ -99,6 +105,12 @@
#:y-label "y"
#:ys (map ChartValue.numerical '(4 5 6))))]
['number (ReduceResult.number 42)]
['stack (ReduceResult.stack
(make-Stack
#:direction 'horizontal
#:children (list
(ReduceResult.text "hello")
(ReduceResult.table '("a" "b") null))))]
['table (ReduceResult.table
'("a" "b")
(list
Expand Down

0 comments on commit d4e8d83

Please sign in to comment.