Skip to content

Commit 8a70976

Browse files
feat(ui): better error for unknown fields in builder view mode
1 parent efaa20a commit 8a70976

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

invokeai/frontend/web/public/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@
10171017
"missingField_withName": "Missing field \"{{name}}\"",
10181018
"unexpectedField_withName": "Unexpected field \"{{name}}\"",
10191019
"unknownField_withName": "Unknown field \"{{name}}\"",
1020-
"unknownFieldEditWorkflowToFix_withName": "Unknown field \"{{name}}\" (edit workflow to fix)",
1020+
"unknownFieldEditWorkflowToFix_withName": "Workflow contains an unknown field \"{{name}}\".\nEdit the workflow to fix the issue.",
10211021
"updateNode": "Update Node",
10221022
"updateApp": "Update App",
10231023
"loadingTemplates": "Loading {{name}}",

invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/InputFieldGate.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FormControl, FormLabel } from '@invoke-ai/ui-library';
1+
import { Flex, Text } from '@invoke-ai/ui-library';
22
import { InputFieldWrapper } from 'features/nodes/components/flow/nodes/Invocation/fields/InputFieldWrapper';
33
import { useInputFieldInstanceExists } from 'features/nodes/hooks/useInputFieldInstanceExists';
44
import { useInputFieldNameSafe } from 'features/nodes/hooks/useInputFieldNameSafe';
@@ -70,11 +70,11 @@ const Fallback = memo(
7070

7171
return (
7272
<InputFieldWrapper>
73-
<FormControl isInvalid={true} alignItems="stretch" justifyContent="center" gap={2} h="full" w="full">
74-
<FormLabel display="flex" mb={0} px={1} py={2} gap={2}>
73+
<Flex w="full" px={1} py={1} justifyContent="center">
74+
<Text fontWeight="semibold" color="error.300" whiteSpace="pre" textAlign="center">
7575
{label}
76-
</FormLabel>
77-
</FormControl>
76+
</Text>
77+
</Flex>
7878
</InputFieldWrapper>
7979
);
8080
}

0 commit comments

Comments
 (0)