From 4cc0cd3f5be78d72fcde69502efbd0af94b2dbe7 Mon Sep 17 00:00:00 2001 From: Mahmoud Mabrouk Date: Thu, 4 Dec 2025 18:28:01 +0100 Subject: [PATCH 1/7] Enhance Playground Generation Components with Collapse Functionality - Added global collapse state management for generation components, allowing users to expand or collapse all generations at once. - Integrated collapse/expand buttons in the GenerationComparisonHeader and GenerationHeader components. - Updated SingleView to reflect the global collapse state and added local collapse functionality for individual test cases. - Improved UI with new icons and tooltip buttons for better user experience. --- .../GenerationComparisonHeader/index.tsx | 24 +- .../GenerationCompletionRow/SingleView.tsx | 297 ++++++++++++++---- .../assets/GenerationHeader/index.tsx | 37 ++- 3 files changed, 281 insertions(+), 77 deletions(-) diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx index 31912c542f..17333c0b10 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx @@ -1,5 +1,6 @@ import {memo, useCallback, useEffect, useMemo} from "react" +import {ArrowsInLineVertical, ArrowsOutLineVertical} from "@phosphor-icons/react" import {Button, Tooltip, Typography} from "antd" import clsx from "clsx" import {atom, useAtom, useAtomValue, useSetAtom} from "jotai" @@ -8,6 +9,7 @@ import {inputRowIdsWithPropertiesCompatAtom} from "@/oss/state/generation/compat import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" import {triggerWebWorkerTestAtom} from "@/oss/state/newPlayground/mutations/webWorkerIntegration" +import TooltipButton from "../../../assets/EnhancedButton" import RunButton from "../../../assets/RunButton" import { appChatModeAtom, @@ -19,6 +21,7 @@ import { import {clearAllRunsMutationAtom} from "../../../state/atoms/utilityMutations" import TestsetDrawerButton from "../../Drawers/TestsetDrawer" import LoadTestsetButton from "../../Modals/LoadTestsetModal/assets/LoadTestsetButton" +import {allGenerationsCollapsedAtom} from "../../PlaygroundGenerations/assets/GenerationHeader" import {useStyles} from "./styles" import type {GenerationComparisonHeaderProps} from "./types" @@ -35,6 +38,7 @@ const GenerationComparisonHeader = ({className}: GenerationComparisonHeaderProps const runAllChat = useSetAtom(runAllChatAtom) const cancelTests = useSetAtom(cancelTestsMutationAtom) const canRunAllChat = useAtomValue(canRunAllChatComparisonAtom) + const [isAllCollapsed, setIsAllCollapsed] = useAtom(allGenerationsCollapsedAtom) const headerDataAtom = useMemo( () => @@ -92,7 +96,25 @@ const GenerationComparisonHeader = ({className}: GenerationComparisonHeaderProps className, )} > - Generations + {isChatVariant ? ( + Generations + ) : ( + + ) : ( + + ) + } + type="text" + onClick={() => setIsAllCollapsed(!isAllCollapsed)} + tooltipProps={{ + title: isAllCollapsed ? "Expand all" : "Collapse all", + }} + className={classes.heading} + /> + )}
diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx index e750dd22dc..70ccac4adf 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx @@ -1,24 +1,34 @@ -import {useMemo} from "react" +import {useMemo, useState, useCallback, useEffect, useRef} from "react" -import {Typography} from "antd" +import { + CaretDownIcon, + CaretRightIcon, + CaretLineDownIcon, + CaretLineUpIcon, + MinusCircleIcon, + CopyIcon, + DatabaseIcon, +} from "@phosphor-icons/react" import clsx from "clsx" -import {useAtomValue} from "jotai" -import dynamic from "next/dynamic" +import {useAtom, useAtomValue, useSetAtom} from "jotai" import VariableControlAdapter from "@/oss/components/Playground/adapters/VariableControlAdapter" +import TooltipButton from "@/oss/components/Playground/assets/EnhancedButton" import RunButton from "@/oss/components/Playground/assets/RunButton" import TypingIndicator from "@/oss/components/Playground/assets/TypingIndicator" +import TestsetDrawerButton from "@/oss/components/Playground/Components/Drawers/TestsetDrawer" +import {allGenerationsCollapsedAtom} from "@/oss/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader" +import {generationInputRowIdsAtom} from "@/oss/components/Playground/state/atoms/generationProperties" +import {deleteGenerationInputRowMutationAtom} from "@/oss/components/Playground/state/atoms/mutations/input/deleteInputRow" +import {duplicateGenerationInputRowMutationAtom} from "@/oss/components/Playground/state/atoms/mutations/input/duplicateInputRow" +import {inputRowIdsAtom} from "@/oss/state/generation/entities" import {variableIdsUnifiedAtomFamily} from "@/oss/state/newPlayground/generation/selectors" -import {RunningPlaceholder, ClickRunPlaceholder} from "../ResultPlaceholder" +import {ClickRunPlaceholder} from "../ResultPlaceholder" import ErrorPanel from "./ErrorPanel" import GenerationResponsePanel from "./GenerationResponsePanel" -const GenerationVariableOptions = dynamic(() => import("../GenerationVariableOptions"), { - ssr: false, -}) - interface Props { rowId: string variantId: string @@ -53,6 +63,102 @@ const SingleView = ({ ), ) as string[] + const inputRowIds = useAtomValue(generationInputRowIdsAtom) as string[] + const allInputRowIds = useAtomValue(inputRowIdsAtom) as string[] + const testCaseNumber = useMemo(() => { + const index = inputRowIds.indexOf(rowId) + return index >= 0 ? index + 1 : null + }, [inputRowIds, rowId]) + + // Delete and duplicate handlers + const deleteInputRow = useSetAtom(deleteGenerationInputRowMutationAtom) + const duplicateInputRow = useSetAtom(duplicateGenerationInputRowMutationAtom) + const inputRowsLength = allInputRowIds?.length || 0 + + // Check if there are results for the add to testset button + const hasResults = useMemo(() => { + return Boolean(resultHash && result) + }, [resultHash, result]) + + // Global collapse state from header (for "collapse all" / "expand all") + const [isAllGenerationsCollapsed] = useAtom(allGenerationsCollapsedAtom) + + // Local collapse state for this specific test case + const [isCollapsed, setIsCollapsed] = useState(false) + + // Track previous global state to detect changes from header + const prevGlobalCollapsed = useRef(isAllGenerationsCollapsed) + + // Sync local state when global "collapse all" state changes from header + useEffect(() => { + if (prevGlobalCollapsed.current !== isAllGenerationsCollapsed) { + setIsCollapsed(isAllGenerationsCollapsed) + prevGlobalCollapsed.current = isAllGenerationsCollapsed + } + }, [isAllGenerationsCollapsed]) + + // Collapse state for individual input/output components + const [collapsedInputs, setCollapsedInputs] = useState>({}) + const [collapsedOutput] = useState(false) + + const toggleInputCollapse = useCallback((id: string) => { + setCollapsedInputs((prev) => ({...prev, [id]: !prev[id]})) + }, []) + + if (isCollapsed && !inputOnly) { + return ( +
+
+ } + type="textIcon" + onClick={() => setIsCollapsed(false)} + tooltipProps={{title: "Expand"}} + size="small" + /> + {testCaseNumber && ( + Test case {testCaseNumber} + )} +
+
+ } + type="text" + onClick={() => deleteInputRow(rowId)} + size="small" + disabled={inputRowsLength === 1} + tooltipProps={{title: "Remove"}} + /> + } + type="text" + onClick={() => duplicateInputRow(rowId)} + size="small" + tooltipProps={{title: "Duplicate"}} + /> + + } + type="text" + size="small" + disabled={!hasResults} + tooltipProps={{title: "Add to testset"}} + /> + +
+ {!isBusy ? ( + + ) : ( + + )} +
+
+ ) + } + return (
-
+ {!inputOnly && ( +
+ } + type="text" + onClick={() => setIsCollapsed(true)} + tooltipProps={{title: "Collapse"}} + size="small" + /> + {testCaseNumber && ( + Test case {testCaseNumber} + )} +
+
+ } + type="text" + onClick={() => deleteInputRow(rowId)} + size="small" + disabled={inputRowsLength === 1} + tooltipProps={{title: "Remove"}} + /> + } + type="text" + onClick={() => duplicateInputRow(rowId)} + size="small" + tooltipProps={{title: "Duplicate"}} + /> + + } + type="text" + size="small" + disabled={!hasResults} + tooltipProps={{title: "Add to testset"}} + /> + +
+ {!isBusy ? ( + + ) : ( + + )} +
+ )} + +
{variableIds.length > 0 && ( - <> -
- - Variables - -
-
- {variableIds.map((id) => { - return ( -
- + {variableIds.map((id) => { + const isInputCollapsed = collapsedInputs[id] || false + return ( +
+
+
+ +
+ toggleInputCollapse(id)} + size="small" + type="text" + icon={ + isInputCollapsed ? ( + + ) : ( + + ) + } + tooltipProps={{ + title: isInputCollapsed ? "Expand" : "Collapse", + }} />
- ) - })} -
- - )} - {!inputOnly && variableIds.length === 0 ? ( -
- +
+ ) + })}
- ) : null} - - {!inputOnly && ( - )}
{!inputOnly ? ( -
+
- {!isBusy ? ( - - ) : ( - + className={clsx( + "relative w-full transition-all duration-300 ease-linear overflow-hidden", + { + "max-h-[120px]": collapsedOutput, + "h-fit": !collapsedOutput, + }, )} -
- -
+ > {isBusy ? ( ) : !result ? ( diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx index 5d5065d5d5..8a0247048d 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx @@ -1,17 +1,16 @@ import {useCallback, useEffect, useMemo} from "react" +import {ArrowsInLineVerticalIcon, ArrowsOutLineVerticalIcon} from "@phosphor-icons/react" import {Button, Tooltip, Typography} from "antd" import clsx from "clsx" -import {useAtomValue, useSetAtom} from "jotai" +import {atom, useAtom, useAtomValue, useSetAtom} from "jotai" import {appTypeAtom} from "@/oss/components/Playground/state/atoms/app" -import { - generationInputRowIdsAtom, - generationRowIdsAtom, -} from "@/oss/components/Playground/state/atoms/generationProperties" +import {generationInputRowIdsAtom} from "@/oss/components/Playground/state/atoms/generationProperties" import {clearAllRunsMutationAtom} from "@/oss/components/Playground/state/atoms/utilityMutations" import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" +import TooltipButton from "../../../../assets/EnhancedButton" import RunButton from "../../../../assets/RunButton" import {usePlaygroundAtoms} from "../../../../hooks/usePlaygroundAtoms" import {generationHeaderDataAtomFamily, triggerWebWorkerTestAtom} from "../../../../state/atoms" @@ -21,6 +20,9 @@ import LoadTestsetButton from "../../../Modals/LoadTestsetModal/assets/LoadTests import {useStyles} from "./styles" import type {GenerationHeaderProps} from "./types" +// Global atom to track collapse state for all generations +export const allGenerationsCollapsedAtom = atom(false) + const GenerationHeader = ({variantId}: GenerationHeaderProps) => { const classes = useStyles() @@ -40,6 +42,7 @@ const GenerationHeader = ({variantId}: GenerationHeaderProps) => { const runAllChat = useSetAtom(runAllChatAtom) const appType = useAtomValue(appTypeAtom) const completionRowIds = useAtomValue(generationInputRowIdsAtom) as string[] + const [isAllCollapsed, setIsAllCollapsed] = useAtom(allGenerationsCollapsedAtom) const runTests = useCallback(() => { if (appType === "chat") runAllChat() @@ -73,9 +76,27 @@ const GenerationHeader = ({variantId}: GenerationHeaderProps) => { )} >
- - Generations - + {appType === "chat" ? ( + + Generations + + ) : ( + + ) : ( + + ) + } + type="text" + onClick={() => setIsAllCollapsed(!isAllCollapsed)} + tooltipProps={{ + title: isAllCollapsed ? "Expand all" : "Collapse all", + }} + className="text-[16px] leading-[18px] font-[600] text-nowrap flex items-center" + /> + )}
From 6ee876f7e0d544642b696b938264f845893e4c4d Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Mon, 5 Jan 2026 17:30:44 +0600 Subject: [PATCH 2/7] fixed the import and funcational issues --- .../GenerationComparisonHeader/index.tsx | 6 +++--- .../assets/GenerationCompletion/index.tsx | 2 +- .../assets/GenerationCompletionRow/SingleView.tsx | 10 +++++----- .../assets/GenerationCompletionRow/index.tsx | 7 +++---- .../assets/GenerationCompletionRow/styles.ts | 10 ---------- .../assets/GenerationHeader/index.tsx | 2 +- 6 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/styles.ts diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx index 17333c0b10..b62fc06ede 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx @@ -9,14 +9,14 @@ import {inputRowIdsWithPropertiesCompatAtom} from "@/oss/state/generation/compat import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" import {triggerWebWorkerTestAtom} from "@/oss/state/newPlayground/mutations/webWorkerIntegration" -import TooltipButton from "../../../assets/EnhancedButton" +import TooltipButton from "@/oss/components/EnhancedUIs/Button" import RunButton from "../../../assets/RunButton" import { appChatModeAtom, - generationHeaderDataAtomFamily, - displayedVariantsAtom, cancelTestsMutationAtom, canRunAllChatComparisonAtom, + displayedVariantsAtom, + generationHeaderDataAtomFamily, } from "../../../state/atoms" import {clearAllRunsMutationAtom} from "../../../state/atoms/utilityMutations" import TestsetDrawerButton from "../../Drawers/TestsetDrawer" diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx index 2a84088951..536e18e60a 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletion/index.tsx @@ -35,7 +35,7 @@ const GenerationCompletion = ({ // Ensure is handled at MainLayout level to avoid write-on-render here return ( -
+
{viewType === "comparison" ? ( } - type="textIcon" + type="text" onClick={() => setIsCollapsed(false)} tooltipProps={{title: "Expand"}} size="small" diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx index 33970492af..fd8b359a2e 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx @@ -18,7 +18,6 @@ import { import DefaultView from "./DefaultView" import SingleView from "./SingleView" -import {useStyles} from "./styles" import type {GenerationCompletionRowProps} from "./types" // Keep dynamic imports local to presentational components @@ -33,8 +32,6 @@ const GenerationCompletionRow = ({ forceSingle, ...props }: GenerationCompletionRowProps) => { - const classes = useStyles() - const isChat = useAtomValue(appChatModeAtom) // Only subscribe to generation result atoms in completion mode @@ -117,7 +114,9 @@ const GenerationCompletionRow = ({ resultHash={resultHash} runRow={runRow} cancelRow={cancelRow} - containerClassName={classes.container} + containerClassName={ + "border-0 border-t border-b border-solid border-colorBorderSecondary" + } /> ) : ( ({ - container: { - borderBottom: `1px solid ${theme.colorBorderSecondary}`, - borderRight: `1px solid ${theme.colorBorderSecondary}`, - }, -})) diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx index b7da1b1291..113df9ec10 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationHeader/index.tsx @@ -10,7 +10,7 @@ import {generationInputRowIdsAtom} from "@/oss/components/Playground/state/atoms import {clearAllRunsMutationAtom} from "@/oss/components/Playground/state/atoms/utilityMutations" import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" -import TooltipButton from "../../../../assets/EnhancedButton" +import TooltipButton from "@/oss/components/EnhancedUIs/Button" import RunButton from "../../../../assets/RunButton" import {usePlaygroundAtoms} from "../../../../hooks/usePlaygroundAtoms" import {generationHeaderDataAtomFamily, triggerWebWorkerTestAtom} from "../../../../state/atoms" From 3476b16c3d1226df55bba81f02e26a045da2b33e Mon Sep 17 00:00:00 2001 From: ashrafchowdury Date: Mon, 5 Jan 2026 17:34:47 +0600 Subject: [PATCH 3/7] fix UI issues --- .../assets/GenerationCompletionRow/SingleView.tsx | 14 ++++++++------ .../assets/GenerationCompletionRow/index.tsx | 6 ++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx index 5cb893f013..e47824a734 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx @@ -239,11 +239,7 @@ const SingleView = ({
diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx index fd8b359a2e..5c529b7c25 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/index.tsx @@ -12,8 +12,8 @@ import { displayedVariantsAtom, } from "../../../../state/atoms" import { - resolvedGenerationResultAtomFamily, generationRunStatusAtomFamily, + resolvedGenerationResultAtomFamily, } from "../../../../state/atoms/generationProperties" import DefaultView from "./DefaultView" @@ -114,9 +114,7 @@ const GenerationCompletionRow = ({ resultHash={resultHash} runRow={runRow} cancelRow={cancelRow} - containerClassName={ - "border-0 border-t border-b border-solid border-colorBorderSecondary" - } + containerClassName={"border-0 border-b border-solid border-colorBorderSecondary"} /> ) : ( Date: Mon, 5 Jan 2026 17:36:17 +0600 Subject: [PATCH 4/7] refactor post main branch merge --- .../GenerationComparisonHeader/index.tsx | 4 ++-- .../GenerationCompletionRow/SingleView.tsx | 20 +++++++++---------- .../assets/GenerationHeader/index.tsx | 4 ++-- .../src/components/Tables/ExpandableCell.tsx | 7 ++++--- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx index b62fc06ede..7cb4fab5be 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerationComparisonView/GenerationComparisonHeader/index.tsx @@ -9,7 +9,7 @@ import {inputRowIdsWithPropertiesCompatAtom} from "@/oss/state/generation/compat import {runAllChatAtom} from "@/oss/state/newPlayground/chat/actions" import {triggerWebWorkerTestAtom} from "@/oss/state/newPlayground/mutations/webWorkerIntegration" -import TooltipButton from "@/oss/components/EnhancedUIs/Button" +import EnhancedButton from "@/oss/components/EnhancedUIs/Button" import RunButton from "../../../assets/RunButton" import { appChatModeAtom, @@ -99,7 +99,7 @@ const GenerationComparisonHeader = ({className}: GenerationComparisonHeaderProps {isChatVariant ? ( Generations ) : ( - diff --git a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx index e47824a734..ee74c641f3 100644 --- a/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx +++ b/web/oss/src/components/Playground/Components/PlaygroundGenerations/assets/GenerationCompletionRow/SingleView.tsx @@ -12,7 +12,7 @@ import { import clsx from "clsx" import {useAtom, useAtomValue, useSetAtom} from "jotai" -import TooltipButton from "@/oss/components/EnhancedUIs/Button" +import EnhancedButton from "@/oss/components/EnhancedUIs/Button" import VariableControlAdapter from "@/oss/components/Playground/adapters/VariableControlAdapter" import RunButton from "@/oss/components/Playground/assets/RunButton" import TypingIndicator from "@/oss/components/Playground/assets/TypingIndicator" @@ -109,7 +109,7 @@ const SingleView = ({ return (
- } type="text" onClick={() => setIsCollapsed(false)} @@ -121,7 +121,7 @@ const SingleView = ({ )}
- } type="text" onClick={() => deleteInputRow(rowId)} @@ -129,7 +129,7 @@ const SingleView = ({ disabled={inputRowsLength === 1} tooltipProps={{title: "Remove"}} /> - } type="text" onClick={() => duplicateInputRow(rowId)} @@ -140,7 +140,7 @@ const SingleView = ({ resultHashes={resultHash ? [resultHash] : []} icon={false} > - } type="text" size="small" @@ -171,7 +171,7 @@ const SingleView = ({ > {!inputOnly && (
- } type="text" onClick={() => setIsCollapsed(true)} @@ -183,7 +183,7 @@ const SingleView = ({ )}
- } type="text" onClick={() => deleteInputRow(rowId)} @@ -191,7 +191,7 @@ const SingleView = ({ disabled={inputRowsLength === 1} tooltipProps={{title: "Remove"}} /> - } type="text" onClick={() => duplicateInputRow(rowId)} @@ -202,7 +202,7 @@ const SingleView = ({ resultHashes={resultHash ? [resultHash] : []} icon={false} > - } type="text" size="small" @@ -257,7 +257,7 @@ const SingleView = ({ editorProps={{enableTokens: false}} />
- { Generations ) : ( - diff --git a/web/oss/src/components/Tables/ExpandableCell.tsx b/web/oss/src/components/Tables/ExpandableCell.tsx index 03bc0a627b..80c10a3e8e 100644 --- a/web/oss/src/components/Tables/ExpandableCell.tsx +++ b/web/oss/src/components/Tables/ExpandableCell.tsx @@ -4,8 +4,9 @@ import {CaretLineDown, CaretLineUp} from "@phosphor-icons/react" import clsx from "clsx" import {atom, useAtom} from "jotai" -import TooltipButton, {TooltipButtonProps} from "@/oss/components/EnhancedUIs/Button" +import EnhancedButton from "@/oss/components/EnhancedUIs/Button" import useResizeObserver from "@/oss/hooks/useResizeObserver" +import {EnhancedButtonProps} from "../EnhancedUIs/Button/types" // Global jotai store that keeps the expanded/collapsed state for each individual cell. // The key must be STABLE between mounts (e.g. scenarioId + stepKey + path) so that when @@ -19,7 +20,7 @@ interface ExpandableProps { expandKey?: string className?: string children: React.ReactNode - buttonProps?: TooltipButtonProps + buttonProps?: EnhancedButtonProps } export const ExpandableCell = forwardRef( @@ -96,7 +97,7 @@ export const ExpandableCell = forwardRef( {/* Expand/Collapse button */} {(hasOverflow || expanded) && ( -