-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Force last breadcrumb to be inactive #166785
Force last breadcrumb to be inactive #166785
Conversation
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Page load bundle
To update your PR or re-run it, just comment with: cc @maximpn |
Before we go ahead with this, curious to hear opinions if it is worth losing the features the link in the last item brings:
|
@vadimkibana thank you for sharing you concerns 👍 I'm curious to heard the other opinions as well. I'll share my thoughts and observations below Checking different plugins in the current ESS solution I haven't found any active last breadcrumb. You can see some screenshots below For now we definitely have inconsistency between ESS and Serverless. |
I agree we have inconsistency between ESS and Serverless, |
@Dosant it could be a good solution but I'm afraid matching breadcrumb's and actual paths will always give an active last breadcrumb in Security Solution. We have Taking it into account we have the following
If the filters changed and a link without filters was shared another user will see a different page's state. When a user wants to share the "default" page's link?
I don't mind having the last breadcrumb active, I'm just afraid it will make things more complex. I'm also curious what @elastic/eui-team thinks. |
In my opinion, the current pattern of a non-linking final breadcrumb element adheres to industry-accepted best practices by utilizing breadcrumbs solely for wayfinding. See: https://www.nngroup.com/articles/breadcrumbs/ Specifically
This aligns with what I believe the user would expect in terms of behavior, which is consistent with common usage both in and out of Elastic. Introducing additional functionality that is effectively hidden within the link, such as clearing variables or opening a new tab, would be inconsistent with its usage elsewhere (again both in the product and out). If you believe the juice worth the squeeze, I could see those actions potentially being implemented separately as a part of a share button or a different UI pattern elsewhere outside the breadcrumbs. My .02c! |
Hi all, I am aligned with @maximpn and @julianrosado here. Actually, this is something we have been asking for ❤️ Solutions have been disabling the last breadcrumb intentionally with the traditional breadcrumbs API for ESS, using separate implementations. In serverless, we have the opportunity to unify this behavior using the And UX-wise, I agree it is confusing to have a breadcrumb link to the same page. Those side-functionalities could be implemented separately. |
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 feedback and explanation. Let's give it a go.
And UX-wise, I agree it is confusing to have a breadcrumb link to the same page. Those side-functionalities could be implemented separately.
The only thing that worries me is that, especially, in serverless with changed breadcrumbs there are still places that don't properly set the deeper breadcrumbs yet. These places are still to be found and fixed.
This means that you can go deeper in the navigation, but the last breadcrumb doesn't correctly reflect the navigation state. Such cases are definitely bugs, but when the last breadcrumb forced not to be a link, I think it makes the bug a bit worse
Good point @Dosant 👍 Do you have examples of such places (that don't properly set the deeper breadcrumbs yet)? I know it can be missing tab navigation. If we are talking about a situation page changes url path without updating breadcrumbs it's definitely a severe bug. Just thinking if it makes sense to detect such situations and yield a warning like a console warning and telemetry so it can be easily tracked. |
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.
Read up on the above discussion and approving on behalf of security-solution
. Thank you everyone for all the details, and @julianrosado for the reference behavior here. And thank you @maximpn for adding more consistency here. LGTM! 👍
Related to: #161540, #161539
Summary
Always force the last breadcrumb to be inactive.
Details
Usual UX expects the last breadcrumb to be inactive as it represents the current page. The same can be seen from EUI examples. It turns out Serverless Security Solution plugin does't remove
href
andonClick
fields from the last breadcrumb and passes it tochrome.setBreadcrumbs()
orserverless.setBreadcrumbs()
which renders the last breadcrumb as active but clicking on it only refreshes the page. ESS Security Solution on the other hand processes breadcrumbs currently. The same behavior may be the case for the other plungs as well.As it's much simpler to strip off undesired fields at one place instead of processing them in plugins it's done in
packages/core/chrome/core-chrome-browser-internal/src/ui/header/header_breadcrumbs.tsx
. Security Solution codebase has been updated accordingly.A side effect of this PR is consistent ESS and Serverless breadcrumbs behavior and it will help to reuse ESS tests for Serverless.