pierrejeambrun commented on code in PR #46596:
URL: https://github.com/apache/airflow/pull/46596#discussion_r1949149192


##########
airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -224,7 +216,36 @@ const TriggerDAGForm = ({ dagId, onClose, open }: 
TriggerDAGFormProps) => {
                 render={({ field }) => (
                   <Field.Root mt={6}>
                     <Field.Label fontSize="md">Dag Run Notes</Field.Label>
-                    <Input {...field} placeholder="Optional" size="sm" />
+                    <Editable.Root
+                      onChange={(event: ChangeEvent<HTMLInputElement>) => {
+                        field.value = event.target.value;
+                      }}
+                      value={field.value}
+                    >
+                      <Editable.Preview
+                        _hover={{ backgroundColor: "transparent" }}
+                        alignItems="flex-start"
+                        as={VStack}
+                        gap="0"
+                        height="150px"
+                        overflowY="auto"
+                        width="100%"
+                      >
+                        {Boolean(field.value) ? (
+                          <ReactMarkdown>{field.value}</ReactMarkdown>
+                        ) : (
+                          <Text color="fg.subtle">Add a note...</Text>
+                        )}
+                      </Editable.Preview>
+                      <Editable.Textarea
+                        {...field}
+                        data-testid="notes-input"
+                        height="150px"
+                        overflowY="auto"
+                        placeholder="Add a note..."
+                        resize="none"
+                      />
+                    </Editable.Root>

Review Comment:
   Good idea.
   
   Ideally I think we want to extract a component from this `Editable/Preview' 
for markdown content input.
   
   I feel like this will be needed to a different places.



-- 
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]

Reply via email to