You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/08/11 20:22:53 UTC
[PR] fix(deck.gl): dismiss custom tooltips on hover-out [superset]
rusackas opened a new pull request, #43075:
URL: https://github.com/apache/superset/pull/43075
### SUMMARY
Custom (Handlebars) deck.gl tooltips never dismissed. After hovering off a feature, the last tooltip stayed on screen and followed the cursor around the map. Reported in #43069 on a Polygon chart, but it affects every deck.gl layer that uses a Handlebars tooltip.
The shared `onHover` handler in `layers/common.tsx` only refreshed the tooltip content while a feature was picked, but its show/hide condition kept showing the tooltip whenever the content was a custom one, even when nothing was picked:
```js
if (currentTooltipContent && (o.picked || isCustomTooltip(currentTooltipContent))) {
setTooltip({ content: currentTooltipContent, x: o.x, y: o.y });
}
```
Since deck.gl keeps firing `onHover` with fresh `x`/`y` as you move over empty space, this re-rendered the stale last-picked content at the moving cursor position and never cleared it. The fix is to only show the tooltip while a feature is actually picked, which is what the default (non-custom) tooltip already did:
```js
if (o.picked && currentTooltipContent) {
setTooltip({ content: currentTooltipContent, x: o.x, y: o.y });
} else {
setTooltip(null);
currentTooltipContent = null;
}
```
The custom-tooltip type check is no longer needed, so it and its unused `isValidElement` import were removed.
### BEFORE/AFTER
Before: leaving a polygon (or any feature) left its Handlebars tooltip stuck to the cursor until you re-entered another feature. See the screenshots in #43069.
After: the tooltip disappears as soon as the cursor leaves the feature, matching the built-in tooltip behavior.
### TESTING INSTRUCTIONS
Added a regression test in `layers/common.test.ts` asserting that a custom tooltip is cleared (`setTooltip(null)`) on hover-out. Manually: create a deck.gl Polygon chart, add a Handlebars tooltip template, hover a polygon, then move the mouse off it — the tooltip should disappear rather than follow the cursor.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #43069
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deck.gl): dismiss custom tooltips on hover-out [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43075:
URL: https://github.com/apache/superset/pull/43075
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deck.gl): dismiss custom tooltips on hover-out [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43075:
URL: https://github.com/apache/superset/pull/43075#issuecomment-5258425576
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(deck.gl): dismiss custom tooltips on hover-out [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43075:
URL: https://github.com/apache/superset/pull/43075#issuecomment-5258534630
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43075?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 66.00%. Comparing base ([`af258c2`](https://app.codecov.io/gh/apache/superset/commit/af258c21d0316ef0083a1b97e14836b04dcfe2d8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`16408ba`](https://app.codecov.io/gh/apache/superset/commit/16408bafbe2f8fa8d01275f6c9e29fc0b098fb84?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43075 +/- ##
=======================================
Coverage 66.00% 66.00%
=======================================
Files 2866 2866
Lines 162263 162258 -5
Branches 37346 37342 -4
=======================================
+ Hits 107097 107100 +3
+ Misses 53100 53092 -8
Partials 2066 2066
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43075/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/43075/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.64% <100.00%> (+<0.01%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43075?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org