-
Notifications
You must be signed in to change notification settings - Fork 841
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
Show all breadcrumbs in a popover #2342
Show all breadcrumbs in a popover #2342
Conversation
jenkins test this |
Tried this out quick, its a nice enhancement to navigation! A couple of quick observations regarding keyboard navigation...
🤔 I wonder if this should be the default behavior of the breadcrumb component? |
Furthering @ryankeairns' comments is that there's also no visual difference between the ellipsis that's clickable the one that is not. As a user, I could get used to the clickable version then think the other one is broken. Or get used to the non-clickable version and never know that there is a clickable version. I'm not sure what a good solution is, however. I think making it our primary color may stand out too much. It could just be the text color instead of grayed out, but it that enough. Maybe for now it is enough since even the regular clickable breadcrumbs are text colored. Or do we have a breadcrumb coloring problem in general? (Which doesn't need to be solved in this PR)/ |
@daveyholler Is this ready for review? |
@cchaos It is :) |
@cchaos I thought about that too, and concluded that the extra two items (1 on even smaller screens) was a small tradeoff for the full context. 🤷♂ |
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.
That's only if the consumer provided a max of 3, what if the max was 10 and there were 20 items? Again, not advocation one way or the other, but we just need to think about all scenarios. |
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.
Just a few more things.
Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com>
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.
Sorry, one more thing. Please add a test for this new prop.
…nto responsive-breadcrumbs
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.
LGTM, with one small nit and with @chandlerprall's approval
// array so that all we have left are the items that aren't | ||
// visible on screen. Only do it when showMaxPopover is true | ||
if (showMaxPopover) { | ||
for (let i = breadcrumbsToRemove.length - 1; i >= 0; i--) { |
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.
My head hurts. 🤕 @chandlerprall would you mind glancing over this logic. It does work, I'm just wondering if there's a more compact way to handle it?
Co-Authored-By: Caroline Horn <549577+cchaos@users.noreply.github.com>
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.
Changes LGTM, thanks @daveyholler !
Summary
Allows all breadcrumbs to be displayed in a popover. Useful when the list is truncated, but you still want users to be able to navigate to anywhere in the breadcrumbs list.
Checklist