BeauDevCode commented on code in PR #68268:
URL: https://github.com/apache/airflow/pull/68268#discussion_r3399507320
##########
airflow-core/src/airflow/ui/src/pages/Variables/ManageVariable/VariableForm.tsx:
##########
@@ -104,11 +104,18 @@ const VariableForm = ({ error, initialVariable,
isPending, manageMutate, setErro
<Field.Label fontSize="md">
{translate("columns.value")} <Field.RequiredIndicator />
</Field.Label>
- <Textarea {...field} size="sm" />
+ <Textarea
+ {...field}
+ borderColor={showJsonWarning ? "fg.warning" : undefined}
+ borderWidth={showJsonWarning ? "2px" : undefined}
+ size="sm"
+ />
{showJsonWarning ? (
- <Text color="fg.warning" fontSize="xs">
- {translate("variables.form.invalidJson")}
- </Text>
+ <Box bg="bg.warning" borderColor="fg.warning"
borderRadius="md" borderWidth="1px" mt={2} px={3} py={2}>
+ <Text color="fg.warning" fontSize="sm" fontWeight="medium">
+ {translate("variables.form.invalidJson")}
+ </Text>
+ </Box>
Review Comment:
Thanks for the review.
Updated the warning to use the shared Alert component and removed the
warning-specific Textarea styling so it follows existing UI conventions.
I also updated the tests to match the current translation-key behavior and
added coverage for Jinja-style values to confirm the warning remains
non-blocking for valid non-JSON strings.
--
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]