-
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
[EuiBreadcrumbs] Always show collapsed items & Amsterdam update to [EuiHeaderBreadcrumbs] #3578
Conversation
- Added BREAKPOINTS and breakpoint types in `/services` - Add all props and fixup examples - Breadcrumb become EuiBreadcrumb - Fixes contrast for EuiControlBar’s usage (not perfect)
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.
Functional changes look fantastic 🎉
Before I jump too far into the review, the only thing that looked a bit odd to me visually was using the caret dropdown for the ...
stuff. I preferred the original way where it was more buttonized so you didn't need the caret.
I'm guessing this change was made because amsterdam buttonizes all the breadcrumbs, so it was hard to make it look distinct. Could we potentially just make that button a little darker or something to call it out a little more. I'm just trying to be thoughtful towards the space. Only other alternative I have is to maybe use a more involved icon rather than the text + icon treatment we're using here?
Preview documentation changes for this PR: https://eui.elastic.co/pr_3578/ |
FYI, I decided I wanted to change how I'm declaring |
And then how EuiBreadcrumbs handle the custom responsive option
@snide Yeah we talked about it quite a bit in Slack and ended up on this particular display because it:
Also it was quite cumbersome to try to get the new style to work on both links and badges and was easier to just make them all links. |
Also, I've pushed the changes that I talked about and this should be reviewable again. 🙇♀️ |
Haven't reviewed this at all yet but I don't imagine there'll be many a11y concerns roughly knowing what was happening here before. Do you want me to review and leave comments on this PR that you can then do whatever with or do you want me to open a new issue for any that come up? |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3578/ |
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.
Few small items, overall the change look great
@myasonik I'd like to push any a11y specific issues for a follow up PR, so yes maybe one meta issue for breadcrumb accessibility would be great. So no need to review this particular PR, but could be a starting to point to look at the overall accessibility of the component. |
Co-authored-by: Chandler Prall <[email protected]>
Preview documentation changes for this PR: https://eui.elastic.co/pr_3578/ |
- Fixing some test suites - Fixing aria-current when no href - Making sure `max` overrides larger breakpoint values
export const BreadcrumbResponsiveMaxCount: FunctionComponent< | ||
EuiBreadcrumbResponsiveMaxCount | ||
> = () => <div />; |
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.
@chandlerprall I can't seem to get this one to show up in the props table
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.
It's working for me - try stopping your dev server, rm -rf .cache-loader
, and re-start the server. Alternatively, try changing BreadcrumbProps's div
to a span
- this is often enough to flush the webpack cache for a specific prop object.
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.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3578/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3578/ |
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!
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.
Thanks for the explanation and fixes. LGTM
Part 3/3 for next iteration of K8 support (Amsterdam breadcrumbs)
Digging into the styles and render of EuiBreadcrumbs led me down the path add some enhancements/changes to the component itself.
1. Always show collapsed items when
max
is setI removed the old
showMaxPopover
prop and instead made this the default render method of the breadcrumbs. It's a much better design to allow users to always be able to navigate all breadcrumbs at any time.It also changes the display of the collapsed item slightly to simply show a down arrow next to the ellipsis.
Before

After

2. Responsive breadcrumbs always show collapsed items
Before, the responsive nature of breadcrumbs would hide the display of items with CSS as the window width got smaller. Again this meant that the user could never view or get to the earlier breadcrumbs in the list which could then become mostly unhelpful for them.
Now, I'm adjusting
max
property depending on the width of the browser and the current breakpoint (ifresponsive
istrue
of course).Which also lead me to need the creation of a global responsive/breakpoint service/helper so that it's also easy for consumers to override the specific breakpoints.
3. Amsterdam theme
Because we found usages of EuiBreadcrumbs outside of the header, for example in EuiControlBar, we decided to only update the EuiHeaderBreadcrumbs to the more stylized version for Amsterdam.
Other Code Considerations
A. I didn't consider the removal of
showMaxPopover
to be a breaking change since this behavior is always on now. It will just alert consumers that the prop no longer exists.B. Renamed
Breadcrumb
prop export toEuiBreadcrumb
(is this considered a break?)C. Created a
euiButtonDefaultStyle()
mixin for Amsterdam's transparent background style buttons for reuse on other components like the header breadcrumbs.D. This doesn't tackle any accessibility issues since it's already become such a large PR. We can do a follow-up. cc @myasonik
Breaking change:
Changed
breadcrumb
TS type exported name fromBreadcrumb
toEuiBreadcrumb
Checklist
[ ] Checked for accessibility including keyboard-only and screenreader modes