Skip to content

Fix newline rendering in DAG warning alert UI#63588

Open
wjddn279 wants to merge 1 commit intoapache:mainfrom
wjddn279:fix-dag-warning-ui-newline
Open

Fix newline rendering in DAG warning alert UI#63588
wjddn279 wants to merge 1 commit intoapache:mainfrom
wjddn279:fix-dag-warning-ui-newline

Conversation

@wjddn279
Copy link
Contributor

related: #59430

Description

Fixes an issue where newlines (\n) in the message field of the DAG warning API were not being rendered as line breaks in the UI.

UI

ASIS

image

TOBE

image
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 14, 2026
return (
<Alert data-testid="warning-alert" status="warning">
<Flex align="center">{warning?.message}</Flex>
<Flex align="center" whiteSpace="pre-wrap">
Copy link
Contributor

@shivaam shivaam Mar 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: ErrorAlert uses whiteSpace="preserve" with wordBreak, while this uses pre-wrap.
Both work, but might be worth aligning them for consistency since they render side by side in the same modal. They are both used together in the DAGWarningsModal.tsx file.

Not a blocker though.

Copy link
Contributor

@shivaam shivaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor nit on whitespace consistency with ErrorAlert, but overall LGTM. Clean fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants