-
Notifications
You must be signed in to change notification settings - Fork 842
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
Better breadcrumb truncation #1346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for testing in IE @snide!! |
I thought about that. It's not technically, because it's just a pattern. I
think it's ok as long as we immediately make the change on upgrade. Cloud
doesn't use breadcrumbs so I think we are ok. Some communication should be
enough.
…On Wed, Dec 5, 2018, 6:55 AM Caroline Horn ***@***.*** wrote:
***@***.**** commented on this pull request.
------------------------------
In src-docs/src/views/header/header.js
<#1346 (comment)>:
> </EuiHeaderSection>
+ {this.renderBreadcrumbs()}
Would this be considered a breaking a change? That the breadcrumbs need to
shift it's location within the EuiHeader dom, though it's just a pattern
and not a component?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1346 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATzp_hl632xWF6hN06J_XV_Nw9s2wDsks5u195NgaJpZM4ZBvg9>
.
|
Sounds good! Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spalger, Sorry I wasn't too clear on the changes that need to be made in the Then it will behave like so: erg, something's broke with github's embedded img's, here's the link: https://d.pr/free/i/zplxwe |
Before this PR, applying truncation to
EuiBreadcrumbs
would max-width every breadcrumb to160px
. This caused some issues with the last item being unnecessarily truncated.In this PR, I've altered the way
EuiBreadcrumbs
handle thetruncate
prop as well as added the ability to addtruncate
to individual breadcrumbs.The new behavior is this:
truncate
to an individual breadcrumb (in thebreadcrumbs
object prop) will singly max-width that breadcrumb at160px
. This allows for more granular handling of the truncation ability.truncate
to the wholeEuiBreadcrumbs
component, will contain the whole thing to a single line of text and max-width every breadcrumb at160px
except for the last item. This last item will still truncate if it meets the right side of the container.EuiHeader
In order for these to truncate properly, the breadcrumb container had to be a direct child of the
EuiHeader
. This means, that the breadcrumbs need to be pulled out of aEuiHeaderSection
. This meant I had to alter/add some of the props for those items as well.Example of it working
https://d.pr/free/v/6Ge7ZD
Checklist
[ ] This was checked against keyboard-only and screenreader scenarios[ ] This required updates to Framer X components