diff --git a/src/components/OutputsTable/EditableVariantLabel.tsx b/src/components/OutputsTable/EditableVariantLabel.tsx
index b4db3d3..6153977 100644
--- a/src/components/OutputsTable/EditableVariantLabel.tsx
+++ b/src/components/OutputsTable/EditableVariantLabel.tsx
@@ -31,6 +31,7 @@ export default function EditableVariantLabel(props: { variant: PromptVariant })
_hover={{ borderColor: "gray.300" }}
_focus={{ borderColor: "blue.500", outline: "none" }}
onBlur={onBlur}
+ px={4}
py={2}
>
{props.variant.label}
diff --git a/src/components/OutputsTable/OutputCell.tsx b/src/components/OutputsTable/OutputCell.tsx
index a112363..6f8b903 100644
--- a/src/components/OutputsTable/OutputCell.tsx
+++ b/src/components/OutputsTable/OutputCell.tsx
@@ -1,6 +1,6 @@
import { api } from "~/utils/api";
import { PromptVariant, Scenario } from "./types";
-import { Center, Text } from "@chakra-ui/react";
+import { Center, Spinner, Text } from "@chakra-ui/react";
import { useExperiment } from "~/utils/hooks";
export default function OutputCell({
@@ -33,7 +33,12 @@ export default function OutputCell({
);
- if (output.isLoading) return
Loading...;
+ if (output.isLoading)
+ return (
+
+
+
+ );
if (!output.data) return No output;
diff --git a/src/components/OutputsTable/ScenarioHeader.tsx b/src/components/OutputsTable/ScenarioHeader.tsx
index e2cca13..94dd51b 100644
--- a/src/components/OutputsTable/ScenarioHeader.tsx
+++ b/src/components/OutputsTable/ScenarioHeader.tsx
@@ -61,7 +61,7 @@ export default function ScenarioHeader({ scenario }: { scenario: Scenario }) {
flex={layoutDirection === "row" ? 1 : undefined}
borderColor={hasChanged ? "blue.300" : "transparent"}
_hover={{ borderColor: "gray.300" }}
- _focus={{ borderColor: "blue.500", outline: "none" }}
+ _focus={{ borderColor: "blue.500", outline: "none", bg: "white" }}
/>
);
diff --git a/src/components/OutputsTable/index.tsx b/src/components/OutputsTable/index.tsx
index a0753be..429c01f 100644
--- a/src/components/OutputsTable/index.tsx
+++ b/src/components/OutputsTable/index.tsx
@@ -1,12 +1,42 @@
import { RouterOutputs, api } from "~/utils/api";
-import { type PromptVariant } from "./types";
+import { Scenario, type PromptVariant } from "./types";
import VariantHeader from "./VariantHeader";
import OutputCell from "./OutputCell";
import ScenarioHeader from "./ScenarioHeader";
-import React from "react";
+import React, { useState } from "react";
import { Box, Grid, GridItem, Heading } from "@chakra-ui/react";
import NewScenarioButton from "./NewScenarioButton";
+const ScenarioRow = (props: { scenario: Scenario; variants: PromptVariant[] }) => {
+ const [isHovered, setIsHovered] = useState(false);
+
+ const highlightStyle = {
+ backgroundColor: "gray.50", // or any color you prefer
+ };
+
+ return (
+
+ setIsHovered(true)}
+ onMouseLeave={() => setIsHovered(false)}
+ sx={isHovered ? highlightStyle : null}
+ >
+
+
+ {props.variants.map((variant) => (
+ setIsHovered(true)}
+ onMouseLeave={() => setIsHovered(false)}
+ sx={isHovered ? highlightStyle : null}
+ >
+
+
+ ))}
+
+ );
+};
+
export default function OutputsTable({ experimentId }: { experimentId: string | undefined }) {
const variants = api.promptVariants.list.useQuery(
{ experimentId: experimentId as string },
@@ -30,6 +60,7 @@ export default function OutputsTable({ experimentId }: { experimentId: string |
"> *": {
borderColor: "gray.300",
borderBottomWidth: 1,
+ borderRightWidth: 1,
paddingX: 4,
paddingY: 2,
},
@@ -44,23 +75,14 @@ export default function OutputsTable({ experimentId }: { experimentId: string |
{variants.data.map((variant) => (
-
+
))}
{scenarios.data.map((scenario) => (
-
-
-
-
- {variants.data.map((variant) => (
-
-
-
- ))}
-
+
))}
-
+