Skip to content

Tooltip fixes #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025
Merged

Tooltip fixes #79

merged 1 commit into from
Jul 2, 2025

Conversation

ClaudiaGivan
Copy link
Collaborator

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR centralizes tooltip logic by moving shared methods into the base Renderer and removing duplicate implementations in subclasses.

  • Introduce base tooltip lifecycle methods (showTooltip, hideTooltip, createTooltip, etc.) in Renderer.js
  • Remove redundant tooltip methods from WorkItemAgeRenderer.js and ScatterplotRenderer.js
  • Refactor CFDRenderer.js to use the base tooltip API and rename helper methods; clean up debug logs

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/graphs/work-item-age/WorkItemAgeRenderer.js Removed local tooltip methods to leverage base Renderer implementation
src/graphs/scatterplot/ScatterplotRenderer.js Deleted duplicate tooltip code and debug logs
src/graphs/control-chart/ControlRenderer.js Removed stray console.log from populateTooltip
src/graphs/cfd/CFDRenderer.js Refactored tooltip and moving-line methods to use unified API; renamed and cleaned up logs
src/graphs/Renderer.js Added base tooltip management methods and state (tooltip, tooltipTimeout)
examples/example.js Added eslint-disable for unused function
Comments suppressed due to low confidence (4)

src/graphs/scatterplot/ScatterplotRenderer.js:571

  • Remove this debug console.log to keep the production code clean and avoid unnecessary logging.
      if (event.relatedTarget !== this.tooltip?.node()) {

src/graphs/Renderer.js:154

  • Consider adding unit or integration tests to cover the tooltip lifecycle (showTooltip, hideTooltip, cleanupTooltip) to ensure correct behavior and prevent regressions.
  showTooltip(event) {

src/graphs/cfd/CFDRenderer.js:9

  • The CFDRenderer uses styles.chartTooltip but does not import the tooltipStyles.module.css. Add an import statement (e.g., import styles from '../tooltipStyles.module.css';) at the top of this file.
export class CFDRenderer extends UIControlsRenderer {

examples/example.js:29

  • [nitpick] The eslint-disable-next-line no-unused-vars for renderCfdGraph can be removed if the function is intended to be used, or the function itself can be deleted if unused.
// eslint-disable-next-line no-unused-vars

@ClaudiaGivan ClaudiaGivan merged commit 6a18f9e into main Jul 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants