Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]: Human Evaluation inputs overflowing when values are long #1796

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ const ABTestingEvaluationTable: React.FC<EvaluationTableProps> = ({
</div>
</div>
),
width: 300,
dataIndex: "inputs",
render: (_: any, record: ABTestingEvaluationTableRow, rowIndex: number) => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ const SingleModelEvaluationTable: React.FC<EvaluationTableProps> = ({
</div>
</div>
),
width: 300,
dataIndex: "inputs",
render: (_: any, record: SingleModelEvaluationRow, rowIndex: number) => {
return (
Expand Down
38 changes: 18 additions & 20 deletions agenta-web/src/components/Playground/ParamsForm/ParamsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({
borderRadius: 6,
},
paramValueContainer: {
border: `1px solid ${theme.colorBorder}`,
width: "100%",
borderRadius: theme.borderRadius,
padding: theme.paddingSM,
maxHeight: 300,
overflowY: "scroll",
"&:disabled": {
color: "inherit",
backgroundColor: "inherit",
cursor: "text",
},
},
}))

Expand Down Expand Up @@ -109,20 +108,19 @@ const ParamsForm: React.FC<Props> = ({
alt={param.name}
/>
)}
{isPlaygroundComponent ? (
aakrem marked this conversation as resolved.
Show resolved Hide resolved
<Input.TextArea
data-cy={`testview-input-parameters-${index}`}
key={index}
value={param.value}
placeholder={`${renameVariables(param.name)} (${type})`}
onChange={(e) =>
onParamChange?.(param.name, e.target.value)
}
autoSize={{minRows: 2, maxRows: 8}}
/>
) : (
<div className={classes.paramValueContainer}>{param.value}</div>
)}

<Input.TextArea
data-cy={`testview-input-parameters-${index}`}
key={index}
className={
!isPlaygroundComponent ? classes.paramValueContainer : ""
}
value={param.value}
placeholder={`${renameVariables(param.name)} (${type})`}
onChange={(e) => onParamChange?.(param.name, e.target.value)}
disabled={!isPlaygroundComponent}
autoSize={{minRows: 2, maxRows: 8}}
/>
</div>
</Form.Item>
)
Expand Down
Loading