Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Grid View to new UI #45497

Merged
merged 3 commits into from
Jan 25, 2025
Merged

Add Grid View to new UI #45497

merged 3 commits into from
Jan 25, 2025

Conversation

bbovenzi
Copy link
Contributor

@bbovenzi bbovenzi commented Jan 8, 2025

Add an initial Grid View to the new UI.

Features:

  • expand and collapse task groups
  • expand and collapse all task groups (including in graph view)
  • basic title to show run_id/task_name and state
  • Click on a dag run, task name, or task instance to select
  • hover on a dag run, task name or task instance to see your position
  • All clickable areas are keyboard accessible
  • duration and date axes for the dag run bar graph
  • paginate dag runs by increments of 10 even though the limit is 25. I'm open to change this.

Not included:

  • Full tooltips. There is an issue with Chakra v3 that tooltips in particular are much slower and so a large grid view would grind to a halt: Initial render time doubled since updating to v3 chakra-ui/chakra-ui#9488
  • Accessible state colors. Will be another PR
  • AutoRefresh and detecting new dag runs
  • Detecting selected dag run from the url and shifting the grid base date to match
  • Filtering by run state or type
  • Hovering to highlight different task states
  • Task name search
Screenshot 2025-01-23 at 1 58 13 PM Screenshot 2025-01-23 at 1 58 23 PM

I think there's still too many magic numbers to make the layout work. Which I'm happy to work on as well as performance once we confirm that we want to use the grid view in this full page modal.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Jan 8, 2025
@bbovenzi bbovenzi force-pushed the grid-view branch 2 times, most recently from 11304dd to f0eb3da Compare January 23, 2025 18:58
@bbovenzi bbovenzi marked this pull request as ready for review January 23, 2025 19:08
@jscheffl
Copy link
Contributor

Did a small "smoke test" - if you select a mapped task and close the grid, the selected task navigation throws an error:
image

@jscheffl
Copy link
Contributor

Also second had "strange" results in the example task group, when I selected tasks in a group my browser (Firefox, Ubuntu 24.04 LTS) was sorting the runs and selecting the first execution if I clicked on the task of second/third run:
image

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Besides the glitches looks good!

@bbovenzi
Copy link
Contributor Author

Good call on the mapped task stuff. I made an issue for it here: #45990

Would you be able to make a gif or video of the second behavior you described? I am having a hard time understanding or I can't replicate it yet locally

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Great! Beside the small issues mentioned by Jens.

airflow/ui/src/layouts/Details/Graph/TaskNode.tsx Outdated Show resolved Hide resolved
Add task selection

Refactor away from a table layout. Include pagination. Remove tooltips

Add date ticks, remove multiple nested tasks iteration

Add toggle groups, fix memos and date ticks

Add title as standin for tooltips
@bbovenzi bbovenzi merged commit 961ee6e into apache:main Jan 25, 2025
35 checks passed
@bbovenzi bbovenzi deleted the grid-view branch January 25, 2025 16:03
@jscheffl
Copy link
Contributor

Good call on the mapped task stuff. I made an issue for it here: #45990

Would you be able to make a gif or video of the second behavior you described? I am having a hard time understanding or I can't replicate it yet locally

Sorry for the delay, coming back post merge now.

simplescreenrecorder-2025-01-25_21.48.58.mp4

Attached please find the recording. Just tested post merge on current main. Clicks are not visual but whenever I click a task cell you see the runs are getting re-sorted by the length of the bars of DAG runs.

@utkarsharma2 utkarsharma2 added the type:new-feature Changelog: New Features label Jan 27, 2025
@utkarsharma2 utkarsharma2 added this to the Airflow 3.0.0 milestone Jan 27, 2025
@bbovenzi bbovenzi mentioned this pull request Jan 28, 2025
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
* Basic grid view

Add task selection

Refactor away from a table layout. Include pagination. Remove tooltips

Add date ticks, remove multiple nested tasks iteration

Add toggle groups, fix memos and date ticks

Add title as standin for tooltips

* Fix comment

* Rebase grid colors
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:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants