Skip to content

Commit

Permalink
increased url image sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedMaaz committed Dec 7, 2023
1 parent 016c119 commit 9f753e1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Radio,
Row,
Space,
Spin,
Statistic,
Table,
Typography,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ const EvaluationCardView: React.FC<Props> = ({
useChatDefaultValue
form={form}
onFinish={() => onRun(scenarioId)}
imageSize="large"
/>

<div className={classes.toolBar}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ const useStyles = createUseStyles({
},
})

const ASPECT_RATIO = 1.55

interface Props {
inputParams: (Parameter & {value: any})[]
onFinish?: (values: GenericObject) => void
onParamChange?: (name: string, value: any) => void
isChatVariant?: boolean
useChatDefaultValue?: boolean
form?: FormInstance<GenericObject>
imageSize?: "small" | "large"
}

const ParamsForm: React.FC<Props> = ({
Expand All @@ -44,8 +47,10 @@ const ParamsForm: React.FC<Props> = ({
isChatVariant,
useChatDefaultValue,
form,
imageSize = "small",
}) => {
const classes = useStyles()
const imgHeight = imageSize === "small" ? 90 : 120

const chat = inputParams.find((param) => param.name === "chat")?.value

Expand Down Expand Up @@ -83,8 +88,8 @@ const ParamsForm: React.FC<Props> = ({
formInstance.getFieldError(param.name).length === 0 && (
<Image
src={param.value}
width={140}
height={90}
width={imgHeight * ASPECT_RATIO}
height={imgHeight}
className={classes.cover}
fallback="/assets/fallback.png"
/>
Expand Down
1 change: 1 addition & 0 deletions agenta-web/src/components/Playground/Views/TestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const BoxComponent: React.FC<BoxComponentProps> = ({
onFinish={onRun}
onParamChange={onInputParamChange}
form={form}
imageSize="large"
/>
</Row>
<Row className={classes.row2} style={{marginBottom: isChatVariant ? 12 : 0}}>
Expand Down

0 comments on commit 9f753e1

Please sign in to comment.