Skip to content

UI variables page: added option to view text as multi lines#61679

Merged
pierrejeambrun merged 3 commits into
apache:mainfrom
Tomi-1997:ui-page-variables-unfold-text
Feb 24, 2026
Merged

UI variables page: added option to view text as multi lines#61679
pierrejeambrun merged 3 commits into
apache:mainfrom
Tomi-1997:ui-page-variables-unfold-text

Conversation

@Tomi-1997

Copy link
Copy Markdown
Contributor

Closes: #25992

Problem(?)

Variable info is trimmed, which makes it unable to be found via CTRL+F, unless hovered on.

Before
before

Solution

After 2.3.4 the behavior changed to trim text.
My suggested compromise between the new UX and the old functionality is a button to toggle a state of wrap / unwrap text.

After, initial state
after-fold

After, first click
after-expand

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Feb 9, 2026

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice!
I think that it would be nice to have also an option to collapse it back in case it's too long, and you want to avoid refreshing the page because of that.
Not blocking anyway, IMO.
Failing CI don't seem related, I reran them.

@Tomi-1997

Copy link
Copy Markdown
Contributor Author

Thanks! It toggles between collapse and expand on each click.
Maybe the icon should change based on the state, not sure... 🤔

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's a nice improvement.

Thanks you for the PR. We have exactly that on other pages, such as XCom for expand or collapse json values, do you mind using the same component to make things consistent here. (the same could apply for ellipsis or expand)

Also static checks need fixing.

Screen.Recording.2026-02-11.at.15.14.53.mov

@Tomi-1997

Copy link
Copy Markdown
Contributor Author

Sure
Except the character limit logic, I changed the implementation based on the XCom page component.
How does this look?

Video.mp4

* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, CI need fixing, a few adjustments/suggestions too but looking good.

Comment thread airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/Variables/Variables.tsx Outdated
* tooltip text fixed
* formatting issues resolved
@Tomi-1997

Copy link
Copy Markdown
Contributor Author

Updated to address CI & suggestions, appreciate the feedback!

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks.

@pierrejeambrun pierrejeambrun merged commit 5764d69 into apache:main Feb 24, 2026
78 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-1-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 5764d69 v3-1-test

This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

vatsrahul1001 pushed a commit that referenced this pull request Mar 3, 2026
* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved

(cherry picked from commit 5764d69)
@vatsrahul1001

Copy link
Copy Markdown
Contributor

@Tomi-1997 looks like auto backport failed. could you backport this to v3-1-test?

@vatsrahul1001 vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label Mar 3, 2026
pierrejeambrun pushed a commit to astronomer/airflow that referenced this pull request Mar 3, 2026
…1679)

* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved

(cherry picked from commit 5764d69)
@pierrejeambrun

Copy link
Copy Markdown
Member

Manual backport #62779

pierrejeambrun pushed a commit to astronomer/airflow that referenced this pull request Mar 3, 2026
…1679)

* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved

(cherry picked from commit 5764d69)
pierrejeambrun added a commit that referenced this pull request Mar 3, 2026
…62779)

* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved

(cherry picked from commit 5764d69)

Co-authored-by: Tomi <74303735+Tomi-1997@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Mar 4, 2026
…62779)

* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved

(cherry picked from commit 5764d69)

Co-authored-by: Tomi <74303735+Tomi-1997@users.noreply.github.com>
dominikhei pushed a commit to dominikhei/airflow that referenced this pull request Mar 11, 2026
…1679)

* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved
Ankurdeewan pushed a commit to Ankurdeewan/airflow that referenced this pull request Mar 15, 2026
…1679)

* Variables page added a button to set or unset text trim

* ui variable page, fold and expand buttons:
* reused expandCollapse component
* used useDisclosure instead of useState
* affect only the variable.value field

* * Variable page fold/expand buttons affect also variable.description
* tooltip text fixed
* formatting issues resolved
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. type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an option to bring back multiline view for values in Airflow UI > Variable List

4 participants