feat(explore-attr-breakdowns): Adding chart tooltip actions#104149
Merged
feat(explore-attr-breakdowns): Adding chart tooltip actions#104149
Conversation
static/app/views/explore/hooks/useAttributeBreakdownsTooltip.tsx
Outdated
Show resolved
Hide resolved
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Outdated
Show resolved
Hide resolved
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Fixed
Show fixed
Hide fixed
|
|
||
| const handleClickActions = (event: MouseEvent) => { | ||
| event.preventDefault(); | ||
|
|
Contributor
There was a problem hiding this comment.
Bug: Unconditional preventDefault blocks all document clicks
The handleClickActions event handler calls event.preventDefault() unconditionally at line 105, before checking if the click target has tooltip action attributes. Since this handler is attached to document when the tooltip is frozen, it prevents the default behavior for ALL clicks anywhere on the page—not just clicks on tooltip actions. This could break link navigation, form submissions, checkbox toggling, and other interactive elements outside the chart area while the tooltip is in its frozen state. The event.preventDefault() call should be moved inside the if (action && value && key) conditional block.
static/app/views/explore/components/attributeBreakdowns/attributeDistributionChart.tsx
Outdated
Show resolved
Hide resolved
static/app/views/explore/components/attributeBreakdowns/cohortComparisonChart.tsx
Outdated
Show resolved
Hide resolved
static/app/views/explore/hooks/useAttributeBreakdownsTooltip.tsx
Outdated
Show resolved
Hide resolved
edwardgou-sentry
approved these changes
Dec 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The behaviour that we are going for is:
Screen.Recording.2025-11-30.at.3.54.20.PM.mov