Skip to content

Conversation

@RoyLee1224
Copy link
Contributor

@RoyLee1224 RoyLee1224 commented Aug 25, 2025

Why

As mentioned in #54049 (comment), the filters take up too much screen space. To address this, this PR introduces a new, reusable "filter pill" component design for date, number, text input.

I would appreciate any early feedback on the overall design and direction. All comments and suggestions are welcome.

What

  • Add & Edit: Click + Filter to select a filter type from the dropdown menu. A new filter pill appears and is automatically focused. You can also click on any existing pill to edit its value.
  • Confirm & Cancel: Once you're done typing, you can:
    • Press Enter to confirm the value and apply the filter.
    • Press Esc or click anywhere outside the input area to cancel and exit editing mode.
  • Delete:
    • Click the x icon on any pill to remove that specific filter.
    • Click Reset button to clear all active filters at once.

Screenshots

filterPill.mp4

TO-DO

  • Working on resolving an issue with the NumberFilter where inputting a minus sign (-) causes UI bug.


^ 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 airflow-core/newsfragments.

Copy link
Member

@guan404ming guan404ming left a comment

Choose a reason for hiding this comment

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

Looks really really good to me! The design not only improves UX also enhances extensibility. Still need more iteration and discussion but like it very much. 👍

Copy link
Member

@Lee-W Lee-W left a comment

Choose a reason for hiding this comment

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

translation looks good

@RoyLee1224
Copy link
Contributor Author

@guan404ming thanks for super helpful feedback. You're so great at code review !

@RoyLee1224 RoyLee1224 requested a review from guan404ming August 26, 2025 04:53
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.

Really exciting! Let's just clean up a few details. Its ok to just change XComFilters in this PR and then we can change others in subsequent PRs

@RoyLee1224 RoyLee1224 marked this pull request as ready for review September 2, 2025 05:58
@RoyLee1224 RoyLee1224 changed the title [WIP] Add reusable FilterBar component for date, number, text input Add reusable FilterBar component for date, number, text input Sep 2, 2025
@RoyLee1224
Copy link
Contributor Author

RoyLee1224 commented Sep 2, 2025

UI Update Screenshots

CleanShot 2025-09-02 at 02 06 31 CleanShot 2025-09-02 at 02 06 39

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.

This is looking great. We're very close, just a few suggestions here and there

@kaxil
Copy link
Member

kaxil commented Sep 11, 2025

@bbovenzi Do we want this in 3.1.0?

@kaxil
Copy link
Member

kaxil commented Sep 11, 2025

@bbovenzi Do we want this in 3.1.0?

Ok Saw the message on i18n on Slack, cherry-picking it

kaxil pushed a commit to astronomer/airflow that referenced this pull request Sep 11, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
(cherry picked from commit 2a1c686)
@RoyLee1224 RoyLee1224 deleted the filterPill branch September 11, 2025 13:34
@RoyLee1224
Copy link
Contributor Author

Follow up PR

  • Add number range filter
  • Add date range filter
  • Add tag filter

suman-himanshu pushed a commit to suman-himanshu/airflow that referenced this pull request Sep 17, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
Brunda10 pushed a commit to Brunda10/airflow that referenced this pull request Sep 17, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Sep 30, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 1, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 2, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 3, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 4, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 7, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 8, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 9, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 10, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

Co-authored-by: Brent Bovenzi <brent@astronomer.io>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
…#54895)

* feat(ui): add reusable FilterBar component for date, number, text input

* fix(ui): improve FilterPill focus and blur handling

* refactor(ui): create useFiltersHandler hook for FilterBar

* refactor(ui):Support negative number input & fix FilterPill DOM nesting

* feat(ui): create centralized filter config

* fix(ui): apply style feedback to FilterBar

* refactor(ui): move getFilterConfig calls into useFiltersHandler & remove placeholder translation fallback

* refactor: simplify DateFilter with dayjs

* fix(ui): Add FilterTypes enum to avoid type casting

* fix(i18n): add missing translation keys

* fix(i18n): move filter translation key to free exemptions

* fix(i18n): Replace dagName translation with dag ID

* fix(i18n): simplify filter translations with fallbacks

* fix: modify reset button translation key

---------

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

Labels

allow translation change This label should be set if we want to bypass translation freeze and change english translations. area:translations area:UI Related to UI/UX. For Frontend Developers. translation:default translation:zh-TW

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants