Consolidate Dag list search and filters - #70911
Conversation
|
Thanks! First, I think we can reduce the width of the search bar. It doesn't need to be full screen width Option A, the dropdown is moving all the content below so I don't see the benefit of integrating the filters into the search bar component. I think the version of Option A that I was thinking wad the github issue search UX. Although its much more "power user" and less accessible. Option B is very interesting! Could you show a screenshot of the full menu? I am curious how big it is and if it would also become unwieldy. Option C is most consistent with our other views so it would be easiest to implement. But if we decide on something better then let's apply it across the whole UI. |
|
Let's continue with B |
Add a reusable search-and-filter shell and use it on the Dag list with URL-backed filter state, active chips, responsive presentation, accessibility behavior, and focused test coverage.
b5aa97d to
ce32c68
Compare
Done. I think this is going to make the UI look simpler and easier on eyes. Let me know if you will have any comments. Once this PR is approved/merged I will add this to other pages as well. |
|
All of the other pages, including the sibling tabs (Dag Run, Task Instances) have a chip filter pattern already implemented. I would suggest that pattern get adopted on the Dags list as well instead of introducing a new/different pattern for this view. |
I agree that consistency across Dags, Dag Runs, and Task Instances is important. However, I think we should first evaluate which interaction works better, and then decide whether the UX improvement justifies changing the shared pattern and also the use experience. |
here is how it looks like with option c |

This PR implements Option B — compact search with a filter disclosure and editable active-filter chips for the Dag list.
dag-option-b-reviewer.mp4
The existing search and filter row becomes increasingly crowded as new filters are added. This design keeps the primary Dag search stable while moving secondary criteria into a responsive Filters panel. Applied filters remain visible as chips; selecting a chip reopens and focuses its corresponding control for quick editing.
The implementation also introduces a composable
SearchAndFiltershell that owns the shared interaction behavior:Dag-specific behavior remains outside the shared shell, including filter controls, URL serialization, API queries, permissions, suggestions, and result fetching. This PR applies the shell only to the Dag list; migrating other pages is intentionally out of scope and will follow as separate PRs.
The Dag implementation preserves shareable URL state, browser Back/Forward navigation, pagination reset, existing tag behavior, timetable multi-selection, and loading, error, and empty states.
Owner filters applied from Dag cards are now shown in the filter panel and included in the active-filter count. Because the API does not provide owner suggestions, users can enter owner names directly.
Interaction details
The filter hooks keep the URL, displayed filters, and fetched results synchronized. Invalid or duplicate parameters are cleaned without adding unnecessary browser-history entries, while saved tag preferences are added to the URL on initial load so the filtered view remains shareable.
Validation
corepack pnpm lintcorepack pnpm vitest run src/components/SearchAndFilter src/components/SearchBar.test.tsx src/components/ui/ButtonGroupToggle.test.tsx src/pages/DagsList/DagsFilters src/pages/DagsList/useTagFilter.test.tsx src/pages/DagsList/DagsList.test.tsx— 13 files / 70 tests passedcorepack pnpm buildDesign exploration: Options A, B, and C
Three working concepts were tested in the real Airflow UI. Option B was selected because its search field and Filters trigger remain spatially stable as filters are added or removed.
Option A — Query composer
Explored but not included in the production implementation.
variant-a-query-composer-demo.mp4
Option B — Filter disclosure and active chips
Selected and implemented in this PR.
variant-b-filter-hub-demo.mp4
Option C — Inline filter pills
Explored but not included in the production implementation.
variant-c-filter-pills-demo.mp4
This remains a draft while CI and final review are completed.
related: #69728
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex following the project guidelines