Skip to content

Commit 0aecd60

Browse files
Add some improvements to the batching (#18)
* Improve display in tree view and bring back monospace font * styling cleanup * tree view optimization 1st pass * add some improvements to the batching * clean up comments * more cleanup * chore: retrigger CI * fix displays * fix formatting * make keys unique --------- Co-authored-by: Robin Heinze <robin.m.heinze@gmail.com>
1 parent e320c2e commit 0aecd60

File tree

5 files changed

+415
-151
lines changed

5 files changed

+415
-151
lines changed

app/components/DetailPanel.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "react-native"
1212
import { themed } from "../theme/theme"
1313
import { TimelineItem } from "../types"
14-
import { TreeView } from "./TreeView"
14+
import { TreeViewWithProvider } from "./TreeView"
1515
import ActionButton from "./ActionButton"
1616
import IRClipboard from "../native/IRClipboard/NativeIRClipboard"
1717
import { $flex } from "../theme/basics"
@@ -141,7 +141,7 @@ function DisplayDetailContent({ item }: { item: TimelineItem & { type: "display"
141141
{typeof name === "string" ? (
142142
<Text style={$valueText()}>{name}</Text>
143143
) : (
144-
<TreeView data={name} />
144+
<TreeViewWithProvider data={name} />
145145
)}
146146
</DetailSection>
147147
) : null}
@@ -150,16 +150,16 @@ function DisplayDetailContent({ item }: { item: TimelineItem & { type: "display"
150150
{typeof preview === "string" ? (
151151
<Text style={$valueText()}>{preview}</Text>
152152
) : (
153-
<TreeView data={preview} />
153+
<TreeViewWithProvider data={preview} />
154154
)}
155155
</DetailSection>
156156
) : null}
157157
{renderImage()}
158158
<DetailSection title="Full Payload">
159-
<TreeView data={rest} />
159+
<TreeViewWithProvider data={rest} />
160160
</DetailSection>
161161
<DetailSection title="Metadata">
162-
<TreeView
162+
<TreeViewWithProvider
163163
data={{
164164
id: item.id,
165165
clientId: item.clientId,
@@ -191,23 +191,23 @@ function LogDetailContent({ item }: { item: TimelineItem & { type: "log" } }) {
191191
{typeof payload.message === "string" ? (
192192
<Text style={$valueText()}>{payload.message}</Text>
193193
) : (
194-
<TreeView data={payload.message} />
194+
<TreeViewWithProvider data={payload.message} />
195195
)}
196196
</DetailSection>
197197

198198
{/* Show stack trace only for error level logs that have stack data */}
199199
{payload.level === "error" && "stack" in payload && (
200200
<DetailSection title="Stack Trace">
201-
<TreeView data={payload.stack} />
201+
<TreeViewWithProvider data={payload.stack} />
202202
</DetailSection>
203203
)}
204204

205205
<DetailSection title="Full Payload">
206-
<TreeView data={payload} />
206+
<TreeViewWithProvider data={payload} />
207207
</DetailSection>
208208

209209
<DetailSection title="Metadata">
210-
<TreeView
210+
<TreeViewWithProvider
211211
data={{
212212
id: item.id,
213213
clientId: item.clientId,
@@ -239,7 +239,7 @@ function NetworkDetailContent({
239239
{payload.request && (
240240
<>
241241
<DetailSection title="Request">
242-
<TreeView data={payload.request} />
242+
<TreeViewWithProvider data={payload.request} />
243243
</DetailSection>
244244
</>
245245
)}
@@ -248,7 +248,7 @@ function NetworkDetailContent({
248248
{payload.response && (
249249
<>
250250
<DetailSection title="Response">
251-
<TreeView data={payload.response} />
251+
<TreeViewWithProvider data={payload.response} />
252252
</DetailSection>
253253
</>
254254
)}
@@ -261,11 +261,11 @@ function NetworkDetailContent({
261261
)}
262262

263263
<DetailSection title="Full Payload">
264-
<TreeView data={payload} />
264+
<TreeViewWithProvider data={payload} />
265265
</DetailSection>
266266

267267
<DetailSection title="Metadata">
268-
<TreeView
268+
<TreeViewWithProvider
269269
data={{
270270
id: item.id,
271271
clientId: item.clientId,

0 commit comments

Comments
 (0)