Skip to content

Commit e40a6fc

Browse files
committed
feat(webapp): thin scrollbars and inline empty objects in the sample tree
Use the app's thin scrollbar style in the sample panel instead of the default chunky one, and render empty objects/arrays inline as {} / [].
1 parent 76ca32b commit e40a6fc

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

apps/webapp/app/components/runs/v3/SmartColumnSample.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function SmartColumnSample({
2020
onSelectPath: (path: string) => void;
2121
}) {
2222
return (
23-
<div className="max-h-52 overflow-auto rounded bg-charcoal-900 p-2 font-mono text-xs leading-relaxed">
23+
<div className="max-h-52 overflow-auto rounded bg-charcoal-900 p-2 font-mono text-xs leading-relaxed scrollbar-thin scrollbar-track-transparent scrollbar-thumb-surface-control">
2424
<JsonNode
2525
name={undefined}
2626
path="$"
@@ -81,6 +81,19 @@ function JsonNode({
8181
const openBrace = isArray ? "[" : "{";
8282
const closeBrace = isArray ? "]" : "}";
8383

84+
if (entries.length === 0) {
85+
return (
86+
<div className="whitespace-pre px-0.5">
87+
{keyLabel !== null && <span className="text-sky-300">{keyLabel}</span>}
88+
{keyLabel !== null && <span className="text-text-dimmed">: </span>}
89+
<span className="text-text-dimmed">
90+
{openBrace}
91+
{closeBrace}
92+
</span>
93+
</div>
94+
);
95+
}
96+
8497
return (
8598
<div>
8699
<div className="whitespace-pre px-0.5">

0 commit comments

Comments
 (0)