{isInteger ? 'Integer required. ' : ''}
{min != null && `Min: ${min}`}
{min != null && max != null && ', '}
diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/AnnotationScorerForm.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/AnnotationScorerForm.tsx
index 9acbdfe6c2f..a478437facb 100644
--- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/AnnotationScorerForm.tsx
+++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/AnnotationScorerForm.tsx
@@ -1,5 +1,5 @@
import {Box} from '@material-ui/core';
-import React, {FC, useCallback, useState} from 'react';
+import React, {FC, useCallback, useEffect, useState} from 'react';
import {z} from 'zod';
import {createBaseObjectInstance} from '../wfReactInterface/baseObjectClassQuery';
@@ -28,7 +28,7 @@ const AnnotationScorerFormSchema = z.object({
}),
z.object({
type: z.literal('String'),
- 'Max length': z.number().optional(),
+ 'Maximum length': z.number().optional(),
}),
z.object({
type: z.literal('Select'),
@@ -45,6 +45,9 @@ export const AnnotationScorerForm: FC<
ScorerFormProps
>
> = ({data, onDataChange}) => {
const [config, setConfig] = useState(data ?? DEFAULT_STATE);
+ useEffect(() => {
+ setConfig(data ?? DEFAULT_STATE);
+ }, [data]);
const [isValid, setIsValid] = useState(false);
const handleConfigChange = useCallback(
@@ -113,7 +116,7 @@ function convertTypeExtrasToJsonSchema(
const typeSchema = obj.Type;
const typeExtras: Record = {};
if (typeSchema.type === 'String') {
- typeExtras.maxLength = typeSchema['Max length'];
+ typeExtras.maxLength = typeSchema['Maximum length'];
} else if (typeSchema.type === 'Integer' || typeSchema.type === 'Number') {
typeExtras.minimum = typeSchema.Minimum;
typeExtras.maximum = typeSchema.Maximum;
diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/FormComponents.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/FormComponents.tsx
index 2716bfbfa81..250c896cfea 100644
--- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/FormComponents.tsx
+++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/ScorersPage/FormComponents.tsx
@@ -3,7 +3,7 @@ import {Select} from '@wandb/weave/components/Form/Select';
import {TextField} from '@wandb/weave/components/Form/TextField';
import React from 'react';
-export const GAP_BETWEEN_ITEMS_PX = 10;
+export const GAP_BETWEEN_ITEMS_PX = 16;
export const GAP_BETWEEN_LABEL_AND_FIELD_PX = 10;
type AutocompleteWithLabelType