Skip to content

Conversation

@Pixselve
Copy link
Contributor

@Pixselve Pixselve commented Nov 4, 2025

Description

Add dismissTooltip callback function to tooltip content renderers (point, header, footer, body) allowing custom content to programmatically dismiss tooltips. This enables interactive elements like buttons within tooltips to close the tooltip when clicked.

In CloudWatch, we have buttons in the tooltip that opens drawers/open new pages. There is no current way to close the tooltip after such actions.

Result

2025-11-04_10-01-13.mp4

How has this been tested?

  • Added unit tests.
  • Updated the core line chart page to dismiss the tooltip when clicking existing buttons.
Review checklist

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add dismissTooltip callback function to tooltip content renderers (point, header, footer, body) allowing custom content to programmatically dismiss tooltips. This enables interactive elements like buttons within tooltips to close the tooltip when clicked.
@pan-kot pan-kot changed the title feat(tooltip): add dismissTooltip callback to custom content renderers feat: Add dismissTooltip callback to custom content renderers Nov 4, 2025
- Rename dismissTooltip to hideTooltip in header, body, footer, and point tooltip renderers
- Refactor tooltip tests to use parameterized tests (test.each) for both line and pie chart types, improving test maintainability
@pan-kot pan-kot added this pull request to the merge queue Nov 17, 2025
Merged via the queue into cloudscape-design:main with commit 0e235d0 Nov 17, 2025
42 of 44 checks passed
@Pixselve Pixselve deleted the close-tooltip branch November 24, 2025 09:28
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.

2 participants