From 1d2cd5889df34ac7a04218e38ab0f927ba2d3ab8 Mon Sep 17 00:00:00 2001 From: Rodney Norris Date: Mon, 16 Oct 2023 15:10:00 -0500 Subject: [PATCH] [Enterprise Search] fix: use full path for search apps nav url (#169014) ## Summary Updated the left nav `to` path for search applications to match the full path so the isActive check can pass instead of used the base path to redirect. ![image](https://github.com/elastic/kibana/assets/1972968/9b8ac4fa-8896-43d5-825c-39f5b38d48ee) --- .../public/applications/shared/layout/nav.test.tsx | 6 +++--- .../public/applications/shared/layout/nav.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index c67a3f877d720..f68a2eee1c5af 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -63,7 +63,7 @@ describe('useEnterpriseSearchContentNav', () => { id: 'applications', items: [ { - href: '/app/enterprise_search/applications', + href: '/app/enterprise_search/applications/search_applications', id: 'searchApplications', name: 'Search Applications', }, @@ -226,7 +226,7 @@ describe('useEnterpriseSearchApplicationNav', () => { id: 'applications', items: [ { - href: '/app/enterprise_search/applications', + href: '/app/enterprise_search/applications/search_applications', id: 'searchApplications', name: 'Search Applications', }, @@ -413,7 +413,7 @@ describe('useEnterpriseSearchAnalyticsNav', () => { id: 'applications', items: [ { - href: '/app/enterprise_search/applications', + href: '/app/enterprise_search/applications/search_applications', id: 'searchApplications', name: 'Search Applications', }, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx index ed2730a217c72..8fe9c36766c60 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.tsx @@ -78,7 +78,7 @@ export const useEnterpriseSearchNav = () => { }), ...generateNavLink({ shouldNotCreateHref: true, - to: APPLICATIONS_PLUGIN.URL, + to: APPLICATIONS_PLUGIN.URL + SEARCH_APPLICATIONS_PATH, }), }, {