fix: restore tooltip display when PopupMenuHandler is unavailable by chrisob194 ยท Pull Request #970 ยท maxGraph/maxGraph

Caution

Review failed

The pull request is closed.

Walkthrough

Use optional chaining when checking PopupMenuHandler in TooltipHandler so tooltips can show when PopupMenuHandler is absent or not showing; remove PopupMenuHandler from the plugins array in the Wires story.

Changes

Cohort / File(s) Change Summary
TooltipHandler logic fix
packages/core/src/view/plugins/TooltipHandler.ts
Replaced explicit truthy check with optional chaining in the tooltip guard (!popupMenuHandler?.isMenuShowing()), allowing tooltips when PopupMenuHandler is absent or its isMenuShowing() is false.
Wires story plugin configuration
packages/html/stories/Wires.stories.ts
Removed PopupMenuHandler from the Graph plugins array in the Wires story.

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~10 minutes

  • Check TooltipHandler reset/display logic to ensure optional chaining covers absent plugin and preserves previous behavior when plugin exists.
  • Verify the Wires story renders as expected without registering PopupMenuHandler and that no other stories rely on it.

Possibly related PRs

Suggested labels

bug

Suggested reviewers

  • tbouffard

Pre-merge checks and finishing touches

โœ… Passed checks (5 passed)
Check name Status Explanation
Title check โœ… Passed The title clearly identifies the specific fix addressing the TooltipHandler dependency on PopupMenuHandler, following Conventional Commits format.
Description check โœ… Passed The description covers the problem, solution, how it was verified, and follows the template with all key elements including issue reference and testing approach.
Linked Issues check โœ… Passed The PR implements the exact solution proposed in issue #961: using optional chaining to handle the absence of PopupMenuHandler, allowing tooltips to display correctly regardless of PopupMenuHandler presence.
Out of Scope Changes check โœ… Passed All changes directly address the bug in issue #961: TooltipHandler fix for optional PopupMenuHandler check and removal of PopupMenuHandler from Wires.stories.ts for verification. No unrelated changes detected.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

๐Ÿ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between fe66ca8 and 3a49730.

๐Ÿ“’ Files selected for processing (1)
  • packages/html/stories/Wires.stories.ts (0 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands and usage tips.