Skip to content

Add preset filters to persist table filters and sorting - #68484

Merged
pierrejeambrun merged 7 commits into
apache:mainfrom
astronomer:saved-table-views
Jul 6, 2026
Merged

Add preset filters to persist table filters and sorting#68484
pierrejeambrun merged 7 commits into
apache:mainfrom
astronomer:saved-table-views

Conversation

@pierrejeambrun

@pierrejeambrun pierrejeambrun commented Jun 12, 2026

Copy link
Copy Markdown
Member

Adds saved views to the data tables: once you've applied filters / search / sorting to a table, save that state under a name and restore it later from the Views control on the right of the filter bar.

  • Save / restore / delete named views. Deleting asks for confirmation.
  • Set a default (pin icon): landing on the page with no filters auto-restores that view. Unpin to go back to the empty default.
  • Save is blocked on the default (empty) view and when an identical setup is already saved (the message names the existing view).

A "view" is the table's current URL query string (filters, search, page size); the active sort is mirrored to localStorage (it is often absent from the URL, so it is never written there) and restored from there. Pagination is dropped so a restored view starts on page one. Everything is stored per-page in localStorage (per browser), mirroring how table sort/limit already persist. The control lives in the shared FilterBar, so every filterable table gets it — except a Dag run's task instances, where the per-run URL makes saved views pointless.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

@boring-cyborg boring-cyborg Bot added area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default labels Jun 12, 2026
@pierrejeambrun
pierrejeambrun marked this pull request as draft June 12, 2026 21:33
@pierrejeambrun pierrejeambrun changed the title UI: Add saved views to persist table filters and sorting Add saved views to persist table filters and sorting Jun 17, 2026
@pierrejeambrun
pierrejeambrun force-pushed the saved-table-views branch 2 times, most recently from 6ea7144 to 222db02 Compare June 18, 2026 13:22
@pierrejeambrun
pierrejeambrun marked this pull request as ready for review June 18, 2026 13:25
The Views control belongs anchored to the right of the filter bar so it
stays put as filters wrap, instead of drifting next to them. Saving is
blocked on the default view and when an identical setup is already stored,
since those only ever create empty or duplicate entries. Deleting now asks
for confirmation so a stray click can't discard a view, and the name field
clears on save to make it obvious the view was stored.
Users who always open a table on the same filtered view had to re-select
it on every visit. Pinning a saved view as the default restores it
automatically when the page is opened with no filters, and it can be
unpinned to return to the empty default. Deep links that already carry
their own filters still take precedence, so shared URLs are never
overridden.
Saved views are scoped per page URL, so on a Dag run's task instances
(a per-run URL) they would be siloed per run and never reused. Hide the
Views control there via a FilterBar opt-out, keeping it on the global and
per-Dag tables where the URL is stable. Also trims the saved-views comments
down to the ones that explain a non-obvious decision.
@pierrejeambrun

Copy link
Copy Markdown
Member Author
Screen.Recording.2026-06-18.at.16.46.56.mov

@pierrejeambrun pierrejeambrun added this to the Airflow 3.4.0 milestone Jun 18, 2026
@pierrejeambrun pierrejeambrun added the type:new-feature Changelog: New Features label Jun 25, 2026
@ashb

ashb commented Jul 6, 2026

Copy link
Copy Markdown
Member

I think the "views are stored in this browser only" should probably be moved to a small-text in the drop down, not. only on the delete page?

Comment thread airflow-core/src/airflow/ui/src/components/SavedViewsMenu.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/components/PresetFiltersMenu.tsx

@ashb ashb 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.

It mostly looks okay, but I'm slightly confused by the SORT handling.

@pierrejeambrun

Copy link
Copy Markdown
Member Author

I think the "views are stored in this browser only" should probably be moved to a small-text in the drop down, not. only on the delete page?

This is also in the tooltip explaining the feature:
Screenshot 2026-07-06 at 16 17 38

@bbovenzi bbovenzi 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.

"View" is too generic. and we use that for grid, gantt, graph views. Let's call this something like "Preset Filters"

The table already persists a non-default sort as a sort query param via useTableURLState, so a saved view can capture and restore it like any other filter instead of special-casing it through localStorage. This drops the bake-from-localStorage on save and the strip-from-URL on apply, so an applied view's URL round-trips and stays shareable, and a non-default sort now counts as an explicit landing that the default-view restore leaves alone.
The generic name "View" collides with the grid/gantt/graph views in the UI. "Preset Filters" describes what the feature actually is: a named snapshot of a table's filters and sort.
@pierrejeambrun pierrejeambrun changed the title Add saved views to persist table filters and sorting Add preset filters to persist table filters and sorting Jul 6, 2026
@pierrejeambrun

