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
- refactor: fix most problems in the Wires story #893 โ touches Wires story plugin registration and tooltip-related plugin interactions.
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
๐ 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.
Comment @coderabbitai help to get the list of available commands and usage tips.