jscheffl commented on code in PR #45220:
URL: https://github.com/apache/airflow/pull/45220#discussion_r1898028941
##########
airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -214,52 +221,43 @@ const TriggerDAGForm: React.FC<TriggerDAGFormProps> = ({
extensions={[json()]}
height="200px"
onBlur={() => {
- const prettifiedJson = validateAndPrettifyJson(
- field.value,
- );
-
- field.onChange(prettifiedJson);
+ field.onChange(validateAndPrettifyJson(field.value));
}}
style={{
border: "1px solid #CBD5E0",
borderRadius: "8px",
outline: "none",
padding: "2px",
+ width: "100%",
}}
theme={colorMode === "dark" ? githubDark : githubLight}
/>
- {Boolean(errors.conf) && (
- <Text color="red.500" fontSize="sm" mt={2}>
- {errors.conf}
- </Text>
- )}
- </Box>
+ {Boolean(errors.conf) ? (
+ <Field.ErrorText>{errors.conf}</Field.ErrorText>
+ ) : undefined}
+ </Field.Root>
)}
/>
- <Text fontSize="md" mb={2} mt={6}>
- Dag Run Notes
- </Text>
<Controller
control={control}
name="note"
render={({ field }) => (
- <Input {...field} placeholder="Optional" size="sm" />
+ <Field.Root mt={6}>
+ <Field.Label fontSize="md">Dag Run Notes</Field.Label>
+ <Input {...field} placeholder="Optional" size="sm" />
+ </Field.Root>
)}
/>
</Box>
</Accordion.ItemContent>
</Accordion.Item>
</Accordion.Root>
- {Boolean(errors.date) && (
- <Text color="red.500" fontSize="sm" mt={2}>
- {errors.date}
- </Text>
- )}
+ <ErrorAlert error={errors.date ?? errorTrigger} />
<Box as="footer" display="flex" justifyContent="flex-end" mt={4}>
<HStack w="full">
{isDirty ? (
- <Button onClick={() => reset()} variant="outline">
+ <Button onClick={handleReset} variant="outline">
Review Comment:
Oh, yeah, can confirm. All this is not happening on Chrome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]