pierrejeambrun commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

"View" is too generic. and we use that for grid, gantt, graph views. Let's call this something like "Preset Filters"

Updated

https://github.com/user-attachments/assets/a73359c1-bb7f-458f-b9ac-6bebeaacb190
Screenshot 2026-07-06 at 17 21 27

The filterless check and save guard treat every URL param the same, so their comments no longer single out sort. The applyPreset comment now explains the one genuinely sort-specific spot: the table caches sort in localStorage, so a preset must mirror it there.
@pierrejeambrun
pierrejeambrun merged commit ff68484 into apache:main Jul 6, 2026
163 of 164 checks passed
@pierrejeambrun
pierrejeambrun deleted the saved-table-views branch July 6, 2026 23:21
bbovenzi added a commit that referenced this pull request Jul 16, 2026
* Add keyboard shortcut help dialog to discover available shortcuts (? key) (#68200)

* feat: keyboard shortcuts help dialog (press ?)

* remove unnecessary useCallback and useMemo hooks

* drop grid keyboard shortcut tooltip

* centralize shortcut definitions in a single catalog

* use nesting to reuse concept translation keys

* register code viewer fullscreen shortcut in the catalog

(cherry picked from commit 70bb308)

* [v3-3-test] Clean up graph/grid UI (#69883)

Backport of #69883 to v3-3-test. Applied on top of the #68200 backport,
so the only branch-specific adaptation is dropping the showPresetFilters
change to GridFilters.tsx — the Preset Filters feature (#68484) is not on
v3-3-test.

(cherry picked from commit 707b1cc)

---------

Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
choo121600 pushed a commit to choo121600/airflow that referenced this pull request Jul 31, 2026
* i18n(ko): Add Korean translations for Dags list run state counts

* i18n(ko): Add missing Korean translations for preset filters and variable import

Backport adaptation: the common.json presetFilters.* and dags.json
runStateCounts.* keys are dropped, as neither the Preset Filters feature
(apache#68484) nor the run-state counts column is on this branch.

(cherry picked from commit ec42071)
choo121600 added a commit that referenced this pull request Jul 31, 2026
* [v3-3-test] i18n(ko): Align Korean catalogue with this branch's English keys

main and this branch have diverged on the English catalogue, so the
Korean files carry keys for features that never shipped in 3.3 while
missing one this branch does render. Both sides of that drift are
resolved here so the per-PR translation backports that follow apply to
a catalogue that matches this branch.

* i18n(ko): add missing translations(Jul 2) (#69211)

* i18n(ko): translate keyboard shortcuts help dialog

* i18n(ko): translate note editor and partition date labels

* i18n(ko): translate dashboard alerts

* i18n(ko): translate HITL review

* i18n(ko): remove unused translation

* i18n(ko): improve wording for shortcuts help and HITL review

* i18n(ko): improve wording for dashboard alerts

Backport adaptation: dag.json navigation.openGraphFilters is dropped, as
that key is not in this branch's English catalogue.

(cherry picked from commit 2851f0f)

* i18n(ko): add missing translations(Jul 8) (#69541)

* i18n(ko): Add Korean translations for Dags list run state counts

* i18n(ko): Add missing Korean translations for preset filters and variable import

Backport adaptation: the common.json presetFilters.* and dags.json
runStateCounts.* keys are dropped, as neither the Preset Filters feature
(#68484) nor the run-state counts column is on this branch.

(cherry picked from commit ec42071)

* i18n(ko): translate Dag list run-state filter labels (#69781)

(cherry picked from commit 618faa7)

* i18n(ko): add missing translation for triggerDag.partitionKeyHelp (#70005)

(cherry picked from commit 0cb7f21)

* i18n(ko): add missing translations(Jul 22) (#70211)

Add five missing Korean translations to restore key parity with the
English locale, and replace the stale sort.lastRunStartDate entry with
the renamed sort.lastRunAfter:

- common.json: dagDetails.team, table.noTeamsFound
- components.json: durationChart.medianTotalDuration
- dags.json: sort.lastRunAfter.asc/desc (replaces sort.lastRunStartDate)

Backport adaptation: the sort.lastRunStartDate -> sort.lastRunAfter
rename is not applied, since this branch's English catalogue still uses
sort.lastRunStartDate. common.json dagDetails.team and table.noTeamsFound
are dropped, as multi-team is not on this branch.

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 13a3cd7)

* i18n(ko): add missing translations(Jul 30) (#70765)

* i18n(ko): add missing translations(Jul 30)

* Keep Korean Dag translations consistently ordered

Backport adaptation: dag.json keeps the nested panel.dependencies
structure this branch's English catalogue uses rather than the flattened
panel.dependencies.allDagDependencies. dags.json filters.timetableType
and filters.noTimetableTypesFound are dropped, as the timetable-type
filter is not on this branch.

(cherry picked from commit ce469bd)

---------

Co-authored-by: Hojeong Park <parkhj062@gmail.com>
Co-authored-by: Yuseok Jo <yuseok89@gmail.com>
Co-authored-by: 조현준 <101855229+aaiss0927@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Doyeon Kim <132787602+dybyte@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
* Add keyboard shortcut help dialog to discover available shortcuts (? key) (#68200)

* feat: keyboard shortcuts help dialog (press ?)

* remove unnecessary useCallback and useMemo hooks

* drop grid keyboard shortcut tooltip

* centralize shortcut definitions in a single catalog

* use nesting to reuse concept translation keys

* register code viewer fullscreen shortcut in the catalog

(cherry picked from commit 70bb308)

* [v3-3-test] Clean up graph/grid UI (#69883)

Backport of #69883 to v3-3-test. Applied on top of the #68200 backport,
so the only branch-specific adaptation is dropping the showPresetFilters
change to GridFilters.tsx — the Preset Filters feature (#68484) is not on
v3-3-test.

(cherry picked from commit 707b1cc)

---------

Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
* [v3-3-test] i18n(ko): Align Korean catalogue with this branch's English keys

main and this branch have diverged on the English catalogue, so the
Korean files carry keys for features that never shipped in 3.3 while
missing one this branch does render. Both sides of that drift are
resolved here so the per-PR translation backports that follow apply to
a catalogue that matches this branch.

* i18n(ko): add missing translations(Jul 2) (#69211)

* i18n(ko): translate keyboard shortcuts help dialog

* i18n(ko): translate note editor and partition date labels

* i18n(ko): translate dashboard alerts

* i18n(ko): translate HITL review

* i18n(ko): remove unused translation

* i18n(ko): improve wording for shortcuts help and HITL review

* i18n(ko): improve wording for dashboard alerts

Backport adaptation: dag.json navigation.openGraphFilters is dropped, as
that key is not in this branch's English catalogue.

(cherry picked from commit 2851f0f)

* i18n(ko): add missing translations(Jul 8) (#69541)

* i18n(ko): Add Korean translations for Dags list run state counts

* i18n(ko): Add missing Korean translations for preset filters and variable import

Backport adaptation: the common.json presetFilters.* and dags.json
runStateCounts.* keys are dropped, as neither the Preset Filters feature
(#68484) nor the run-state counts column is on this branch.

(cherry picked from commit ec42071)

* i18n(ko): translate Dag list run-state filter labels (#69781)

(cherry picked from commit 618faa7)

* i18n(ko): add missing translation for triggerDag.partitionKeyHelp (#70005)

(cherry picked from commit 0cb7f21)

* i18n(ko): add missing translations(Jul 22) (#70211)

Add five missing Korean translations to restore key parity with the
English locale, and replace the stale sort.lastRunStartDate entry with
the renamed sort.lastRunAfter:

- common.json: dagDetails.team, table.noTeamsFound
- components.json: durationChart.medianTotalDuration
- dags.json: sort.lastRunAfter.asc/desc (replaces sort.lastRunStartDate)

Backport adaptation: the sort.lastRunStartDate -> sort.lastRunAfter
rename is not applied, since this branch's English catalogue still uses
sort.lastRunStartDate. common.json dagDetails.team and table.noTeamsFound
are dropped, as multi-team is not on this branch.

Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 13a3cd7)

* i18n(ko): add missing translations(Jul 30) (#70765)

* i18n(ko): add missing translations(Jul 30)

* Keep Korean Dag translations consistently ordered

Backport adaptation: dag.json keeps the nested panel.dependencies
structure this branch's English catalogue uses rather than the flattened
panel.dependencies.allDagDependencies. dags.json filters.timetableType
and filters.noTimetableTypesFound are dropped, as the timetable-type
filter is not on this branch.

(cherry picked from commit ce469bd)

---------

Co-authored-by: Hojeong Park <parkhj062@gmail.com>
Co-authored-by: Yuseok Jo <yuseok89@gmail.com>
Co-authored-by: 조현준 <101855229+aaiss0927@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Doyeon Kim <132787602+dybyte@users.noreply.github.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 type:new-feature Changelog: New Features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants