elastic-charts icon indicating copy to clipboard operation
elastic-charts copied to clipboard

[metric] Medium and long text in metric is cut

Open mbondyra opened this issue 1 year ago • 2 comments

Lens issue: https://github.com/elastic/kibana/issues/169505#issuecomment-1774865360

Screenshot 2023-10-23 at 09 47 48 Screenshot 2023-10-23 at 09 47 08

While the secondary metric can go multiline, the primary metric has a no-wrap policy for the CSS white-space property.

I've tried to quickly check what would happen without that nowrap thing but it introduces other issues:

Screenshot 2023-10-23 at 09 48 20 Screenshot 2023-10-23 at 09 48 05

Originally posted by @dej611 in https://github.com/elastic/kibana/issues/169258#issuecomment-1774667358

mbondyra avatar Oct 23 '23 12:10 mbondyra

Given the nature of the secondary metric it was easier to expect that it could go on multiple lines, it is also way smaller and then way more easy to deal with. At the same time this is an interesting conversation to have because introducing text might make worth to talk about multi-lines for values/strings as well. Thank you for pointing this out!

Originally posted by @gvnmagni in https://github.com/elastic/kibana/issues/169258#issuecomment-1774673724

nickofthyme avatar Oct 23 '23 14:10 nickofthyme

Related to https://github.com/elastic/elastic-charts/issues/2306

gvnmagni avatar Apr 22 '24 09:04 gvnmagni

@gvnmagni do you think we can close this considering the work done on #2306? It doesn't fully solve this problem in some cases but there is no much that we can do I believe

markov00 avatar Jun 11 '24 07:06 markov00

I feel the same, given the complexity of the wrapping logics I feel that fit and custom modes introduced with the update solve the problem, at least for now.

gvnmagni avatar Jun 11 '24 08:06 gvnmagni

Great, closing for now

markov00 avatar Jun 11 '24 08:06 markov00