Skip to content

Conversation

@aritra24
Copy link
Collaborator

@aritra24 aritra24 commented May 17, 2025

Adds infinite scroll in tag search and refetch on field update
closes: #50711


^ 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.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label May 17, 2025
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.

We need to update the PR description. I don't think this alone will entirely solve the issue. (some tags will still be missing beyond the limit)

@aritra24
Copy link
Collaborator Author

Yup, makes sense @pierrejeambrun. Was discussing on slack to add an infinite scroll to the list.

@aritra24
Copy link
Collaborator Author

Added infinite scroll

Screen.Recording.2025-05-20.at.9.58.04.PM.mov

@aritra24 aritra24 changed the title Refetch tags on each keypress Add infinite scroll on tag search May 20, 2025
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.

I think if you don't want to have some flickering and not have to maintain the list manually (because appending to the list like that will keep in memory possibly thousands and thousands of tags), you should only shift by half a page when you reach the end of scroll, this way you keep some previous items in the list (the one that are overlapping), and smoothly add the rest of the page for further scrolling.

If you scroll back up, you should fire another request to fetch the previous page (which should be cached by react query anyway). So only ever using the data.tags should be enough I think.

@aritra24
Copy link
Collaborator Author

I did do that initially, that was still leading to flickering because it still replaces the old values. I can try again just to confirm though.

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.

I did do that initially, that was still leading to flickering because it still replaces the old values. I can try again just to confirm though.

Oh yes, I see, because we then need to remap the 'portion' of the page that was in the view port to still remain unchanged from a display point of view, that might be too complicated and not the way to go. (Or maybe for later, in the meantime I think your approach is good).

Just a few comments to try to improve it.

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.

Functionally working, looking good.

Just a few comments.

@aritra24
Copy link
Collaborator Author

Sorry for the delay folks, been a bit occupied the past couple days with life stuff. Getting back to this, I was struggling a bit with the typescript for the infiniteQuery method back when I was looking at it last. Unfortunately either the docs aren't very helpful or my knowledge of typescript is a bit lacking so it might take a bit to figure it out.

@aritra24
Copy link
Collaborator Author

I believe the type issues are fixed now, let me know if there's any other feedback comments you have @pierrejeambrun / @bbovenzi. Again apologies for the delays

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.

lgtm! thanks for taking this on

@bbovenzi bbovenzi modified the milestones: Airflow 3.1.0, Airflow 3.0.3 Jun 17, 2025
@bbovenzi bbovenzi added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jun 17, 2025
@bbovenzi bbovenzi merged commit f6141ff into apache:main Jun 17, 2025
44 checks passed
@github-actions
Copy link

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker f6141ff v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Jun 21, 2025
* Refetch tags on each keypress

* Added debouncing

* Added infinite scroll

* Fixes: reopening filter led to empty list

* Undo dagfilters change

* redo tag filtering with custom infinite query

* Fixes type annotations

* Update file name and add license
@kaxil kaxil modified the milestones: Airflow 3.0.3, Airflow 3.1.0 Jul 2, 2025
pierrejeambrun pushed a commit to astronomer/airflow that referenced this pull request Jul 2, 2025
* Refetch tags on each keypress

* Added debouncing

* Added infinite scroll

* Fixes: reopening filter led to empty list

* Undo dagfilters change

* redo tag filtering with custom infinite query

* Fixes type annotations

* Update file name and add license

(cherry picked from commit f6141ff)
@pierrejeambrun
Copy link
Member

Manual backport #52714

kaxil pushed a commit that referenced this pull request Jul 2, 2025
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. backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAG tags filter not showing all tags in UI

5 participants