From 98885b2c7d925fbb7e63fde732b9108e93d5dcca Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Thu, 21 Nov 2024 16:04:41 +0200 Subject: [PATCH] fix: [Search:Search Applications page]Popover for Create button is inaccessible via keyboard Closes: #199760 Closes: #199749 --- .../search_applications_list.tsx | 80 ++++++++----------- 1 file changed, 32 insertions(+), 48 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list.tsx index 126c44b6b5dca..fbc07eef5c5e1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_applications_list.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useEffect, useState } from 'react'; +import React, { useEffect } from 'react'; import { useActions, useValues } from 'kea'; import useThrottle from 'react-use/lib/useThrottle'; @@ -17,10 +17,9 @@ import { EuiFlexItem, EuiIcon, EuiLink, - EuiPopover, - EuiPopoverTitle, EuiSpacer, EuiText, + EuiToolTip, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -53,38 +52,10 @@ interface CreateSearchApplicationButtonProps { export const CreateSearchApplicationButton: React.FC = ({ disabled, }) => { - const [showPopover, setShowPopover] = useState(false); - return ( - setShowPopover(false)} - button={ -
setShowPopover(true)} - onMouseLeave={() => setShowPopover(false)} - tabIndex={0} - > - KibanaLogic.values.navigateToUrl(SEARCH_APPLICATION_CREATION_PATH)} - > - {i18n.translate( - 'xpack.enterpriseSearch.searchApplications.list.createSearchApplicationButton.label', - { - defaultMessage: 'Create', - } - )} - -
- } - > - + @@ -96,23 +67,35 @@ export const CreateSearchApplicationButton: React.FC - -
+ + + } + > + KibanaLogic.values.navigateToUrl(SEARCH_APPLICATION_CREATION_PATH)} > - - - - - -
-
+ {i18n.translate( + 'xpack.enterpriseSearch.searchApplications.list.createSearchApplicationButton.label', + { + defaultMessage: 'Create', + } + )} + + ); }; + interface ListProps { createSearchApplicationFlyoutOpen?: boolean; } @@ -223,6 +206,7 @@ export const SearchApplicationsList: React.FC = ({ <>