-
Notifications
You must be signed in to change notification settings - Fork 16.6k
fix(ui): avoid gantt annotation error during resize#60877
fix(ui): avoid gantt annotation error during resize#60877choo121600 merged 3 commits intoapache:mainfrom
Conversation
When clicking the DAG task icon to open the task view, I intermittently hit a Chart.js error:
The stack trace points into chartjs-plugin-annotation's beforeDraw hook while rendering the Gantt chart
According to Chart.js / annotation plugin issue reports, this error commonly occurs when resizeDelay is set, because the annotation plugin can run during a resize before chartArea is fully initialized, making chartArea.left undefined. Our Gantt chart options were using resizeDelay: 100 together with the annotation plugin, which matches this pattern. To avoid this resize race while preserving the existing annotation/highlight behavior, I removed the resizeDelay setting so the chart resizes immediately without triggering that crash.
Was generative AI tooling used to co-author this PR?
- Yes (please specify the tool below)
- Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
- For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
- When adding dependency, check compliance with the ASF 3rd Party License Policy.
- For significant user-facing changes create newsfragment:
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.
|
Can you walk me through how exactly you got this error? I would like to replicate first. |
Screen.Recording.2026-01-22.at.9.27.19.PM.movSorry for the brief description earlier. |
|
I think code looks reasonable to me, but I tried on main and can't reproduce(Chrome, arc browser) |
|
@bbovenzi @choo121600 Screen.Recording.2026-01-24.at.10.43.29.PM.mov |
|
I can't reproduce as well but I think that might be some kind of race condition between the initiation of Could you help try set it might be like this plugins: {reference |
|
@guan404ming I've applied For reference, here is the environment where I tested this change (including re-testing with Safari):
|
|
Please resolve the ci error, thanks! Nice, thanks for the tests. I don't think to add the wdyt @bbovenzi @choo121600 |
I agree with this take as well. |
|
Yeah sounds like low overhead even though iI still can't replicate on my end. But we need to fix the ordering linting issue. Should be as simple as running |
|
Thanks everyone for the review and helpful suggestions! I learned a lot from this discussion. The formatting issue has been resolved. |
|
Cool, Thanks :) |
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
(cherry picked from commit 122146f)
Co-authored-by: yuseok89
* fix(ui): avoid chart annotation left error by removing resizeDelay
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
(cherry picked from commit 122146f)
Co-authored-by: yuseok89
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
(cherry picked from commit 122146f)
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting
* fix(ui): keep resizeDelay and set annotation clip false in gantt
* fix(ui): adjust annotation clip false position per prek formatting