Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a portal for horizontal tooltips #1797

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

envex
Copy link
Collaborator

@envex envex commented Jan 31, 2025

What does this implement/fix?

As part of the UX tooltip audit, we want to enable tooltips on every chart. In order to add tooltips to the SimpleBarChart we needed the HorizontalBarChart to render it's tooltip in a portal.

Does this close any currently open issues?

Storybook link

Before merging

  • Check your changes on a variety of browsers and devices.

  • Update the Changelog's Unreleased section with your changes.

  • Update relevant documentation, tests, and Storybook.

  • Make sure you're exporting any new shared Components, Types and Utilities from the top level index file of the package

@envex envex force-pushed the envex/horizontal-portal-tooltips branch from dad039b to 2f46506 Compare January 31, 2025 20:53
});

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Now that we're rendering in a portal, we only care if the tooltip stays within the bounds of the browser window, not the chart itself.

@envex envex marked this pull request as ready for review January 31, 2025 20:56
Copy link

github-actions bot commented Jan 31, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
polaris-viz-core-cjs 61.73 KB (0%) 1.3 s (0%) 1.2 s (+46.01% 🔺) 2.4 s
polaris-viz-cjs 229.53 KB (-0.03% 🔽) 4.6 s (-0.03% 🔽) 1.8 s (-1.14% 🔽) 6.4 s
polaris-viz-esm 185.8 KB (-0.03% 🔽) 3.8 s (-0.03% 🔽) 1.7 s (+19% 🔺) 5.4 s
polaris-viz-css 5.82 KB (0%) 117 ms (0%) 237 ms (-38.24% 🔽) 354 ms
polaris-viz-esnext 192.99 KB (-0.03% 🔽) 3.9 s (-0.03% 🔽) 2 s (+40.04% 🔺) 5.9 s

@envex envex force-pushed the envex/horizontal-portal-tooltips branch from 2f46506 to cd80b91 Compare January 31, 2025 20:57
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.

1 participant