Skip to content

Commit bb54e97

Browse files
authored
Show text wrapping on code blocks (#2338)
* Show text wrapping on deployment code blocks * Show textWrapping on some more CodeBlocks * Adds missing margins to the error block
1 parent edafc71 commit bb54e97

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type DeploymentErrorProps = {
99

1010
export function DeploymentError({ errorData }: DeploymentErrorProps) {
1111
return (
12-
<div className="flex flex-col gap-2 rounded-sm border border-rose-500/50 p-3">
12+
<div className="mx-3 mb-3 flex flex-col gap-2 rounded-sm border border-rose-500/50 p-3">
1313
<DeploymentErrorHeader title={errorData.name ?? "Error"} titleClassName="text-rose-500" />
1414
{errorData.message && <Callout variant="error">{errorData.message}</Callout>}
1515
{errorData.stack && (
@@ -18,6 +18,7 @@ export function DeploymentError({ errorData }: DeploymentErrorProps) {
1818
showLineNumbers={false}
1919
code={errorData.stack}
2020
maxLines={20}
21+
showTextWrapping
2122
/>
2223
)}
2324
{errorData.stderr && (
@@ -28,6 +29,7 @@ export function DeploymentError({ errorData }: DeploymentErrorProps) {
2829
showLineNumbers={false}
2930
code={errorData.stderr}
3031
maxLines={20}
32+
showTextWrapping
3133
/>
3234
</>
3335
)}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function PacketDisplay({
5050
code={data}
5151
maxLines={20}
5252
showLineNumbers={false}
53+
showTextWrapping
5354
/>
5455
);
5556
}

apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,12 +758,12 @@ function RunBody({
758758
</div>
759759
) : tab === "context" ? (
760760
<div className="flex flex-col gap-4 py-3">
761-
<CodeBlock code={run.context} showLineNumbers={false} />
761+
<CodeBlock code={run.context} showLineNumbers={false} showTextWrapping />
762762
</div>
763763
) : tab === "metadata" ? (
764764
<div className="flex flex-col gap-4 py-3">
765765
{run.metadata ? (
766-
<CodeBlock code={run.metadata} showLineNumbers={false} />
766+
<CodeBlock code={run.metadata} showLineNumbers={false} showTextWrapping />
767767
) : (
768768
<Callout to="https://trigger.dev/docs/runs/metadata" variant="docs">
769769
No metadata set for this run. View our metadata documentation to learn more.

0 commit comments

Comments
 (0)