Skip to content

Conversation

@RoyLee1224
Copy link
Contributor

@RoyLee1224 RoyLee1224 commented Nov 16, 2025

Related

part of #55900
part of #56250 (The hover tooltips disappear about a second after popping up.)

Changes

  • Refactor HoverTooltip and rename it to BasicTooltip
  • Migrate from HoverTooltip to BasicTooltip in Calendar tab
  • Apply BasicTooltip to task instance and runs tooltips in Grid view
  • Add translation for tooltip states

Why

  • Chakra UI's Tooltip got some performance issues. The custom BasicTooltip provides similar functionality with better rendering performance
    Performance issue Reference: UI: Add grid tooltip to show RunType & note #51736 (comment)
  • Renamed from HoverTooltip to BasicTooltip to better reflect its purpose as a performant tooltip component suitable for high-density UI(eg. Grid view, Calendar tab).

Screenshots

Performance (Chakra UI tooltip vs. BasicTooltip)

I've tried with both approaches, Charka UI looks laggy with large amount TIs

chakra.mp4
custom.mp4

Before / After

Before (tooltip somehow disappear)

CleanShot.2025-11-16.at.01.42.05.mp4

After(tooltip last correctly)

CleanShot.2025-11-16.at.01.40.10.mp4

Before

Before (use default title for run tooltip) After (consistent tooltip with TI)

^ 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 16, 2025
@NilsJPWerner
Copy link
Contributor

Would it be worth adding duration to the tooltip?

@aaron-wolmutt
Copy link
Contributor

Would it be worth adding duration to the tooltip?

The 2.11 version has task id, status, started, ended, duration and trigger rule in the tool tip

@aaron-wolmutt
Copy link
Contributor

Is the datetime in the screenshots the task start or the task end? I think the datetime should be in yyy-mm-dd, hh:mm:ss tz like in 2.11

@waltervillarreal
Copy link

Thanks @RoyLee1224, I agree that it would be super useful to have the version, status, start, end, duration, and trigger rule in the tool tip.

@RoyLee1224
Copy link
Contributor Author

Thanks @NilsJPWerner @waltervillarreal @aaron-wolmutt. I agree those time fields are very useful.

However, the current LightGridTaskInstanceSummary explicitly returns None for standard tasks (it only calculates time for Groups).

Modifying the API to return these timestamps for all tasks involves backend changes and potential schema updates (similar to the attempts in #55927)

To avoid scope creep, I'd like to keep this PR focused on fixing the flashing bug and performance, restoring the tooltip functionality as seen in #53438.

We can open a separate PR to update the backend and enable the time fields display.

@aaron-wolmutt
Copy link
Contributor

Thanks @NilsJPWerner @waltervillarreal @aaron-wolmutt. I agree those time fields are very useful.

However, the current LightGridTaskInstanceSummary explicitly returns None for standard tasks (it only calculates time for Groups).

Modifying the API to return these timestamps for all tasks involves backend changes and potential schema updates (similar to the attempts in #55927)

To avoid scope creep, I'd like to keep this PR focused on fixing the flashing bug and performance, restoring the tooltip functionality as seen in #53438.

We can open a separate PR to update the backend and enable the time fields display.

You have a great point about avoiding scope creep in pull requests. I'm trying keep my PRs separated by backend/front end as well. I think the fix would fit 3.1.X then and adding those fields to the API would probably fit the 3.2 release

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.

Thanks for PR.

I don't think the PR title is accurate.

Also it appears that we have Tooltip component too, to what extend should we only have 1 Tooltip conponent instead of having HoverTooltip/BasicTooltip + Tooltip, it's hard to get the difference unless we read the implementation in details.

@RoyLee1224 RoyLee1224 changed the title Implement task instance and runs tooltips in Gridview Fix task instance and runs tooltips in Grid view Nov 21, 2025
@RoyLee1224
Copy link
Contributor Author

Update

  • Add auto-flip for viewport overflow
  • Add translation for tooltip states
update.mp4

@pierrejeambrun pierrejeambrun added this to the Airflow 3.1.4 milestone Nov 25, 2025
@pierrejeambrun pierrejeambrun added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Nov 25, 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.

Just a few suggestions / nitpick, but looking good.

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.

LGTM for my local tests. left some nit, thanks!

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.

LGTM

@pierrejeambrun pierrejeambrun merged commit 4970ea2 into apache:main Dec 3, 2025
60 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 3, 2025
* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Dec 3, 2025
…58359)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
bbovenzi pushed a commit that referenced this pull request Dec 3, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 8, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 9, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 11, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 12, 2025
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Jan 6, 2026
…#59013)

* refactor: replace hovertooltip with basictooltip

* feat: implement basic tooltip for grid TI

* feat: implement basic tooltip for grid run

* fix: use get duration util

* refactor: simplify BasicTooltip and add auto-flip for viewport overflow

* fix(i18n): add translation for tooltip states

* refactor: improve BasicTooltip positioning and remove duration

* fix: use Chakra semantic tokens

* refactor: use dynamic height for BasicTooltip positioning
(cherry picked from commit 4970ea2)

Co-authored-by: LI,JHE-CHEN <103923510+RoyLee1224@users.noreply.github.com>
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.

6 participants