Skip to content

Commit

Permalink
[Serverless] make parent nav item into breadcrumb link (#183189)
Browse files Browse the repository at this point in the history
## Summary

Currently the breadcrumb of the parent navigation item isn't a link:

<img width="339" alt="Screenshot 2024-05-10 at 2 06 42 PM"
src="https://github.com/elastic/kibana/assets/1676003/1471125f-59d7-468e-8ede-3a3c3c3e42dc">

This change makes it so the breadcrumb of parent navigation item is
linkable:
<img width="293" alt="Screenshot 2024-05-10 at 2 21 27 PM"
src="https://github.com/elastic/kibana/assets/1676003/aad5e650-33e1-419d-b866-0b7ec70e1f42">

The links will go to the first item in the list of child links.

The merging of this PR depends on
#183508 allows for this
functionality to work without making the left side parent collapsible
link, also a href link - only the breadcrumb.

## Testing
- Start a serverless kibana instance

- Navigate to a child link of an accordion using the left side
navigation
<img width="589" alt="Screenshot 2024-05-15 at 11 26 24 AM"
src="https://github.com/elastic/kibana/assets/1676003/d225967d-37d1-4f19-b3f5-856fcc1bce68">

- The breadcrumb should of this page should be a link and link you to
the first child link of the accordion
  • Loading branch information
neptunian committed May 16, 2024
1 parent fb8ba21 commit 99ab2f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const navigationTree: NavigationTreeDefinition = {
{
id: 'aiops',
title: 'AIOps',
link: 'ml:anomalyDetection',
renderAs: 'accordion',
spaceBefore: null,
children: [
Expand All @@ -80,6 +81,7 @@ export const navigationTree: NavigationTreeDefinition = {
defaultMessage: 'Anomaly detection',
}),
link: 'ml:anomalyDetection',
id: 'ml:anomalyDetection',
renderAs: 'item',
children: [
{
Expand Down Expand Up @@ -124,6 +126,7 @@ export const navigationTree: NavigationTreeDefinition = {
title: i18n.translate('xpack.serverlessObservability.nav.applications', {
defaultMessage: 'Applications',
}),
link: 'apm:services',
renderAs: 'accordion',
children: [
{
Expand Down Expand Up @@ -156,6 +159,7 @@ export const navigationTree: NavigationTreeDefinition = {
title: i18n.translate('xpack.serverlessObservability.nav.infrastructure', {
defaultMessage: 'Infrastructure',
}),
link: 'metrics:inventory',
renderAs: 'accordion',
children: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {

// check the aiops subsection
await svlCommonNavigation.sidenav.openSection('observability_project_nav.aiops'); // open ai ops subsection
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'ml:anomalyDetection' });
await svlCommonNavigation.sidenav.expectLinkActive({ deepLinkId: 'ml:anomalyDetection' });
await svlCommonNavigation.sidenav.clickLink({ navId: 'ml:anomalyDetection' });
await svlCommonNavigation.sidenav.expectLinkActive({ navId: 'ml:anomalyDetection' });
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'AIOps' });
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'ml:anomalyDetection',
Expand Down

0 comments on commit 99ab2f4

Please sign in to comment.