Skip to content

Commit

Permalink
Fixed the scrolling on the JSON editor on the test page
Browse files Browse the repository at this point in the history
  • Loading branch information
samejr committed Nov 19, 2024
1 parent 8ba226b commit c044cb1
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function StandardTaskForm({ task, runs }: { task: TestTask["task"]; runs: Standa
<input type="hidden" name="triggerSource" value={"STANDARD"} />
<ResizablePanelGroup orientation="horizontal">
<ResizablePanel id="test-task-main" min="100px" default="60%">
<div className="h-full bg-charcoal-900">
<div className="flex h-full flex-col overflow-hidden bg-charcoal-900">
<TabContainer className="px-3 pt-2">
<TabButton
isActive={!tab || tab === "payload"}
Expand All @@ -248,7 +248,7 @@ function StandardTaskForm({ task, runs }: { task: TestTask["task"]; runs: Standa
Metadata
</TabButton>
</TabContainer>
<div>
<div className="flex-1 overflow-hidden">
<JSONEditor
defaultValue={defaultPayloadJson}
readOnly={false}
Expand All @@ -265,11 +265,9 @@ function StandardTaskForm({ task, runs }: { task: TestTask["task"]; runs: Standa
}
}}
height="100%"
min-height="100%"
max-height="100%"
autoFocus={!tab || tab === "payload"}
placeholder="{ }"
className={cn("h-full", tab === "metadata" && "hidden")}
className={cn("h-full overflow-auto", tab === "metadata" && "hidden")}
/>
<JSONEditor
defaultValue={defaultMetadataJson}
Expand All @@ -287,11 +285,9 @@ function StandardTaskForm({ task, runs }: { task: TestTask["task"]; runs: Standa
}
}}
height="100%"
min-height="100%"
max-height="100%"
autoFocus={tab === "metadata"}
placeholder=""
className={cn("h-full", tab !== "metadata" && "hidden")}
className={cn("h-full overflow-auto", tab !== "metadata" && "hidden")}
/>
</div>
</div>
Expand Down

0 comments on commit c044cb1

Please sign in to comment.