🪢 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): JSON viewer shows copy only on the hovered row (#18622)
Trang Nguyenac3e38394287
diff --git a/web/src/components/table/ValueCell.tsx b/web/src/components/table/ValueCell.tsxindex 6c11569ec8..7ae0a8290d 100644--- a/web/src/components/table/ValueCell.tsx+++ b/web/src/components/table/ValueCell.tsx@@ -42,7 +42,7 @@ const VALUE_TEXT_CLASSES = "font-mono text-xs/5 wrap-break-word";const PREVIEW_TEXT_CLASSES = "text-gray-500 dark:text-gray-400";const ROW_ACTION_BUTTON_CLASSES =- "text-muted-foreground absolute top-0 h-5 w-5 rounded-sm p-0 opacity-0 transition-opacity duration-200 group-hover:opacity-100 hover:bg-transparent hover:text-foreground";+ "text-muted-foreground absolute top-0 h-5 w-5 rounded-sm p-0 opacity-0 transition-opacity duration-200 group-hover/value-cell:opacity-100 hover:bg-transparent hover:text-foreground";const ROW_COPY_OFFSET = "-right-0.5";const ROW_MENU_OFFSET = "-right-1.5";@@ -503,7 +503,7 @@ export const ValueCell = memo(<divclassName={cn(VALUE_TEXT_CLASSES,- "group relative max-w-full",+ "group/value-cell relative max-w-full",singleLine && "w-0 min-w-full",)}>diff --git a/web/src/components/ui/MarkdownJsonView.tsx b/web/src/components/ui/MarkdownJsonView.tsxindex 7a13fb5d22..52eefbd70c 100644--- a/web/src/components/ui/MarkdownJsonView.tsx+++ b/web/src/components/ui/MarkdownJsonView.tsx@@ -76,9 +76,9 @@ export function MarkdownJsonViewHeader({className="text-muted-foreground hover:text-foreground hover:bg-transparent">{isCopied ? (- <Check className="icon-sm text-icon-foreground" />+ <Check className="icon-base text-icon-foreground" />) : (- <Copy className="icon-sm text-icon-foreground" />+ <Copy className="icon-base text-icon-foreground" />)}</Button>)}diff --git a/web/src/components/ui/PrettyJsonView.tsx b/web/src/components/ui/PrettyJsonView.tsxindex 155d74562b..4df92c2f6e 100644--- a/web/src/components/ui/PrettyJsonView.tsx+++ b/web/src/components/ui/PrettyJsonView.tsx@@ -1388,9 +1388,9 @@ export function PrettyJsonView(props: {title={allRowsExpanded ? "Collapse all rows" : "Expand all rows"}>{allRowsExpanded ? (- <FoldVertical className="icon-sm text-icon-foreground" />+ <FoldVertical className="icon-base text-icon-foreground" />) : (- <UnfoldVertical className="icon-sm text-icon-foreground" />+ <UnfoldVertical className="icon-base text-icon-foreground" />)}</Button>)}@@ -1403,9 +1403,9 @@ export function PrettyJsonView(props: {title={jsonIsCollapsed ? "Expand all" : "Collapse all"}>{jsonIsCollapsed ? (- <UnfoldVertical className="icon-sm text-icon-foreground" />+ <UnfoldVertical className="icon-base text-icon-foreground" />) : (- <FoldVertical className="icon-sm text-icon-foreground" />+ <FoldVertical className="icon-base text-icon-foreground" />)}</Button>)}