[TSVB] Multi-metric gauge doesn't like vertical sizing#33245
[TSVB] Multi-metric gauge doesn't like vertical sizing#33245alexwizp merged 6 commits intoelastic:masterfrom
Conversation
cchaos
left a comment
There was a problem hiding this comment.
Can you explain more about what you are trying to fix?
|
@cchaos screens will be attached soon. Sorry =) |
💚 Build Succeeded |
src/legacy/core_plugins/metrics/public/components/_vis_with_splits.scss
Outdated
Show resolved
Hide resolved
| overflow: hidden; | ||
| &__split { | ||
| display: flex; | ||
| flex: 0 1 auto; |
There was a problem hiding this comment.
@cchaos you are right, my mistake. I think I can revert 'flex: 1 0 auto;' but what do you think about next case?:

The last line bigger than previous one
💚 Build Succeeded |
💚 Build Succeeded |
|
Hmmm, yeah so I had to fiddle with this quite a bit. Flex box can be annoying with dynamic content. The best I could get I've sent you a PR for. Essentially It will start wrapping after 4 items, and if there's less than 4, they will grow. It does the similar thing to what you're asking about which is that the last line could be bigger than the rest, but the sizing here seems to be a nice sweetspot where the panel would have to be quite tall before that last row would grow. |
Fiddle with flex box and wrapping
|
@cchaos looks awesome! Thanks |
cchaos
left a comment
There was a problem hiding this comment.
Just checked in IE and FF and it works great there too!
Now, while this is a great improvement, I think the ideal situation is to actually ask the user how many items they want per line and that way we can properly calculate the size.
💚 Build Succeeded |



Summary
This PR fix the problem which was described here #27770 for TSVB plugin
Before:
TSVB Gauge panel - Edit mode:
TSVB Gauge panel - Dashboard:
###After:
TSVB Gauge panel - Edit mode:
TSVB Gauge panel - Dashboard:
Checklist
For maintainers