-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix clipping of wide vega tooltip tables #33465
Fix clipping of wide vega tooltip tables #33465
Conversation
💚 Build Succeeded |
You can test IE11 by going into Management > Advanced Settings > [Search for Session] and turn on Store Session in Local Storage |
Thanks @cchaos, I changed the local storage setting and was able to verify the change in IE11. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation is going to run into issues on smaller devices. I suggest the following changes.
Pinging @elastic/kibana-app |
I've revised the change - left the cell widths as they were, and changed the width of the div to be max 100%. To support mobile I've added a media query so the max width is 256px. |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I think that will work better. Just a prettier nit.
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in Chrome and looks good to me (smaller tooltips still seem to work fine)
* fix wide vega table tooltips, desktop and mobile (elastic#33436)
Summary
Fixes #33436. An EUI tooltip has a maximum width of 256px (defined in EUI).
But vega tooltip tables (used when rendering key-value pairs of an object) can be up to 400px wide (160px for the key and 240px for the value).
When table rows became wide, they appeared truncated:

This change makes the max width of a vega tooltip the same as the table, giving a result like this when both the key and value exceed the max width:

There is 12px on either side to account for padding

Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsUnit or functional tests were updated or added to match the most common scenariosThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately