From a8cec560a6f56922243d4fc7f4e31280807d770e Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 16 Oct 2024 02:33:38 +1100 Subject: [PATCH] [8.x] [Onboarding] UX Feedback - Slight Tweaks to search detail (#194873) (#196314) # Backport This will backport the following commits from `main` to `8.x`: - [[Onboarding] UX Feedback - Slight Tweaks to search detail (#194873)](https://github.com/elastic/kibana/pull/194873) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Michael DeFazio --- .../src/components/api_key_form.tsx | 2 +- .../src/providers/search_api_key_provider.tsx | 2 +- .../src/form_info_field/form_info_field.tsx | 1 + .../components/indices/details_page.tsx | 59 +++++++++---------- .../components/quick_stats/quick_stat.tsx | 9 ++- .../svl_search_index_detail_page.ts | 9 --- .../test_suites/search/search_index_detail.ts | 5 -- 7 files changed, 36 insertions(+), 51 deletions(-) diff --git a/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx b/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx index 02e5a46b640ac..0a94f3e336897 100644 --- a/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx +++ b/packages/kbn-search-api-keys-components/src/components/api_key_form.tsx @@ -47,7 +47,7 @@ export const ApiKeyForm: React.FC = ({ hasTitle = true }) => { actions={[ = ({ childr }, [state.status, createApiKey, validateApiKey]); const value: APIKeyContext = { - displayedApiKey: state.status === Status.showHiddenKey ? API_KEY_MASK : state.apiKey, + displayedApiKey: state.status === Status.showPreviewKey ? state.apiKey : API_KEY_MASK, apiKey: state.apiKey, toggleApiKeyVisibility: handleShowKeyVisibility, updateApiKey, diff --git a/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx b/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx index c99daba9f4537..5a63ad81ced21 100644 --- a/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx +++ b/x-pack/packages/search/shared_ui/src/form_info_field/form_info_field.tsx @@ -73,6 +73,7 @@ export const FormInfoField: React.FC = ({ { const handleDeleteIndexModal = useCallback(() => { setShowDeleteIndexModal(!isShowingDeleteModal); }, [isShowingDeleteModal]); + const { euiTheme } = useEuiTheme(); if (isInitialLoading || isMappingsInitialLoading) { return ( @@ -187,24 +187,13 @@ export const SearchIndexDetailsPage = () => { /> ) : ( <> - - navigateToIndexListPage()} - > - - - + {!isDocumentsExists ? ( { , ]} /> - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + = ({ - +

{title}

-
+
- {secondaryTitle} + + {secondaryTitle} +
diff --git a/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts b/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts index ca28207f54195..ed11a09c26b66 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts @@ -23,15 +23,6 @@ export function SvlSearchIndexDetailPageProvider({ getService }: FtrProviderCont async expectUseInPlaygroundLinkExists() { await testSubjects.existOrFail('useInPlaygroundLink', { timeout: 5000 }); }, - async expectBackToIndicesButtonExists() { - await testSubjects.existOrFail('backToIndicesButton', { timeout: 2000 }); - }, - async clickBackToIndicesButton() { - await testSubjects.click('backToIndicesButton'); - }, - async expectBackToIndicesButtonRedirectsToListPage() { - await testSubjects.existOrFail('indicesList'); - }, async expectConnectionDetails() { await testSubjects.existOrFail('connectionDetailsEndpoint', { timeout: 2000 }); expect(await (await testSubjects.find('connectionDetailsEndpoint')).getVisibleText()).to.be( diff --git a/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts b/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts index 66f15151441ae..aea757f7edea1 100644 --- a/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts +++ b/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts @@ -96,11 +96,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.svlSearchIndexDetailPage.expectAPIKeyToBeVisibleInCodeBlock(apiKey); }); - it('back to indices button should redirect to list page', async () => { - await pageObjects.svlSearchIndexDetailPage.expectBackToIndicesButtonExists(); - await pageObjects.svlSearchIndexDetailPage.clickBackToIndicesButton(); - await pageObjects.svlSearchIndexDetailPage.expectBackToIndicesButtonRedirectsToListPage(); - }); describe('With data', () => { before(async () => { await es.index({