Skip to content

Commit c8e6ebe

Browse files
committed
Environment col shows slug. Improved table header styles
1 parent bbde1cb commit c8e6ebe

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

apps/webapp/app/components/code/TSQLResultsTable.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { useVirtualizer } from "@tanstack/react-virtual";
1919
import { formatDurationMilliseconds, MachinePresetName } from "@trigger.dev/core/v3";
2020
import { ClipboardCheckIcon, ClipboardIcon } from "lucide-react";
2121
import { forwardRef, memo, useEffect, useMemo, useRef, useState } from "react";
22-
import { EnvironmentLabel } from "~/components/environments/EnvironmentLabel";
22+
import { EnvironmentLabel, EnvironmentSlug } from "~/components/environments/EnvironmentLabel";
2323
import { MachineLabelCombo } from "~/components/MachineLabelCombo";
2424
import { DateTimeAccurate } from "~/components/primitives/DateTime";
2525
import {
@@ -666,7 +666,7 @@ function EnvironmentCellValue({ value }: { value: string }) {
666666
return <span>{value}</span>;
667667
}
668668

669-
return <EnvironmentLabel environment={environment} />;
669+
return <EnvironmentSlug environment={environment} />;
670670
}
671671

672672
function JSONCellValue({ value }: { value: unknown }) {
@@ -782,7 +782,7 @@ function HeaderCellContent({
782782
return (
783783
<div
784784
className={cn(
785-
"flex w-full items-center gap-1 overflow-hidden bg-background-dimmed px-2 py-1.5",
785+
"flex w-full items-center gap-1 overflow-hidden bg-background-dimmed py-1.5 pl-2 pr-1",
786786
"font-mono text-xs font-medium text-text-bright",
787787
alignment === "right" && "justify-end",
788788
canSort && "cursor-pointer select-none"
@@ -827,14 +827,10 @@ function HeaderCellContent({
827827
e.stopPropagation();
828828
onFilterClick();
829829
}}
830-
className={cn(
831-
"flex-shrink-0 rounded p-0.5 transition-colors",
832-
"hover:bg-charcoal-700",
833-
"text-text-dimmed hover:text-text-bright"
834-
)}
830+
className="flex-shrink-0 rounded text-text-dimmed transition-colors hover:bg-charcoal-700 hover:text-text-bright"
835831
title="Toggle column filters"
836832
>
837-
<FunnelIcon className="size-3.5" />
833+
<FunnelIcon className="size-3" />
838834
</button>
839835
)}
840836
</div>

apps/webapp/app/components/environments/EnvironmentLabel.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ export function EnvironmentLabel({
138138
return content;
139139
}
140140

141+
export function EnvironmentSlug({ environment }: { environment: Environment & { slug: string } }) {
142+
return (
143+
<span className={cn("text-sm text-text-bright", environmentTextClassName(environment))}>
144+
{environment.slug}
145+
</span>
146+
);
147+
}
148+
141149
export function environmentTitle(environment: Environment, username?: string) {
142150
if (environment.branchName) {
143151
return environment.branchName;

apps/webapp/app/components/primitives/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export function InfoIconTooltip({
123123
enabled?: boolean;
124124
}) {
125125
const icon = (
126-
<InformationCircleIcon className={cn("size-3.5 text-text-dimmed", buttonClassName)} />
126+
<InformationCircleIcon className={cn("size-3.5 text-text-dimmed flex-0", buttonClassName)} />
127127
);
128128

129129
if (!enabled) return icon;

0 commit comments

Comments
 (0)