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

Badges don't truncate (well) #2189

Closed
cchaos opened this issue Aug 1, 2019 · 6 comments · Fixed by #2190
Closed

Badges don't truncate (well) #2189

cchaos opened this issue Aug 1, 2019 · 6 comments · Fixed by #2190
Assignees

Comments

@cchaos
Copy link
Contributor

cchaos commented Aug 1, 2019

I've seen this in two places in Kibana.

  1. The filter bar when the filter name is super long The window to edit filters is mispositioned if the filter is too long kibana#35225

Screen Shot 2019-04-24 at 14 23 34 PM

  1. On the new dashboard panel custom time range, with the icon on the left, it cuts off the text from right to left.

Screen Shot 2019-07-29 at 12 04 06 PM


Question: Do we truncate or do we let the text wrap?

We will need a solution for Kibana 7.4

@snide
Copy link
Contributor

snide commented Aug 1, 2019

Truncate works for me. It makes sense given the "small" nature of these things.

@mdefazio
Copy link
Contributor

mdefazio commented Aug 1, 2019

I agree with truncating. Wrapping the text makes it look like 2 badges IMO.

@hbharding
Copy link
Contributor

New guy so no strong opinion, but I’m in favor of forcing badges to truncate / no text wrap. The only “pro” that jumps to mind is that text wrapping allows the user to read the entire badge, but I think this might be able to be solved with a tooltip. I’m worried that adding text wrapping would break a bunch of existing designs. An extra line would give the badge much more visual prominence compared to other nearby badges.

Re: the screenshots

  1. Perhaps we truncate in the middle for super long badges without icons?
  2. When icon is left, I think it would be helpful to see the icon. Truncate text on the right side?

@cchaos
Copy link
Contributor Author

cchaos commented Aug 1, 2019

Thanks all! I'll go the truncation route.

  1. Unfortunately we can't truncate in the middle, only on the right with text-overflow: ellipsis.
  2. But yeah for the second screenshot, we're using flex-direction to swap sides for the icon, which causes truncation to happen weirdly. I'll just need to actually position the icon on the particular side and not use the flex trick.

@mdefazio
Copy link
Contributor

mdefazio commented Aug 1, 2019

can you use order instead of direction?

@cchaos
Copy link
Contributor Author

cchaos commented Aug 1, 2019

So the good news is, it looks like truncation was just broken when the full badge was given an onClick turning it into a <button> because it was just missing a class. I'm testing out the other configs to double-check but should be an easy fix.

@cchaos cchaos removed the discussion label Aug 1, 2019
@cchaos cchaos self-assigned this Aug 1, 2019
@cchaos cchaos mentioned this issue Aug 1, 2019
4 tasks
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 a pull request may close this issue.

4 participants