Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(ui): show info message in column selector (#2783)

Marc Klingen25f6c6966e9a
diff --git a/web/src/components/layouts/doc-popup.tsx b/web/src/components/layouts/doc-popup.tsx
index 08ff851d84..d82c59d436 100644
--- a/web/src/components/layouts/doc-popup.tsx
+++ b/web/src/components/layouts/doc-popup.tsx
@@ -5,27 +5,14 @@ import {
} from "@/src/components/ui/hover-card";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import { cn } from "@/src/utils/tailwind";
-import { HelpCircle, Info } from "lucide-react";
+import { Info } from "lucide-react";
export type DocPopupProps = {
description: React.ReactNode;
href?: string;
- style?: "question" | "info";
- size?: "xs" | "sm" | "md" | "lg";
};
-export default function DocPopup({
- description,
- href,
- style = "info",
- size = "sm",
-}: DocPopupProps) {
- const sizes = {
- xs: "w-3 h-3",
- sm: "w-4 h-4",
- md: "w-6 h-6",
- lg: "w-8 h-8",
- };
+export default function DocPopup({ description, href }: DocPopupProps) {
const capture = usePostHogClientCapture();
return (
@@ -57,12 +44,7 @@ export default function DocPopup({
});
}}
>
- {
- {
- question: <HelpCircle className={sizes[size]} />,
- info: <Info className={sizes[size]} />,
- }[style]
- }
+ <Info className={"h-3 w-3"} />
</div>
</HoverCardTrigger>
<HoverCardContent>
diff --git a/web/src/components/layouts/header.tsx b/web/src/components/layouts/header.tsx
index dd4cae6d6f..b933930fb6 100644
--- a/web/src/components/layouts/header.tsx
+++ b/web/src/components/layouts/header.tsx
@@ -106,7 +106,6 @@ export default function Header({
<DocPopup
description={props.help.description}
href={props.help.href}
- size="sm"
/>
) : null}
{props.featureBetaURL ? (
diff --git a/web/src/components/table/data-table-column-visibility-filter.tsx b/web/src/components/table/data-table-column-visibility-filter.tsx
index e760c8b105..dc0dda1b01 100644
--- a/web/src/components/table/data-table-column-visibility-filter.tsx
+++ b/web/src/components/table/data-table-column-visibility-filter.tsx
@@ -15,6 +15,7 @@ import { type VisibilityState } from "@tanstack/react-table";
import { ChevronDown, Columns } from "lucide-react";
import { type LangfuseColumnDef } from "@/src/components/table/types";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
+import DocPopup from "@/src/components/layouts/doc-popup";
interface DataTableColumnVisibilityFilterProps<TData, TValue> {
columns: LangfuseColumnDef<TData, TValue>[];
@@ -98,13 +99,20 @@ export function DataTableColumnVisibilityFilter<TData, TValue>({
column.enableHiding && (
<DropdownMenuCheckboxItem
key={index}
- className="capitalize"
checked={columnVisibility[column.accessorKey]}
- onCheckedChange={() =>
- toggleColumn(column.accessorKey.toString())
- }
+ onCheckedChange={() => toggleColumn(column.accessorKey)}
>
- {column.header?.toString() ?? column.accessorKey.toString()}
+ <span className="capitalize">
+ {column.header && typeof column.header === "string"
+ ? column.header
+ : column.accessorKey}
+ </span>
+ {column.headerTooltip && (
+ <DocPopup
+ description={column.headerTooltip.description}
+ href={column.headerTooltip.href}
+ />
+ )}
</DropdownMenuCheckboxItem>
),
)}
diff --git a/web/src/components/table/data-table.tsx b/web/src/components/table/data-table.tsx
index ceb5ad3b7a..f583955deb 100644
--- a/web/src/components/table/data-table.tsx
+++ b/web/src/components/table/data-table.tsx
@@ -188,7 +188,6 @@ export function DataTable<TData extends object, TValue>({
columnDef.headerTooltip.description
}
href={columnDef.headerTooltip.href}
- size="xs"
/>
)}
@@ -244,7 +243,6 @@ export function DataTable<TData extends object, TValue>({
<DocPopup
description={help.description}
href={help.href}
- size="sm"
/>
)}
</div>
diff --git a/web/src/ee/features/evals/components/eval-config-form.tsx b/web/src/ee/features/evals/components/eval-config-form.tsx
index ffc1867672..20cf01d716 100644
--- a/web/src/ee/features/evals/components/eval-config-form.tsx
+++ b/web/src/ee/features/evals/components/eval-config-form.tsx
@@ -337,7 +337,6 @@ export const InnerEvalConfigForm = (props: {
href={
"https://langfuse.com/docs/scores/model-based-evals"
}
- size="xs"
/>
</div>
<FormField
@@ -569,7 +568,7 @@ function VariableMappingDescription(p: {
return (
<div className="flex w-1/2 items-center">
<Label className="muted-foreground text-sm font-light">{p.title}</Label>
- <DocPopup description={p.description} href={p.href} size="xs" />
+ <DocPopup description={p.description} href={p.href} />
</div>
);
}
diff --git a/web/src/features/manual-scoring/components/CreateScoreConfigButton.tsx b/web/src/features/manual-scoring/components/CreateScoreConfigButton.tsx
index 427d0fe4d6..a55f3725e0 100644
--- a/web/src/features/manual-scoring/components/CreateScoreConfigButton.tsx
+++ b/web/src/features/manual-scoring/components/CreateScoreConfigButton.tsx
@@ -287,8 +287,7 @@ export function CreateScoreConfigButton({ projectId }: { projectId: string }) {
? "category"
: "boolean"
} label is mapped to an integer value internally.`}
- size="xs"
- ></DocPopup>
+ />
</FormLabel>
<FormLabel>Label</FormLabel>
</div>