Skip to content

Commit c6baff9

Browse files
committed
feat: show result information in Text block drilldown in react ui
Signed-off-by: Nick Mitchell <[email protected]>
1 parent e4fef24 commit c6baff9

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import type Model from "../timeline/model"
22

3-
export default function BlockNotFound(_props: { id: string; model: Model }) {
3+
export default function BlockNotFound(props: { id: string; model: Model }) {
4+
console.error(
5+
"Block not found",
6+
props.id,
7+
props.model.map((b) => b.id),
8+
)
49
return <div>Block not found</div>
510
}

pdl-live-react/src/view/detail/SummaryTabContent.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import CallItems from "./kind/Call"
77
import CodeItems from "./kind/Code"
88
import DataItems from "./kind/Data"
99
import ReadItems from "./kind/Read"
10+
import TextItems from "./kind/Text"
1011
import ModelItems from "./kind/Model"
1112
import FunctionItems from "./kind/Function"
1213

@@ -23,6 +24,7 @@ function descriptionItems(block: import("../../helpers").NonScalarPdlBlock) {
2324
.with({ kind: "code" }, (block) => <CodeItems block={block} />)
2425
.with({ kind: "data" }, (block) => <DataItems block={block} />)
2526
.with({ kind: "read" }, (block) => <ReadItems block={block} />)
27+
.with({ kind: "text" }, (block) => <TextItems block={block} />)
2628
.with({ kind: "model" }, (block) => <ModelItems block={block} />)
2729
.with({ kind: "function" }, (block) => <FunctionItems block={block} />)
2830
.otherwise(() => <>This is a {block.kind} block</>)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Result from "../../transcript/Result"
2+
3+
export default function TextItems({
4+
block: { result },
5+
}: {
6+
block: import("../../../pdl_ast").TextBlock
7+
}) {
8+
return <Result result={result} />
9+
}

0 commit comments

Comments
 (0)