From 723c0f7505d46cae609f04f52b518150a87ad4ed Mon Sep 17 00:00:00 2001 From: David Corbitt Date: Sat, 12 Aug 2023 02:32:09 -0700 Subject: [PATCH] Update colors throughout app --- .../components/OutputsTable/ScenarioRow.tsx | 5 ++ .../OutputsTable/ScenariosHeader.tsx | 15 +++++- app/src/components/OutputsTable/index.tsx | 14 ++++- app/src/components/Paginator.tsx | 5 ++ .../VariantHeader/VariantHeader.tsx | 6 ++- .../components/dashboard/LoggedCallsTable.tsx | 4 +- .../components/experiments/ExperimentCard.tsx | 51 ++++++++++--------- .../requestLogs/LoggedCallsTable.tsx | 2 +- app/src/pages/dashboard/index.tsx | 26 +++------- app/src/pages/project/settings/index.tsx | 1 + app/src/pages/request-logs/index.tsx | 20 +++----- 11 files changed, 84 insertions(+), 65 deletions(-) diff --git a/app/src/components/OutputsTable/ScenarioRow.tsx b/app/src/components/OutputsTable/ScenarioRow.tsx index 41b4fcf..9af9c57 100644 --- a/app/src/components/OutputsTable/ScenarioRow.tsx +++ b/app/src/components/OutputsTable/ScenarioRow.tsx @@ -10,6 +10,7 @@ const ScenarioRow = (props: { variants: PromptVariant[]; canHide: boolean; rowStart: number; + isLast: boolean; }) => { const [isHovered, setIsHovered] = useState(false); @@ -21,10 +22,12 @@ const ScenarioRow = (props: { onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} sx={isHovered ? highlightStyle : undefined} + bgColor="white" borderLeftWidth={1} {...borders} rowStart={props.rowStart} colStart={1} + borderBottomLeftRadius={props.isLast ? 8 : 0} > @@ -34,8 +37,10 @@ const ScenarioRow = (props: { onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} sx={isHovered ? highlightStyle : undefined} + bgColor="white" rowStart={props.rowStart} colStart={i + 2} + borderBottomRightRadius={props.isLast && i === props.variants.length - 1 ? 8 : 0} {...borders} > diff --git a/app/src/components/OutputsTable/ScenariosHeader.tsx b/app/src/components/OutputsTable/ScenariosHeader.tsx index 3e470c4..62d20ea 100644 --- a/app/src/components/OutputsTable/ScenariosHeader.tsx +++ b/app/src/components/OutputsTable/ScenariosHeader.tsx @@ -48,7 +48,20 @@ export const ScenariosHeader = () => { ); return ( - + Scenarios ({scenarios.data?.count}) diff --git a/app/src/components/OutputsTable/index.tsx b/app/src/components/OutputsTable/index.tsx index ba60f3b..45c5402 100644 --- a/app/src/components/OutputsTable/index.tsx +++ b/app/src/components/OutputsTable/index.tsx @@ -53,20 +53,29 @@ export default function OutputsTable({ experimentId }: { experimentId: string | colStart: i + 2, borderLeftWidth: i === 0 ? 1 : 0, marginLeft: i === 0 ? "-1px" : 0, - backgroundColor: "gray.100", + backgroundColor: "white", }; + const isFirst = i === 0; + const isLast = i === variants.data.length - 1; return ( 1} rowStart={1} + borderTopLeftRadius={isFirst ? 8 : 0} + borderTopRightRadius={isLast ? 8 : 0} {...sharedProps} /> - + @@ -90,6 +99,7 @@ export default function OutputsTable({ experimentId }: { experimentId: string | scenario={scenario} variants={variants.data} canHide={visibleScenariosCount > 1} + isLast={i === visibleScenariosCount - 1} /> ))} updatePageSize(parseInt(e.target.value))} w={20} + backgroundColor="white" > {pageSizeOptions.map((option) => ( diff --git a/app/src/components/VariantHeader/VariantHeader.tsx b/app/src/components/VariantHeader/VariantHeader.tsx index 6160dc6..60352a2 100644 --- a/app/src/components/VariantHeader/VariantHeader.tsx +++ b/app/src/components/VariantHeader/VariantHeader.tsx @@ -75,7 +75,7 @@ export default function VariantHeader( padding={0} sx={{ position: "sticky", - top: "0", + top: "-2", // Ensure that the menu always appears above the sticky header of other variants zIndex: menuOpen ? "dropdown" : 10, }} @@ -84,6 +84,7 @@ export default function VariantHeader( > + - Logged Calls + Request Logs