🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(web): Table row spacing consistency (#13568)
Ben Bachem84952c0eb567
diff --git a/web/src/components/level-counts-display.tsx b/web/src/components/level-counts-display.tsxindex 8a89ee86b5..2d55bbed11 100644--- a/web/src/components/level-counts-display.tsx+++ b/web/src/components/level-counts-display.tsx@@ -19,7 +19,13 @@ export function LevelCountsDisplay({counts,isLoading,}: LevelCountsDisplayProps) {- if (isLoading) return <Skeleton className="h-3 w-1/2" />;+ if (isLoading) {+ return (+ <div className="flex min-h-6 items-center">+ <Skeleton className="h-4 w-1/2" />+ </div>+ );+ }const nonZeroCounts = counts.filter((item) => item.count > 0);diff --git a/web/src/components/table/types.ts b/web/src/components/table/types.tsindex 89f73e47db..ac8110e909 100644--- a/web/src/components/table/types.ts+++ b/web/src/components/table/types.ts@@ -6,26 +6,26 @@ export type TableRowOptions = {options: { label: string; value: number; icon?: LucideIcon }[];};-// extends tanstack ColumnDef to include additional properties-type ExtendedColumnDef<TData extends RowData, TValue = unknown> = ColumnDef<- TData,- TValue-> & {- defaultHidden?: boolean;- headerTooltip?: {- description: React.ReactNode;- href?: string;- };- isFixedPosition?: boolean; // if true, column cannot be reordered- isPinnedLeft?: boolean; // if true, column will be pinned to left side- loadingCell?: React.ReactNode | (() => React.ReactNode);-};+declare module "@tanstack/react-table" {+ // extends tanstack ColumnDef to include additional properties+ // eslint-disable-next-line @typescript-eslint/no-unused-vars+ interface ColumnDefBase<TData extends RowData, TValue = unknown> {+ defaultHidden?: boolean;+ headerTooltip?: {+ description: React.ReactNode;+ href?: string;+ };+ isFixedPosition?: boolean; // if true, column cannot be reordered+ isPinnedLeft?: boolean; // if true, column will be pinned to left side+ loadingCell?: React.ReactNode | (() => React.ReactNode);+ }+}// limits types of defined tanstack ColumnDef properties to specific subset of tanstack type unionexport type LangfuseColumnDef<TData extends RowData,TValue = unknown,-> = ExtendedColumnDef<TData, TValue> & {+> = ColumnDef<TData, TValue> & {// Enforce langfuse columns to be of type 'AccessorKeyColumnDefBase' with 'accessorKey' property of type stringaccessorKey: string;// Enforce langfuse group columns to have children of type 'LangfuseColumnDef'diff --git a/web/src/features/batch-actions/components/BatchActionsTable.tsx b/web/src/features/batch-actions/components/BatchActionsTable.tsxindex 0e4568007f..6fe4ce391f 100644--- a/web/src/features/batch-actions/components/BatchActionsTable.tsx+++ b/web/src/features/batch-actions/components/BatchActionsTable.tsx@@ -206,6 +206,7 @@ export function BatchActionsTable(props: { projectId: string }) {onChange: setPaginationState,state: paginationState,}}+ cellPadding="comfortable"/>);}diff --git a/web/src/features/batch-exports/components/BatchExportsTable.tsx b/web/src/features/batch-exports/components/BatchExportsTable.tsxindex a11c9adbfa..a942e79233 100644--- a/web/src/features/batch-exports/components/BatchExportsTable.tsx+++ b/web/src/features/batch-exports/components/BatchExportsTable.tsx@@ -247,6 +247,7 @@ export function BatchExportsTable(props: { projectId: string }) {onChange: setPaginationState,state: paginationState,}}+ cellPadding="comfortable"/></>);diff --git a/web/src/features/dashboard/components/DashboardTable.tsx b/web/src/features/dashboard/components/DashboardTable.tsxindex 1132fb252d..2387f464a3 100644--- a/web/src/features/dashboard/components/DashboardTable.tsx+++ b/web/src/features/dashboard/components/DashboardTable.tsx@@ -243,7 +243,7 @@ export function DashboardTable() {<div onClick={(e) => e.stopPropagation()}><DropdownMenu><DropdownMenuTrigger asChild>- <Button variant="ghost">+ <Button size="xs" variant="ghost"><MoreVertical className="h-4 w-4" /></Button></DropdownMenuTrigger>@@ -312,6 +312,7 @@ export function DashboardTable() {`/project/${projectId}/dashboards/${encodeURIComponent(row.id)}`,);}}+ cellPadding="comfortable"/>);}diff --git a/web/src/features/evals/components/evaluator-table.tsx b/web/src/features/evals/components/evaluator-table.tsxindex 9363a212a0..0fe691795a 100644--- a/web/src/features/evals/components/evaluator-table.tsx+++ b/web/src/features/evals/components/evaluator-table.tsx@@ -64,6 +64,11 @@ import {useEvaluatorTableData,} from "@/src/features/evals/hooks/useEvaluatorTableData";import Spinner from "@/src/components/design-system/Spinner/Spinner";+import {+ TableBadgeLoadingCell,+ TableIconButtonLoadingCell,+ TableTextLoadingCell,+} from "@/src/components/table/loading-cells";function LegacyBadgeCell({ status }: { status: string }) {return (@@ -189,6 +194,7 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {header: "Status",id: "status",size: 80,+ loadingCell: <TableBadgeLoadingCell />,cell: (row) => {const status = row.getValue();return (@@ -233,6 +239,7 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {header: "Logs",id: "logs",size: 150,+ loadingCell: <Skeleton className="h-6 w-16 rounded-md" />,cell: ({ row }) => {const id = row.original.id;return (@@ -257,6 +264,12 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {id: "template",header: "Referenced Evaluator",size: 200,+ loadingCell: (+ <div className="flex items-center gap-2">+ <TableTextLoadingCell className="w-32" />+ <TableBadgeLoadingCell className="w-6" />+ </div>+ ),cell: ({ row }) => {const template = row.original.template;if (!template) return "template not found";@@ -287,6 +300,7 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {header: "Eval Version",size: 180,enableHiding: true,+ loadingCell: <TableBadgeLoadingCell />,cell: (row) => {const targetObject = row.row.original.target;const status = row.row.original.rawStatus;@@ -354,6 +368,7 @@ export default function EvaluatorTable({ projectId }: { projectId: string }) {header: "Actions",id: "actions",size: 100,+ loadingCell: <TableIconButtonLoadingCell />,cell: ({ row }) => {const id = row.original.id;return (diff --git a/web/src/features/prompts/components/prompts-table.tsx b/web/src/features/prompts/components/prompts-table.tsxindex 4f567676d3..92901bc396 100644--- a/web/src/features/prompts/components/prompts-table.tsx+++ b/web/src/features/prompts/components/prompts-table.tsx@@ -479,6 +479,7 @@ export function PromptTable() {onChange: setPaginationAndFolderState,state: paginationState,}}+ cellPadding="comfortable"/></div></ResizableFilterLayout>diff --git a/web/src/features/widgets/components/WidgetTable.tsx b/web/src/features/widgets/components/WidgetTable.tsxindex ec323f3bc3..ef94f905b5 100644--- a/web/src/features/widgets/components/WidgetTable.tsx+++ b/web/src/features/widgets/components/WidgetTable.tsx@@ -247,6 +247,7 @@ export function DashboardWidgetTable() {}orderBy={orderByState}setOrderBy={setOrderByState}+ cellPadding="comfortable"pagination={{totalCount: widgets.data?.totalCount ?? null,onChange: setPaginationState,diff --git a/web/src/pages/project/[projectId]/users.tsx b/web/src/pages/project/[projectId]/users.tsxindex 069fbfd083..168c6a3479 100644--- a/web/src/pages/project/[projectId]/users.tsx+++ b/web/src/pages/project/[projectId]/users.tsx@@ -479,6 +479,7 @@ const UsersTable = ({ isBetaEnabled }: { isBetaEnabled: boolean }) => {onChange: setPaginationState,state: paginationState,}}+ cellPadding="comfortable"/></>);