-
Notifications
You must be signed in to change notification settings - Fork 839
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
[EuiBreadcrumb] Allow to configure max-width for truncation #7349
Comments
Hi @Dosant! This sounds like something that should be configurable. I'll look deeper into it tomorrow and see if we could make this option generic enough to be introduced straight into EUI. I'll keep you posted! |
Can we clarify the requirements/spec of this a bit?
|
@cee-chen, for elastic/kibana#170758, we're specifically interested in |
Thanks for clarifying Anton! For completeness, we'd likely want to support both. |
@Dosant Actually, if you only need to increase the max width of a single specific breadcrumb, can you consider simply passing a single inline <EuiBreadcrumbs
breadcrumbs={[
{ text: 'First long untruncated breadcrumb', style: { maxWidth: '100%' }, // Or none, or 500px, or whatever
{ text: 'Second truncated normal breadcrumb', href: '#' },
]}
/> Example CodeSandbox: https://codesandbox.io/s/agitated-architecture-28svh6?file=/demo.tsx:241-298 |
@cee-chen, I'll give it a try. If it works, then great! Update: I opened a pr in Kibana, seems like |
Hooray! Thanks Anton. Based on what you've described for your specific use case, I think we'd prefer to have this be a one-off / implemented on Kibana's side of things. Since this is the first time it's come up in years, I don't think configuring the truncation max width is a very common use case, so I'm going to close this as not planned for now. That being said, if anyone else has a more generic use case in the future, we'd certainly be open to re-opening this issue or creating a new one! |
Is your feature request related to a problem? Please describe.
In Kibana we'd like to increase the max-width of the first breadcrumb before it is truncated. The default max-width is pretty short and this is user generated title we don't have control over.
elastic/kibana#170758.
Currently the truncation max-width is static 160px
eui/src/components/breadcrumbs/breadcrumb.styles.ts
Lines 74 to 76 in 9c891fa
We don't want to disable truncation completely
Describe the solution you'd like
Expose a
maxWidth
prop onEUIBreadcrumb
Describe alternatives you've considered
I think we could hack it with css on Kibana side
Desired timeline
If this doesn't look like a short term fix, please let us know, we could override with css short term.
Additional context
In case you'd have any other suggestions, would love to consider them
The text was updated successfully, but these errors were encountered: