-
Notifications
You must be signed in to change notification settings - Fork 118
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
[tooltip] Reconsider tooltip min-width and label truncations #2048
Comments
After a few conversations we decided that the optimal solution would be to provide these series of solution to our users.
The following image shows these options in place. If there is anything that we missed please feel free to reach out so that we can include all we need in this update 😊 |
hey @gvnmagni @markov00 we are looking to implement this with @mbondyra. Instead of making it configurable, I think a better solution will be to make it adjustable depending on the content: When there are long values we could provide the solutions mentioned above:
Btw, why when users right click do we make the tooltip shorter and narrower? Can we keep the original size? |
@nickofthyme @markov00 this issue has been closed with my PR 🔝 but I am not sure if it should be as we were exploring different routes? Just asking to give it visibility. |
I think you were correct in closing this. I think we just open up a separate issue for addressing the label truncations described in #2048 (comment). |
## Summary fix #171408 improves the style of tooltip by enlarging its size see elastic/elastic-charts#2048
## Summary fix elastic#171408 improves the style of tooltip by enlarging its size see elastic/elastic-charts#2048 (cherry picked from commit f684005)
…172890) # Backport This will backport the following commits from `main` to `8.12`: - [[Lens] Fix tooltip size and partition rerendering (#172802)](#172802) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marco Vettorello","email":"marco.vettorello@elastic.co"},"sourceCommit":{"committedDate":"2023-12-07T20:55:24Z","message":"[Lens] Fix tooltip size and partition rerendering (#172802)\n\n## Summary\r\n\r\nfix https://github.com/elastic/kibana/issues/171408\r\nimproves the style of tooltip by enlarging its size see\r\nhttps://github.com/elastic/elastic-charts/issues/2048","sha":"f6840055d4c828787aab742ce082ab8911e8a5a9","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:Visualizations","release_note:skip","backport:prev-minor","v8.12.0","v8.13.0"],"number":172802,"url":"https://github.com/elastic/kibana/pull/172802","mergeCommit":{"message":"[Lens] Fix tooltip size and partition rerendering (#172802)\n\n## Summary\r\n\r\nfix https://github.com/elastic/kibana/issues/171408\r\nimproves the style of tooltip by enlarging its size see\r\nhttps://github.com/elastic/elastic-charts/issues/2048","sha":"f6840055d4c828787aab742ce082ab8911e8a5a9"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172802","number":172802,"mergeCommit":{"message":"[Lens] Fix tooltip size and partition rerendering (#172802)\n\n## Summary\r\n\r\nfix https://github.com/elastic/kibana/issues/171408\r\nimproves the style of tooltip by enlarging its size see\r\nhttps://github.com/elastic/elastic-charts/issues/2048","sha":"f6840055d4c828787aab742ce082ab8911e8a5a9"}}]}] BACKPORT--> Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Is your feature request related to a problem? Please describe.
There are valid cases where longer labels are required to be displayed in their entirety.
Some of these cases are:
root.package.app.service.version
Describe the solution you'd like
The ideal path is to be always able to visualize the entire label on the tooltip but, as always, it depends on the length of it.
We can't represent a label that is as long as the current screen width (it will occlude too much in the current view), but is also true that we cannot limit too much the width and always truncate the label.
A trade-off should be considered.
We should also consider its effects on the legend (longer label on legend will shrink the chart)
Describe alternatives you've considered
The multi-line wrapping was already considered in the design but could increase the height of the tooltip too much depending on the number of lines to wrap every single text. The design idea was to wrap the text at a max 300px width.
The beginning/middle truncation of text is an alternative option, but doesn't fully cover the extent of the problem and is a custom solution (we need to compute that manually because this type of text truncation is not available in HTML out of the box)
Additional context
This and other similar situations are examples of the need for a full extent tooltip width or a tooltip with a different truncation.
cc @gvnmagni
The text was updated successfully, but these errors were encountered: