Skip to content

fix(calendar): clean up d3-tip tooltips#41589

Draft
sadpandajoe wants to merge 1 commit into
masterfrom
fix-calendar-heatmap-tooltip-cleanup-41583
Draft

fix(calendar): clean up d3-tip tooltips#41589
sadpandajoe wants to merge 1 commit into
masterfrom
fix-calendar-heatmap-tooltip-cleanup-41583

Conversation

@sadpandajoe

Copy link
Copy Markdown
Member

fix(calendar): clean up d3-tip tooltips

SUMMARY

  • Adds a Calendar Heatmap-specific d3-tip class so tooltip DOM nodes can be cleaned up without affecting other charts.
  • Removes stale Calendar Heatmap tooltips before redraw and when the React wrapper unmounts.
  • Destroys the vendor Calendar Heatmap cell and legend d3-tip instances when the calendar is destroyed.

Fixes #41583

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Not applicable; tooltip cleanup is covered by a DOM-level regression test.

TESTING INSTRUCTIONS

  • cd superset-frontend && NODE_ENV=test NODE_OPTIONS='--max-old-space-size=8192' npx jest --runInBand --silent plugins/legacy-plugin-chart-calendar/test/tooltip.test.ts plugins/legacy-plugin-chart-calendar/test/utils.test.ts
  • cd superset-frontend && npx oxlint --config oxlint.json plugins/legacy-plugin-chart-calendar/src/Calendar.ts plugins/legacy-plugin-chart-calendar/src/ReactCalendar.tsx plugins/legacy-plugin-chart-calendar/src/tooltip.ts plugins/legacy-plugin-chart-calendar/src/vendor/cal-heatmap.ts plugins/legacy-plugin-chart-calendar/test/tooltip.test.ts

ADDITIONAL INFORMATION

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltips in the calendar heat map charts can remain in DOM even when navigating away from a dashboard

1 participant