Skip to content

Conversation

@dstandish
Copy link
Contributor

@dstandish dstandish commented Aug 13, 2025

Closes #53048

Adds some filters in the tasks view.

I elected not to add a new endpoint but just to filter what was there as a good first improvement. I think adding the endpoint introduces meaningful complexity and some questions and ambiguities that would need to be resolved.

I also didn't add the time-based filtering for the same reason. It's not how the current endpoint works, and I think adding time-based filtering would require more refactoring and more thought about the interface.

All other filters in the ticket, however, I have added.

update

I added basic task-name search filter and refactored the filters into a separate component like done with DagsList

tasks.filters.mov

@boring-cyborg boring-cyborg bot added area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default labels Aug 13, 2025
@dstandish dstandish self-assigned this Aug 14, 2025
@dstandish dstandish marked this pull request as ready for review August 15, 2025 04:18
@dstandish dstandish changed the title WIP - Add filtering for tasks view Add filtering for tasks view Aug 15, 2025
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Cool!

Left a few comments. This was always an awkward page. I think we should also show more Task info on the page. Like the card view doesn't show Retry or Mapped info. Is there anything else you would want to see here? I'd imagine a search by task_id would be very valuable!

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.

Nice!

Just a few comments:
We need some margin between the two rows
Screenshot 2025-08-21 at 10 55 10

'reset' filter button doesn't seem to reset the search field

When filling multiple values, it doesn't display well:
https://github.com/user-attachments/assets/b138ad6a-5374-470d-9ee4-da2543488dab

@dstandish
Copy link
Contributor Author

Nice!

Just a few comments: We need some margin between the two rows Screenshot 2025-08-21 at 10 55 10

'reset' filter button doesn't seem to reset the search field

When filling multiple values, it doesn't display well: https://github.com/user-attachments/assets/b138ad6a-5374-470d-9ee4-da2543488dab

I don't really know how to fix these things quickly and I need to move on to asset partitioning unfortunately. Fancy adding to this PR?

@dstandish
Copy link
Contributor Author

ok i fixed most of the things

the search bar thing ---- basically, it has internal calls to useState, so it cannot be driven exclusively by changes to searchParams

if we're always going to use searchParams, probably it should not use its own state store -- seems like if you do that then the only way to clear the search bar is to click the X

i also didn't mess with the filter court -- this could be done as followup i suppose

i added a justify to improve the horizontal spacing . it's not perfect but it's better. if you have fixes feel free to push em. otherwise maybe we can just merge this and anyone with time can tweak and refine?

@dstandish
Copy link
Contributor Author

alternatively i can just remove the text search -- it was not part of the original ticket

@waqas-saeed
Copy link

waqas-saeed commented Aug 21, 2025

Hi @dstandish in your video I can see this toggle button in the middle in black colour. it looks like you can use it to hide details page on the right. is that correct?
which airflow version are you using for this? I'm running 3.0.4 and I can't see it in my airflow
image

@pierrejeambrun
Copy link
Member

pierrejeambrun commented Aug 22, 2025

As discussed, don't mind the search bar reset value as this is not related to this PR but to how search bar work, we need to solve it in a follow up.

@dstandish
Copy link
Contributor Author

As discussed, don't my the search bar reset value as this is not related to this PR but to how search bar work, we need to solve it in a follow up.

Yeah I noticed also with dags list, the reset button does not reset the search filters.

Let me know if there's anything further you need me to change in this one.

Thanks

@dstandish
Copy link
Contributor Author

hey @bbovenzi @pierrejeambrun if y'all want to take another pass and see if there's anything left to do so we can close this out?

Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

made some small changes. now it looks good

@bbovenzi bbovenzi added this to the Airflow 3.1.0 milestone Aug 26, 2025
@bbovenzi bbovenzi merged commit ee4357e into apache:main Aug 26, 2025
55 checks passed
@bbovenzi bbovenzi deleted the add-filtering-for-tasks-view branch August 26, 2025 15:37
@dstandish
Copy link
Contributor Author

made some small changes. now it looks good

thanks @bbovenzi

mangal-vairalkar pushed a commit to mangal-vairalkar/airflow that referenced this pull request Aug 30, 2025
* Add filtering by operator name

* fixup! Add filtering by operator name

* get things working and use translate

* make it more generic

* add reset button and fix some checks

* fix pre-commit checks

* add multi select

* rename multi-select

* add trigger rules

* don't need filter count

* add retry values filters

* add mapped

* improve display for mapped selection

* add prefix

* fix logic

* use url params for filter state

* add translation

* extract taskfilters into distinct component

* fix import after rebase

* add search

* make the filter stack responsive

* fixes

* fixes

* add missing file

* add justify

* Update filters

---------

Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
nothingmin pushed a commit to nothingmin/airflow that referenced this pull request Sep 2, 2025
* Add filtering by operator name

* fixup! Add filtering by operator name

* get things working and use translate

* make it more generic

* add reset button and fix some checks

* fix pre-commit checks

* add multi select

* rename multi-select

* add trigger rules

* don't need filter count

* add retry values filters

* add mapped

* improve display for mapped selection

* add prefix

* fix logic

* use url params for filter state

* add translation

* extract taskfilters into distinct component

* fix import after rebase

* add search

* make the filter stack responsive

* fixes

* fixes

* add missing file

* add justify

* Update filters

---------

Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Filters] Add filters to DAG View - Tasks Tab

4 participants