Skip to content

Conversation

@RoyLee1224
Copy link
Contributor

@RoyLee1224 RoyLee1224 commented Nov 24, 2025

Key Changes:

  • Interaction Overlay: Introduced GridOverlays.tsx to handle highlighting via direct DOM manipulation (CSS transforms), bypassing React re-renders.
  • Event Delegation: Replaced individual onMouseEnter listeners in GridTI and TaskNames with a single onMouseMove handler in the parent Grid container.
  • Ref-Based Navigation: Updated useNavigation to provide instant visual feedback on keydown via refs, committing the URL change only on keyup. This significantly optimizes long-press keyboard navigation, reducing traversal time for 13 cells from ~8s to ~3s.
  • Cleanup: Removed the useHover context and expensive document.querySelectorAll calls from child components.

TO-DO

  • Gantt View Hover Synchronization

Screenshots

Hover Effect - Before

hover_before.mp4

Hover Effect - After

hover_after.mp4

Keyboard Navigation - Before (8s)

navigation_before.mp4

Keyboard Navigation - After (3s)

navigation_after.mp4

^ 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 Nov 24, 2025
@RoyLee1224 RoyLee1224 changed the title Refactor Grid interaction for low latency performance for hover effect and keyboard navigation Optimize Grid interaction for low-latency hover effect and keyboard navigation Nov 24, 2025
@RoyLee1224 RoyLee1224 changed the title Optimize Grid interaction for low-latency hover effect and keyboard navigation Optimize Grid View for low-latency hover effect and keyboard navigation Nov 25, 2025
@bbovenzi bbovenzi added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Nov 25, 2025
@bbovenzi bbovenzi added this to the Airflow 3.1.4 milestone Nov 25, 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.

Good call. We were already checking the element ids instead in order to speed it up. We should just get rid of all the individual functions.

@ephraimbuddy ephraimbuddy removed the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Dec 1, 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.

Nice improvement! 🎉

Looking good and working as expected.

As the grid view is a quite complex and important view and this represent a substantial code change, I would be in favor of marking this for 3.1.5 or maybe even 3.2.0. 3.1.4 is being cut out at the moment.

@bbovenzi
Copy link
Contributor

bbovenzi commented Dec 3, 2025

We need to adjust the colors. The selected crosshairs should always be more prominent than the hover crosshairs:

Screenshot 2025-12-03 at 3 35 54 PM Screenshot 2025-12-03 at 3 35 45 PM

Also, if you reduce the panel width to below the total width of the grid view the absolute positioning of the hover selection breaks:
Screenshot 2025-12-03 at 3 38 48 PM

@RoyLee1224
Copy link
Contributor Author

RoyLee1224 commented Dec 5, 2025

Thanks for the review, @bbovenzi. I'll apply these fixes as soon as I finish my final exam.🚀

@bbovenzi
Copy link
Contributor

bbovenzi commented Jan 8, 2026

We just merged some big changes to the grid view. So this will need a significant rebase.

@pierrejeambrun
Copy link
Member

That's a nice improvement I'd love for it to get merged!

@RoyLee1224
Copy link
Contributor Author

CleanShot.2026-01-27.at.23.32.56.mp4

The hover performance is now quite acceptable thanks to the virtualization in #60241. While the overlay method is faster, it adds extra complexity (like the panel width issue @bbovenzi mentioned). I think the trade-off isn't worth it for now.

I’ll close this PR and follow up with a more focused one for keyboard navigation performance (long press). Thanks!

@RoyLee1224 RoyLee1224 closed this Jan 28, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants