🪢 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
refactor(web): one ExpandToggle for show more / show less toggles (#18917)
Trang Nguyenebe64372f1d7
diff --git a/web/src/components/design-system/ExpandToggle/ExpandToggle.stories.tsx b/web/src/components/design-system/ExpandToggle/ExpandToggle.stories.tsxnew file mode 100644index 0000000000..2fbeb849f1--- /dev/null+++ b/web/src/components/design-system/ExpandToggle/ExpandToggle.stories.tsx@@ -0,0 +1,121 @@+import { useState } from "react";+import { expect, fn, userEvent } from "storybook/test";++import preview from "../../../../.storybook/preview";+import { ExpandToggle } from "./ExpandToggle";++type ExpandToggleProps = Parameters<typeof ExpandToggle>[0];++function StatefulExpandToggle(args: ExpandToggleProps) {+ const [expanded, setExpanded] = useState(args.expanded);+ const handleExpandedChange = (next: boolean) => {+ setExpanded(next);+ args.onExpandedChange(next);+ };++ return (+ <ExpandToggle+ {...args}+ expanded={expanded}+ onExpandedChange={handleExpandedChange}+ />+ );+}++const meta = preview.meta({+ component: ExpandToggle,+ args: { expanded: false, onExpandedChange: fn() },+ render: StatefulExpandToggle,+});++export const Plain = meta.story({+ args: { label: "Show more", expandedLabel: "Show less" },+});++export const Underline = meta.story({+ args: {+ variant: "underline",+ label: "Show all 15 templates",+ expandedLabel: "Show fewer",+ },+});++export const WithIcon = meta.story({+ args: {+ variant: "icon",+ label: "Show error details",+ expandedLabel: "Hide error details",+ },+});++export const Overview = meta.story({+ parameters: { controls: { disable: true } },+ render: () => (+ <div className="grid w-fit grid-cols-[auto_auto_auto] items-center justify-items-start gap-x-8 gap-y-4 p-4 text-xs">+ <span className="text-muted-foreground" />+ <span className="text-muted-foreground">Collapsed</span>+ <span className="text-muted-foreground">Expanded</span>+ <span>plain</span>+ <ExpandToggle expanded={false} onExpandedChange={fn()} />+ <ExpandToggle expanded onExpandedChange={fn()} />+ <span>underline</span>+ <ExpandToggle+ expanded={false}+ onExpandedChange={fn()}+ variant="underline"+ label="Show all 15 templates"+ />+ <ExpandToggle+ expanded+ onExpandedChange={fn()}+ variant="underline"+ expandedLabel="Show fewer"+ />+ <span>icon</span>+ <ExpandToggle+ expanded={false}+ onExpandedChange={fn()}+ variant="icon"+ label="Show error details"+ />+ <ExpandToggle+ expanded+ onExpandedChange={fn()}+ variant="icon"+ expandedLabel="Hide error details"+ />+ <span>icon, right</span>+ <ExpandToggle+ expanded={false}+ onExpandedChange={fn()}+ variant="icon"+ iconPosition="right"+ label="Show error details"+ />+ <ExpandToggle+ expanded+ onExpandedChange={fn()}+ variant="icon"+ iconPosition="right"+ expandedLabel="Hide error details"+ />+ <span>size sm (13px)</span>+ <ExpandToggle expanded={false} onExpandedChange={fn()} size="sm" />+ <ExpandToggle expanded onExpandedChange={fn()} size="sm" />+ </div>+ ),+});++export const TogglesState = meta.story({+ name: "(Test) Flips label and aria-expanded",+ args: { label: "Show more", expandedLabel: "Show less" },+ play: async ({ canvas, args }) => {+ const toggle = canvas.getByRole("button", { name: "Show more" });+ await expect(toggle).toHaveAttribute("aria-expanded", "false");+ await userEvent.click(toggle);+ await expect(args.onExpandedChange).toHaveBeenCalledWith(true);+ await expect(+ canvas.getByRole("button", { name: "Show less" }),+ ).toHaveAttribute("aria-expanded", "true");+ },+});diff --git a/web/src/components/design-system/ExpandToggle/ExpandToggle.tsx b/web/src/components/design-system/ExpandToggle/ExpandToggle.tsxnew file mode 100644index 0000000000..e7f4473876--- /dev/null+++ b/web/src/components/design-system/ExpandToggle/ExpandToggle.tsx@@ -0,0 +1,69 @@+import { cva } from "class-variance-authority";+import { ChevronDown, ChevronUp } from "@langfuse/icons";++const expandToggleVariants = cva(+ "text-muted-foreground hover:text-foreground ring-offset-background focus-visible:ring-ring inline-flex items-center gap-1.5 rounded-md whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden",+ {+ variants: {+ variant: {+ plain: "",+ underline: "underline",+ icon: "",+ },+ size: {+ xs: "text-xs",+ sm: "text-sm",+ },+ },+ },+);++type ExpandToggleProps = {+ expanded: boolean;+ onExpandedChange: (expanded: boolean) => void;+ /** Shown while collapsed. */+ label?: string;+ /** Shown while expanded. */+ expandedLabel?: string;+ /** `plain` is muted text, `underline` adds an underline, `icon` adds a chevron that flips with the state. */+ variant?: "plain" | "underline" | "icon";+ /** Which side of the label the icon sits on. */+ iconPosition?: "left" | "right";+ /** Matches the text size: `xs` 12px (default), `sm` 13px. */+ size?: "xs" | "sm";+ /** Id of the element it shows and hides. */+ controls?: string;+};++/** Shows or hides more of a list or a clipped block of content. */+export function ExpandToggle({+ expanded,+ onExpandedChange,+ label = "Show more",+ expandedLabel = "Show less",+ variant = "plain",+ iconPosition = "left",+ size = "xs",+ controls,+}: ExpandToggleProps) {+ const handleClick = () => {+ onExpandedChange(!expanded);+ };+ const Chevron = expanded ? ChevronUp : ChevronDown;+ const icon =+ variant === "icon" ? <Chevron color="inherit" aria-hidden /> : null;++ return (+ <button+ type="button"+ className={expandToggleVariants({ variant, size })}+ aria-expanded={expanded}+ aria-controls={controls}+ onClick={handleClick}+ >+ {iconPosition === "left" ? icon : null}+ {expanded ? expandedLabel : label}+ {iconPosition === "right" ? icon : null}+ </button>+ );+}diff --git a/web/src/components/table/ValueCell.tsx b/web/src/components/table/ValueCell.tsxindex 0bd89a3e5f..b5d4ca0b52 100644--- a/web/src/components/table/ValueCell.tsx+++ b/web/src/components/table/ValueCell.tsx@@ -1,3 +1,4 @@+import { ExpandToggle } from "@/src/components/design-system/ExpandToggle/ExpandToggle";import { memo, type ComponentProps, type JSX, useState } from "react";import { type Row } from "@tanstack/react-table";import { urlRegex } from "@langfuse/shared";@@ -11,7 +12,6 @@ import { classifyMediaValue } from "@/src/components/ui/media/mediaUtils";import { MediaReferenceTag } from "@/src/components/ui/media/MediaReferenceTag";import { copyTextToClipboard } from "@/src/utils/clipboard";import { Button } from "@/src/components/ui/button";-import { Button as TextButton } from "@/src/components/design-system/Button/Button";import { DropdownMenu } from "@/src/components/design-system/DropdownMenu/DropdownMenu";import { cn } from "@/src/utils/tailwind";import { Copy, Check, EllipsisVertical } from "@langfuse/icons";@@ -195,6 +195,12 @@ export const ValueCell = memo(const { value, type } = row.original;const cellId = `${row.id}-value`;const isCellExpanded = expandedCells.has(cellId);+ const handleExpandedChange = () => {+ toggleCellExpansion(cellId);+ };+ const stopPropagation = (event: React.MouseEvent) => {+ event.stopPropagation();+ };const [showCopySuccess, setShowCopySuccess] = useState(false);const handleCopy = async (e: React.MouseEvent) => {@@ -349,14 +355,11 @@ export const ValueCell = memo({content}</span>{needsTruncation && !row.original.hasChildren && (- <div className="flex">- <TextButton- variant="text"- text={isCellExpanded ? "Show less" : "Show more"}- onClick={(e) => {- e.stopPropagation();- toggleCellExpansion(cellId);- }}+ // Keeps the click from reaching the row, which opens the detail view.+ <div className="flex" onClick={stopPropagation}>+ <ExpandToggle+ expanded={isCellExpanded}+ onExpandedChange={handleExpandedChange}/></div>)}diff --git a/web/src/components/table/data-table-controls.tsx b/web/src/components/table/data-table-controls.tsxindex ee1220c6dd..345dd22db2 100644--- a/web/src/components/table/data-table-controls.tsx+++ b/web/src/components/table/data-table-controls.tsx@@ -1,5 +1,6 @@/* eslint-disable no-nested-ternary, @repo/component-file-structure, @typescript-eslint/no-deprecated, @typescript-eslint/no-use-before-define -- Legacy UI usage retained during migration to design-system components. *//* eslint-disable @repo/no-style-props, @repo/no-margin-on-root-elements */+import { Button as DsButton } from "@/src/components/design-system/Button/Button";import {type default as React,createContext,@@ -1658,6 +1659,12 @@ function CategoricalSelectContent({// expand-everything: value lists can run to 1000+ user IDs); "Show fewer// values" collapses back to the cap. Resets by unmounting on collapse.const [visibleCount, setVisibleCount] = useState(MAX_VISIBLE_OPTIONS);+ const handleShowFewerValues = () => {+ setVisibleCount(MAX_VISIBLE_OPTIONS);+ };+ const handleShowMoreValues = () => {+ setVisibleCount((current) => current + SHOW_MORE_INCREMENT);+ };const [searchQuery, setSearchQuery] = useState("");const { tableName = "data" } = useContext(ControlsContext) ?? {};const visibleOptionValues = Array.from(@@ -1916,30 +1923,22 @@ function CategoricalSelectContent({{/* Remaining options, capped */}{visibleRemainingOptions.map(renderOption)}{(canShowMore || canShowFewer) && (- <div className="flex flex-col">+ <div className="mt-1 flex flex-col items-start gap-1 py-1 pl-2">{canShowFewer && (- <Button- variant="ghost"+ <DsButton+ variant="text"size="sm"- onClick={() => setVisibleCount(MAX_VISIBLE_OPTIONS)}- className="mt-1 h-auto w-full justify-start gap-1 py-1 pl-2 text-xs"- >- Show fewer values- </Button>+ text="Show fewer values"+ onClick={handleShowFewerValues}+ />)}{canShowMore && (- <Button- variant="ghost"+ <DsButton+ variant="text"size="sm"- onClick={() =>- setVisibleCount(- (current) => current + SHOW_MORE_INCREMENT,- )- }- className="mt-0.5 h-auto w-full justify-start gap-1 py-1 pl-2 text-xs"- >- Show more values- </Button>+ text="Show more values"+ onClick={handleShowMoreValues}+ />)}</div>)}diff --git a/web/src/features/annotation-queues/components/processors/SessionAnnotationProcessor.tsx b/web/src/features/annotation-queues/components/processors/SessionAnnotationProcessor.tsxindex 6ed7e0b3c7..04a44ee0d2 100644--- a/web/src/features/annotation-queues/components/processors/SessionAnnotationProcessor.tsx+++ b/web/src/features/annotation-queues/components/processors/SessionAnnotationProcessor.tsx@@ -11,6 +11,7 @@ import {} from "@/src/features/sessions";import { useState, useMemo, useCallback } from "react";import { Button } from "@/src/components/ui/button";+import { Button as DsButton } from "@/src/components/design-system/Button/Button";import { ActionButtonCountBadge } from "@/src/components/ui/ActionButtonCountBadge";import { ItemBadge } from "@/src/components/ItemBadge";import { CopyIdsPopover } from "@/src/features/traces";@@ -47,6 +48,9 @@ export const SessionAnnotationProcessor: React.FC<SessionAnnotationProcessorProps> = ({ item, data, configs, projectId }) => {const [visibleTraces, setVisibleTraces] = useState(PAGE_SIZE);+ const handleLoadMoreTraces = () => {+ setVisibleTraces((prev) => prev + PAGE_SIZE);+ };const { isV4 } = useReadPath();// Fetch traces separately when v4 beta is enabled (events table path)@@ -262,12 +266,12 @@ export const SessionAnnotationProcessor: React.FC<{(!isV4 || tracesFromEventsQuery.isSuccess) &&traces.length > visibleTraces && (<div className="flex justify-center py-4">- <Button- onClick={() => setVisibleTraces((prev) => prev + PAGE_SIZE)}- variant="ghost"- >- {`Load ${Math.min(traces.length - visibleTraces, PAGE_SIZE)} More`}- </Button>+ <DsButton+ variant="text"+ size="sm"+ text={`Load ${Math.min(traces.length - visibleTraces, PAGE_SIZE)} More`}+ onClick={handleLoadMoreTraces}+ /></div>)}</div>diff --git a/web/src/features/dashboard/components/cards/DashboardTable.tsx b/web/src/features/dashboard/components/cards/DashboardTable.tsxindex 051925b137..b0c3d2249f 100644--- a/web/src/features/dashboard/components/cards/DashboardTable.tsx+++ b/web/src/features/dashboard/components/cards/DashboardTable.tsx@@ -1,5 +1,5 @@/* eslint-disable no-nested-ternary */-import { ExpandListButton } from "@/src/features/dashboard/components/cards/ExpandListButton";+import { ExpandToggle } from "@/src/components/design-system/ExpandToggle/ExpandToggle";import { type ReactNode, useState } from "react";import { NoDataOrLoading } from "@/src/components/NoDataOrLoading";import { useFitRowCount } from "@/src/features/dashboard/hooks/useFitRowCount";@@ -99,15 +99,19 @@ export const DashboardTable = ({</div></div>{collapse && rows.length > (collapsedCount ?? collapse.collapsed) ? (- <ExpandListButton- isExpanded={isExpanded}- setExpanded={setExpanded}- expandText={- rows.length > collapse.expanded- ? `Show top ${collapse.expanded}`- : "Show all"- }- />+ <div className="mt-2 flex justify-center">+ <ExpandToggle+ variant="icon"+ expanded={isExpanded}+ onExpandedChange={setExpanded}+ label={+ rows.length > collapse.expanded+ ? `Show top ${collapse.expanded}`+ : "Show all"+ }+ expandedLabel="See less"+ />+ </div>) : null}</div>) : (diff --git a/web/src/features/dashboard/components/cards/ExpandListButton.tsx b/web/src/features/dashboard/components/cards/ExpandListButton.tsxdeleted file mode 100644index f967b12932..0000000000--- a/web/src/features/dashboard/components/cards/ExpandListButton.tsx+++ /dev/null@@ -1,32 +0,0 @@-import { DropdownIndicator } from "@/src/components/design-system/DropdownIndicator/DropdownIndicator";-import { Button } from "@/src/components/ui/button";--export const ExpandListButton = ({- isExpanded,- setExpanded,- expandText = "See more",-}: {- isExpanded: boolean;- setExpanded: (isExpanded: boolean) => void;- expandText?: string;-}) => {- return (- <Button- className="mt-2 gap-2"- variant="ghost"- onClick={() => setExpanded(!isExpanded)}- >- {isExpanded ? (- <>- <DropdownIndicator direction="up" nudge />- See less- </>- ) : (- <>- <DropdownIndicator nudge />- {expandText}- </>- )}- </Button>- );-};diff --git a/web/src/features/datasets/components/CsvImportValidationError.tsx b/web/src/features/datasets/components/CsvImportValidationError.tsxindex 4081e1ca58..1070b60c3b 100644--- a/web/src/features/datasets/components/CsvImportValidationError.tsx+++ b/web/src/features/datasets/components/CsvImportValidationError.tsx@@ -1,8 +1,7 @@/* eslint-disable no-nested-ternary */import { useState } from "react";-import { DropdownIndicator } from "@/src/components/design-system/DropdownIndicator/DropdownIndicator";+import { ExpandToggle } from "@/src/components/design-system/ExpandToggle/ExpandToggle";import { Alert } from "@/src/components/design-system/Alert/Alert";-import { Button } from "@/src/components/ui/button";import { type BulkDatasetItemValidationError } from "@langfuse/shared";type CsvImportValidationErrorProps = {@@ -33,20 +32,13 @@ export const CsvImportValidationError: React.FC<Fix the errors in your CSV file and try importing again.</p>- <Button- type="button"- variant="ghost"- size="sm"- onClick={() => setIsExpanded(!isExpanded)}- className="h-auto gap-1 p-0 text-sm font-bold hover:bg-transparent"- >- {isExpanded ? (- <DropdownIndicator nudge />- ) : (- <DropdownIndicator direction="right" nudge />- )}- {isExpanded ? "Hide" : "Show"} error details- </Button>+ <ExpandToggle+ variant="icon"+ expanded={isExpanded}+ label="Show error details"+ expandedLabel="Hide error details"+ onExpandedChange={setIsExpanded}+ />{isExpanded && (<div className="border-destructive/20 bg-destructive/5 mt-3 max-h-[400px] space-y-3 overflow-y-auto rounded-md border p-3">diff --git a/web/src/features/datasets/components/DatasetSchemaValidationError.tsx b/web/src/features/datasets/components/DatasetSchemaValidationError.tsxindex 396274a751..3c753f273a 100644--- a/web/src/features/datasets/components/DatasetSchemaValidationError.tsx+++ b/web/src/features/datasets/components/DatasetSchemaValidationError.tsx@@ -1,8 +1,7 @@import { useState } from "react";import { ExternalLink } from "@langfuse/icons";-import { DropdownIndicator } from "@/src/components/design-system/DropdownIndicator/DropdownIndicator";+import { ExpandToggle } from "@/src/components/design-system/ExpandToggle/ExpandToggle";import { Alert } from "@/src/components/design-system/Alert/Alert";-import { Button } from "@/src/components/ui/button";import Link from "next/link";type ValidationError = {@@ -41,20 +40,13 @@ export const DatasetSchemaValidationError: React.FC<: `${errorCount} item${errorCount === 1 ? "" : "s"} failed validation.`}</p>- <Button- type="button"- variant="ghost"- size="sm"- onClick={() => setIsExpanded(!isExpanded)}- className="h-auto gap-1 p-0 text-sm font-bold hover:bg-transparent"- >- {isExpanded ? (- <DropdownIndicator nudge />- ) : (- <DropdownIndicator direction="right" nudge />- )}- {isExpanded ? "Hide" : "Show"} error details- </Button>+ <ExpandToggle+ variant="icon"+ expanded={isExpanded}+ label="Show error details"+ expandedLabel="Hide error details"+ onExpandedChange={setIsExpanded}+ />{isExpanded && (<div className="border-destructive/20 bg-destructive/5 mt-3 space-y-3 rounded-md border p-3">diff --git a/web/src/features/evals/v2/components/EvaluatorGalleryView/components/EvaluatorGallerySection/EvaluatorGallerySection.tsx b/web/src/features/evals/v2/components/EvaluatorGalleryView/components/EvaluatorGallerySection/EvaluatorGallerySection.tsxindex 87223f8669..2de17e6db4 100644--- a/web/src/features/evals/v2/components/EvaluatorGalleryView/components/EvaluatorGallerySection/EvaluatorGallerySection.tsx+++ b/web/src/features/evals/v2/components/EvaluatorGalleryView/components/EvaluatorGallerySection/EvaluatorGallerySection.tsx@@ -1,5 +1,5 @@/* eslint-disable @typescript-eslint/no-use-before-define */-import { Button } from "@/src/components/design-system/Button/Button";+import { ExpandToggle } from "@/src/components/design-system/ExpandToggle/ExpandToggle";import { InfoTooltip } from "@/src/components/ui/InfoTooltip/InfoTooltip";import { EvaluatorGallerySectionHeader } from "@/src/features/evals/v2/components/EvaluatorGallerySectionHeader/EvaluatorGallerySectionHeader";@@ -97,11 +97,15 @@ function GalleryShowAllToggle({isProjectRows,onToggle,}: GalleryShowAllToggleProps) {- const label = expanded ? "Show fewer" : `Show all ${totalCount} templates`;-return (<div className={isProjectRows ? "-mt-3" : undefined}>- <Button variant="text" size="sm" text={label} onClick={onToggle} />+ <ExpandToggle+ variant="underline"+ expanded={expanded}+ label={`Show all ${totalCount} templates`}+ expandedLabel="Show fewer"+ onExpandedChange={onToggle}+ /></div>);}diff --git a/web/src/features/experiments/components/ExperimentOverviewPanel.tsx b/web/src/features/experiments/components/ExperimentOverviewPanel.tsxindex 5de7e0f875..ace7559b3c 100644--- a/web/src/features/experiments/components/ExperimentOverviewPanel.tsx+++ b/web/src/features/experiments/components/ExperimentOverviewPanel.tsx@@ -1,6 +1,6 @@+import { ExpandToggle } from "@/src/components/design-system/ExpandToggle/ExpandToggle";import { buildLocalIsoDatePresentation } from "@/src/utils/dates";import { useState } from "react";-import { Button } from "@/src/components/ui/button";import Link from "next/link";import { ExperimentMetadataSection } from "./ExperimentMetadataSection";import { ExperimentOverviewField } from "./ExperimentOverviewField";@@ -93,16 +93,13 @@ export function ExperimentOverviewPanel({<ExperimentOverviewField label="Description"><div className="break-words">{displayDescription}</div>{isLongDescription && (- <Button- variant="link"- size="sm"- className="h-auto p-0 text-xs"- onClick={() =>- setIsDescriptionExpanded(!isDescriptionExpanded)- }- >- {isDescriptionExpanded ? "Show less" : "Show more"}- </Button>+ <div>+ <ExpandToggle+ variant="underline"+ expanded={isDescriptionExpanded}+ onExpandedChange={setIsDescriptionExpanded}+ />+ </div>)}</ExperimentOverviewField>)}diff --git a/web/src/features/traces/components/TraceHeader.tsx b/web/src/features/traces/components/TraceHeader.tsxindex cad929740e..0afee4cbad 100644--- a/web/src/features/traces/components/TraceHeader.tsx+++ b/web/src/features/traces/components/TraceHeader.tsx@@ -1,4 +1,5 @@/* eslint-disable @typescript-eslint/no-use-before-define */+import { Button } from "@/src/components/design-system/Button/Button";import { OverflowCountBadge } from "@/src/components/OverflowCountBadge";/** Trace totals, session/user links and tags, above the panels. */@@ -6,7 +7,6 @@ import { useMemo, useState, type ReactNode } from "react";import { GroupedScoreBadges } from "@/src/components/GroupedScoreBadges";import { BadgeShell } from "@/src/components/design-system/Badge/Badge";-import { Button } from "@/src/components/ui/button";import { Skeleton } from "@/src/components/ui/skeleton";import { TagList } from "@/src/features/tag";import {@@ -68,6 +68,9 @@ function TraceHeaderLoading() {function LoadedTraceHeader() {const { trace, observations, mergedScores } = useTraceData();const [showAllTags, setShowAllTags] = useState(false);+ const handleShowFewerTags = () => {+ setShowAllTags(false);+ };const aggregatedMetrics = useMemo(() => aggregateTraceMetrics(observations),@@ -130,14 +133,11 @@ function LoadedTraceHeader() {)}{showAllTags && trace.tags.length > MAX_VISIBLE_TAGS && (<Button- variant="tertiary"- size="icon-sm"- className="w-fit"- aria-label="Show fewer tags"- onClick={() => setShowAllTags(false)}- >- Show fewer- </Button>+ variant="text"+ size="sm"+ text="Show fewer"+ onClick={handleShowFewerTags}+ />)}</div>)}diff --git a/web/src/features/traces/components/TracePanelNavigationLayoutDesktop/components/TracePanelNavigationHiddenNotice.tsx b/web/src/features/traces/components/TracePanelNavigationLayoutDesktop/components/TracePanelNavigationHiddenNotice.tsxindex 5560ccd182..9d341aa95f 100644--- a/web/src/features/traces/components/TracePanelNavigationLayoutDesktop/components/TracePanelNavigationHiddenNotice.tsx+++ b/web/src/features/traces/components/TracePanelNavigationLayoutDesktop/components/TracePanelNavigationHiddenNotice.tsx@@ -12,6 +12,7 @@*/import { ObservationLevel } from "@langfuse/shared";+import { Button } from "@/src/components/design-system/Button/Button";import { useTraceData } from "@/src/features/traces/contexts/TraceDataProvider";import { useViewPreferences } from "@/src/features/traces/contexts/ViewPreferencesProvider";@@ -35,19 +36,12 @@ export function TracePanelNavigationHiddenNotice() {{hiddenObservationsCount} hidden observations below{" "}{minObservationLevel} level.</p>- <p- className="cursor-pointer underline"+ <Button+ variant="text"+ size="sm"+ text="Show all"onClick={handleShowAll}- role="button"- tabIndex={0}- onKeyDown={(e) => {- if (e.key === "Enter" || e.key === " ") {- handleShowAll();- }- }}- >- Show all- </p>+ /></span></div>);