Skip to content

Conversation

@KaranPradhan266
Copy link

Closes: #5704

Tooltip Filter Button Default Behavior

Changes

  • The tooltip filter button now defaults to visible by setting showFilterButton = true in
    src/components/tooltip/Marker.tsx.
  • Timeline tooltips explicitly opt out of the filter button by passing
    showFilterButton={false} in:
    • src/components/timeline/Markers.tsx
    • src/components/timeline/TrackNetwork.tsx
    • src/components/timeline/TrackCustomMarkerGraph.tsx
  • Marker charts continue to display the filter button via the existing prop in
    src/components/marker-chart/Canvas.tsx.

Tests

  • Updated Jest snapshots to reflect the new tooltip behavior and minor download-size text changes:
    • src/test/components/__snapshots__/TrackCustomMarker.test.tsx.snap
    • src/test/components/__snapshots__/TrackNetwork.test.tsx.snap
    • src/test/components/__snapshots__/MenuButtons.test.tsx.snap

@KaranPradhan266
Copy link
Author

@canova would love a review when you get a chance. Thanks!

@canova canova self-requested a review December 23, 2025 13:25
Copy link
Member

@canova canova left a comment

Choose a reason for hiding this comment

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

Sorry for the late review. It was pretty busy last week and I could only look at it today. And thanks for the PR!

It makes sense to have this prop and set it in these components. But I think the value of showFilterButton === undefined being interpreted as true is a bit unusual. I would prefer to have a readonly hideFilterButton?: boolean; prop, with its default showFilterButton === undefined meaning false. And then we need to invert the boolean values in the components.

Also, I think it would be good to have some an explicit hideFilterButton={true} here:


With a comment on top of it, saying something like this: "Network Chart doesn't have sticky tooltips yet. But we should convert it to false once we implement sticky tooltips for the network chart."

Also I think it would make sense to have a test for this. Could you write a simple test inside src/test/components/Marker.test.tsx assigning true and false values and asserting if we have the button or not?

Thanks for the patience and for the contribution!

>
(
1.58 kB
1.59 kB
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, the CI wants to revert these changes. I tried it locally and these test also fail locally in my machine. What does it do in your machine when you run yarn test? You might want to update the dependencies with yarn install and do a yarn test -u to update the snapshots.

@KaranPradhan266 KaranPradhan266 force-pushed the bug/fixing-filter-button-in-marker-hover-panel branch from 0a97b77 to a8f25cc Compare December 25, 2025 23:38
@KaranPradhan266
Copy link
Author

@canova No worries at all — and thank you so much for the detailed review, I really appreciate you taking the time to go through this so thoroughly!

Your suggestions make a lot of sense. I updated the prop to use a hideFilterButton?: boolean with clearer defaults, add the explicit usage and comment in NetworkChartRow, and also add a small test to cover both true/false cases as suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter button in the marker hover panel isn't useful when hovering over the marker when displayed in a track

2 participants