From ec2fca195e020941032cb3d019a30475f6b400c6 Mon Sep 17 00:00:00 2001 From: Rodney Norris Date: Mon, 13 Jan 2025 10:33:47 -0600 Subject: [PATCH] [Search] Removing App Search & Workplace Search deeplinks (#206106) ## Summary This PR removes the deeplink for App Search & Workplace Search. This is a follow-up to #205634 ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Elastic Machine --- .../chrome/browser/src/project_navigation.ts | 4 - .../shared/deeplinks/search/constants.ts | 2 - .../shared/deeplinks/search/deep_links.ts | 9 -- .../packages/shared/deeplinks/search/index.ts | 4 - .../translations/translations/fr-FR.json | 10 -- .../translations/translations/ja-JP.json | 10 -- .../translations/translations/zh-CN.json | 10 -- .../enterprise_search/common/constants.ts | 29 ----- .../app_search_product_card.tsx | 40 ------ .../enterprise_search_product_card.test.tsx | 59 --------- .../enterprise_search_product_card.tsx | 63 ---------- .../workplace_search_product_card.test.tsx | 34 ------ .../workplace_search_product_card.tsx | 44 ------- .../generate_breadcrumbs.test.ts | 114 ------------------ .../kibana_chrome/generate_breadcrumbs.ts | 11 -- .../kibana_chrome/generate_title.test.ts | 28 +---- .../shared/kibana_chrome/generate_title.ts | 8 -- .../shared/kibana_chrome/index.ts | 2 - .../shared/kibana_chrome/set_chrome.test.tsx | 65 +--------- .../shared/kibana_chrome/set_chrome.tsx | 38 ------ .../public/applications/shared/types.ts | 4 - 21 files changed, 5 insertions(+), 583 deletions(-) delete mode 100644 x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/app_search_product_card.tsx delete mode 100644 x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.test.tsx delete mode 100644 x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.tsx delete mode 100644 x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.test.tsx delete mode 100644 x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.tsx diff --git a/src/core/packages/chrome/browser/src/project_navigation.ts b/src/core/packages/chrome/browser/src/project_navigation.ts index f4a5af26c4176..064b77a62baaf 100644 --- a/src/core/packages/chrome/browser/src/project_navigation.ts +++ b/src/core/packages/chrome/browser/src/project_navigation.ts @@ -26,8 +26,6 @@ import type { EnterpriseSearchContentApp, EnterpriseSearchApplicationsApp, EnterpriseSearchAnalyticsApp, - EnterpriseSearchAppsearchApp, - EnterpriseSearchWorkplaceSearchApp, ServerlessSearchApp, DeepLinkId as SearchLink, } from '@kbn/deeplinks-search'; @@ -54,8 +52,6 @@ export type AppId = | EnterpriseSearchContentApp | EnterpriseSearchApplicationsApp | EnterpriseSearchAnalyticsApp - | EnterpriseSearchAppsearchApp - | EnterpriseSearchWorkplaceSearchApp | ServerlessSearchApp | ObservabilityApp | SecurityApp diff --git a/src/platform/packages/shared/deeplinks/search/constants.ts b/src/platform/packages/shared/deeplinks/search/constants.ts index d1992d22da120..85f8707bd968e 100644 --- a/src/platform/packages/shared/deeplinks/search/constants.ts +++ b/src/platform/packages/shared/deeplinks/search/constants.ts @@ -11,8 +11,6 @@ export const ENTERPRISE_SEARCH_APP_ID = 'enterpriseSearch'; export const ENTERPRISE_SEARCH_CONTENT_APP_ID = 'enterpriseSearchContent'; export const ENTERPRISE_SEARCH_APPLICATIONS_APP_ID = 'enterpriseSearchApplications'; export const ENTERPRISE_SEARCH_ANALYTICS_APP_ID = 'enterpriseSearchAnalytics'; -export const ENTERPRISE_SEARCH_APPSEARCH_APP_ID = 'appSearch'; -export const ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID = 'workplaceSearch'; export const SERVERLESS_ES_APP_ID = 'serverlessElasticsearch'; export const SERVERLESS_ES_CONNECTORS_ID = 'serverlessConnectors'; export const SERVERLESS_ES_WEB_CRAWLERS_ID = 'serverlessWebCrawlers'; diff --git a/src/platform/packages/shared/deeplinks/search/deep_links.ts b/src/platform/packages/shared/deeplinks/search/deep_links.ts index 662481cd038d5..2a4b47dde31f0 100644 --- a/src/platform/packages/shared/deeplinks/search/deep_links.ts +++ b/src/platform/packages/shared/deeplinks/search/deep_links.ts @@ -15,8 +15,6 @@ import { ENTERPRISE_SEARCH_CONTENT_APP_ID, ENTERPRISE_SEARCH_APPLICATIONS_APP_ID, ENTERPRISE_SEARCH_ANALYTICS_APP_ID, - ENTERPRISE_SEARCH_APPSEARCH_APP_ID, - ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID, ES_SEARCH_PLAYGROUND_ID, SERVERLESS_ES_SEARCH_INFERENCE_ENDPOINTS_ID, SEARCH_HOMEPAGE, @@ -34,8 +32,6 @@ export type EnterpriseSearchApp = typeof ENTERPRISE_SEARCH_APP_ID; export type EnterpriseSearchContentApp = typeof ENTERPRISE_SEARCH_CONTENT_APP_ID; export type EnterpriseSearchApplicationsApp = typeof ENTERPRISE_SEARCH_APPLICATIONS_APP_ID; export type EnterpriseSearchAnalyticsApp = typeof ENTERPRISE_SEARCH_ANALYTICS_APP_ID; -export type EnterpriseSearchAppsearchApp = typeof ENTERPRISE_SEARCH_APPSEARCH_APP_ID; -export type EnterpriseSearchWorkplaceSearchApp = typeof ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID; export type ServerlessSearchApp = typeof SERVERLESS_ES_APP_ID; export type ConnectorsId = typeof SERVERLESS_ES_CONNECTORS_ID; export type ServerlessWebCrawlers = typeof SERVERLESS_ES_WEB_CRAWLERS_ID; @@ -54,8 +50,6 @@ export type ContentLinkId = 'searchIndices' | 'connectors' | 'webCrawlers'; export type ApplicationsLinkId = 'searchApplications'; -export type AppsearchLinkId = 'engines'; - export type SearchInferenceEndpointsLinkId = 'inferenceEndpoints'; export type SynonymsLinkId = 'synonyms'; @@ -67,8 +61,6 @@ export type DeepLinkId = | EnterpriseSearchContentApp | EnterpriseSearchApplicationsApp | EnterpriseSearchAnalyticsApp - | EnterpriseSearchAppsearchApp - | EnterpriseSearchWorkplaceSearchApp | ServerlessSearchApp | ConnectorsId | ServerlessWebCrawlers @@ -78,7 +70,6 @@ export type DeepLinkId = | SearchHomepage | `${EnterpriseSearchContentApp}:${ContentLinkId}` | `${EnterpriseSearchApplicationsApp}:${ApplicationsLinkId}` - | `${EnterpriseSearchAppsearchApp}:${AppsearchLinkId}` | `${SearchInferenceEndpointsId}:${SearchInferenceEndpointsLinkId}` | `${SearchSynonymsId}:${SynonymsLinkId}` | SearchStart diff --git a/src/platform/packages/shared/deeplinks/search/index.ts b/src/platform/packages/shared/deeplinks/search/index.ts index 2b3d392971a5f..ab9d2e6a8d43f 100644 --- a/src/platform/packages/shared/deeplinks/search/index.ts +++ b/src/platform/packages/shared/deeplinks/search/index.ts @@ -12,8 +12,6 @@ export { ENTERPRISE_SEARCH_CONTENT_APP_ID, ENTERPRISE_SEARCH_APPLICATIONS_APP_ID, ENTERPRISE_SEARCH_ANALYTICS_APP_ID, - ENTERPRISE_SEARCH_APPSEARCH_APP_ID, - ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID, SERVERLESS_ES_APP_ID, SERVERLESS_ES_CONNECTORS_ID, SEARCH_ELASTICSEARCH, @@ -28,8 +26,6 @@ export type { EnterpriseSearchContentApp, EnterpriseSearchApplicationsApp, EnterpriseSearchAnalyticsApp, - EnterpriseSearchAppsearchApp, - EnterpriseSearchWorkplaceSearchApp, ServerlessSearchApp, DeepLinkId, } from './deep_links'; diff --git a/x-pack/platform/plugins/private/translations/translations/fr-FR.json b/x-pack/platform/plugins/private/translations/translations/fr-FR.json index 02d793a575a73..49d99cf45d346 100644 --- a/x-pack/platform/plugins/private/translations/translations/fr-FR.json +++ b/x-pack/platform/plugins/private/translations/translations/fr-FR.json @@ -16094,10 +16094,6 @@ "xpack.enterpriseSearch.appSearch.crawler.addDomainForm.networkConnectivityFailureMessage": "Impossible d'établir une connexion réseau, car le contrôle de la \"Validation initiale\" a échoué.", "xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.deselectAllButtonLabel": "Tout désélectionner", "xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.selectAllButtonLabel": "Tout sélectionner", - "xpack.enterpriseSearch.appSearch.cta": "Explorer", - "xpack.enterpriseSearch.appSearch.productCardDescription": "Une solution sur mesure pour les applications et les sites web, qui fournit les outils dont vous avez besoin pour concevoir, implémenter et gérer efficacement ces expériences de recherche orientées clients.", - "xpack.enterpriseSearch.appSearch.productDescription": "Tirez parti des tableaux de bord, des analyses et des API pour simplifier la recherche d'applications avancée.", - "xpack.enterpriseSearch.appSearch.productName": "App Search", "xpack.enterpriseSearch.attachIndexBox.createSameIndexButtonLabel": "Créer et attacher un index nommé {indexName}", "xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexErrorTextLabel": "Vous ne pouvez pas créer un nouvel index en utilisant un nom d'index existant. Choisissez un index existant ou créez un nouvel index avec un nouveau nom.", "xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexHelpTextLabel": "Vous pouvez utiliser un index existant ou en créer un nouveau.", @@ -17166,8 +17162,6 @@ "xpack.enterpriseSearch.enterpriseSearch.setupGuide.description": "Effectuez des recherches sur tout, partout. Offrez à vos équipes débordées une expérience de recherche innovante et puissante facilement mise en œuvre. Intégrez rapidement une fonction de recherche préréglée à votre site web, à votre application ou à votre lieu de travail. Effectuez des recherches simples sur tout.", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.notConfigured": "Enterprise Search n'est pas encore configuré dans votre instance Kibana.", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt": "Premiers pas avec Enterprise Search", - "xpack.enterpriseSearch.enterpriseSearchCard.cta": "En savoir plus", - "xpack.enterpriseSearch.entSearch.productCardDescription": "Applications standalone adaptées à des expériences de recherche plus simples, conviviales et axées sur les entreprises.", "xpack.enterpriseSearch.exampleConnectorLabel": "Exemple", "xpack.enterpriseSearch.finishUpStep.euiButton.viewInDiscoverLabel": "Afficher dans Discover", "xpack.enterpriseSearch.getConnectorTypeBadge.connectorClientBadgeLabel": "Autogéré", @@ -17720,11 +17714,7 @@ "xpack.enterpriseSearch.whatsNextBox.searchPlaygroundButtonLabel": "Rechercher dans Playground", "xpack.enterpriseSearch.whatsNextBox.whatsNextPanelDescription": "Vous pouvez synchroniser manuellement vos données, planifier une synchronisation récurrente ou consulter vos documents.", "xpack.enterpriseSearch.whatsNextBox.whatsNextPanelLabel": "Et ensuite ?", - "xpack.enterpriseSearch.workplaceSearch.cta": "Explorer", "xpack.enterpriseSearch.workplaceSearch.explorePlatinumFeatures.link": "Explorer les fonctionnalités Platinum", - "xpack.enterpriseSearch.workplaceSearch.productCardDescription": "Taillé sur mesure pour les équipes professionnelles internes, Workplace Search permet une connectivité instantanée avec les outils de productivité populaires et les sources tierces sur une unique plateforme unifiée.", - "xpack.enterpriseSearch.workplaceSearch.productDescription": "Effectuez des recherches dans tous les documents, fichiers et sources disponibles sur votre lieu de travail virtuel.", - "xpack.enterpriseSearch.workplaceSearch.productName": "Workplace Search", "xpack.eventLog.savedObjectProviderRegistry.getProvidersClient.noDefaultProvider": "Le log d'événements requiert un fournisseur par défaut.", "xpack.exploratoryView..synthetics.addDataButtonLabel": "Ajouter des données synthétiques", "xpack.exploratoryView.alerts.alertStarted": "Horodatage", diff --git a/x-pack/platform/plugins/private/translations/translations/ja-JP.json b/x-pack/platform/plugins/private/translations/translations/ja-JP.json index ba5ddf7c6690d..563b5f13dd00b 100644 --- a/x-pack/platform/plugins/private/translations/translations/ja-JP.json +++ b/x-pack/platform/plugins/private/translations/translations/ja-JP.json @@ -15957,10 +15957,6 @@ "xpack.enterpriseSearch.appSearch.crawler.addDomainForm.networkConnectivityFailureMessage": "[初期検証]チェックが失敗したため、ネットワーク接続を確立できません。", "xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.deselectAllButtonLabel": "すべて選択解除", "xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.selectAllButtonLabel": "すべて選択", - "xpack.enterpriseSearch.appSearch.cta": "探索", - "xpack.enterpriseSearch.appSearch.productCardDescription": "アプリやWebサイト向けのカスタムソリューション。ユーザー向けの検索エクスペリエンスを設計、実装、効果的に管理するために必要なツールを提供します。", - "xpack.enterpriseSearch.appSearch.productDescription": "ダッシュボード、分析、APIを活用し、高度なアプリケーション検索をシンプルにします。", - "xpack.enterpriseSearch.appSearch.productName": "App Search", "xpack.enterpriseSearch.attachIndexBox.createSameIndexButtonLabel": "インデックス{indexName}を作成して付ける", "xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexErrorTextLabel": "既存のインデックス名を使用して、新しいインデックスを作成できません。既存のインデックスを選択するか、新しい名前で新しいインデックスを作成できます。", "xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexHelpTextLabel": "既存のインデックスを使用するか、新しく作成できます。", @@ -17027,8 +17023,6 @@ "xpack.enterpriseSearch.enterpriseSearch.setupGuide.description": "場所を問わず、何でも検索。組織を支える多忙なチームのために、パワフルでモダンな検索エクスペリエンスを簡単に導入できます。Webサイトやアプリ、ワークプレイスに事前調整済みの検索をすばやく追加しましょう。何でもシンプルに検索できます。", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.notConfigured": "エンタープライズ サーチはまだKibanaインスタンスで構成されていません。", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt": "エンタープライズ サーチの基本操作", - "xpack.enterpriseSearch.enterpriseSearchCard.cta": "詳細", - "xpack.enterpriseSearch.entSearch.productCardDescription": "よりシンプルで使いやすく、ビジネスに特化した検索エクスペリエンスを提供するスタンドアロンアプリケーション。", "xpack.enterpriseSearch.exampleConnectorLabel": "例", "xpack.enterpriseSearch.finishUpStep.euiButton.viewInDiscoverLabel": "Discoverに表示", "xpack.enterpriseSearch.getConnectorTypeBadge.connectorClientBadgeLabel": "セルフマネージド", @@ -17578,11 +17572,7 @@ "xpack.enterpriseSearch.whatsNextBox.searchPlaygroundButtonLabel": "Search Playground", "xpack.enterpriseSearch.whatsNextBox.whatsNextPanelDescription": "データを手動で同期したり、繰り返し同期をスケジュールしたり、ドキュメントを表示したりできます。", "xpack.enterpriseSearch.whatsNextBox.whatsNextPanelLabel": "次のステップ", - "xpack.enterpriseSearch.workplaceSearch.cta": "探索", "xpack.enterpriseSearch.workplaceSearch.explorePlatinumFeatures.link": "プラチナ機能の詳細", - "xpack.enterpriseSearch.workplaceSearch.productCardDescription": "社内のビジネスチーム向けにカスタマイズされたWorkplace Searchは、一般的な生産性向上ツールやサードパーティのソースに即座に接続し、単一の統合プラットフォームを構築できます。", - "xpack.enterpriseSearch.workplaceSearch.productDescription": "仮想ワークプレイスで使用可能な、すべてのドキュメント、ファイル、ソースを検索します。", - "xpack.enterpriseSearch.workplaceSearch.productName": "Workplace Search", "xpack.eventLog.savedObjectProviderRegistry.getProvidersClient.noDefaultProvider": "イベントログにはデフォルトプロバイダーが必要です。", "xpack.exploratoryView..synthetics.addDataButtonLabel": "Syntheticsデータの追加", "xpack.exploratoryView.alerts.alertStarted": "タイムスタンプ", diff --git a/x-pack/platform/plugins/private/translations/translations/zh-CN.json b/x-pack/platform/plugins/private/translations/translations/zh-CN.json index 5ab5386a43b0d..42d027dcacfb4 100644 --- a/x-pack/platform/plugins/private/translations/translations/zh-CN.json +++ b/x-pack/platform/plugins/private/translations/translations/zh-CN.json @@ -15678,10 +15678,6 @@ "xpack.enterpriseSearch.appSearch.crawler.addDomainForm.networkConnectivityFailureMessage": "无法建立网络连接,因为'初始验证'检查失败。", "xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.deselectAllButtonLabel": "取消全选", "xpack.enterpriseSearch.appSearch.crawler.simplifiedSelectable.selectAllButtonLabel": "全选", - "xpack.enterpriseSearch.appSearch.cta": "浏览", - "xpack.enterpriseSearch.appSearch.productCardDescription": "为应用和网站专门定制的解决方案,提供设计、实施和高效管理那些面向用户的搜索体验所需的工具。", - "xpack.enterpriseSearch.appSearch.productDescription": "利用仪表板、分析和 API 执行高级应用程序搜索简单易行。", - "xpack.enterpriseSearch.appSearch.productName": "App Search", "xpack.enterpriseSearch.attachIndexBox.createSameIndexButtonLabel": "创建并附加名为 {indexName} 的索引", "xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexErrorTextLabel": "无法使用现有索引名称创建新索引。请选择现有索引,或使用新名称创建新索引。", "xpack.enterpriseSearch.attachIndexBox.euiFormRow.associatedIndexHelpTextLabel": "您可以使用现有索引,也可以创建新索引。", @@ -16744,8 +16740,6 @@ "xpack.enterpriseSearch.enterpriseSearch.setupGuide.description": "随时随地进行全面搜索。为工作繁忙的团队轻松实现强大的现代搜索体验。将预先调整的搜索功能快速添加到您的网站、应用或工作区。全面搜索就是这么简单。", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.notConfigured": "企业搜索尚未在您的 Kibana 实例中配置。", "xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt": "企业搜索入门", - "xpack.enterpriseSearch.enterpriseSearchCard.cta": "了解详情", - "xpack.enterpriseSearch.entSearch.productCardDescription": "为构建更简单、用户友好且以业务为中心的搜索体验而量身定制的独立应用程序。", "xpack.enterpriseSearch.exampleConnectorLabel": "示例", "xpack.enterpriseSearch.finishUpStep.euiButton.viewInDiscoverLabel": "在 Discover 中查看", "xpack.enterpriseSearch.getConnectorTypeBadge.connectorClientBadgeLabel": "自管型", @@ -17296,11 +17290,7 @@ "xpack.enterpriseSearch.whatsNextBox.searchPlaygroundButtonLabel": "搜索 Playground", "xpack.enterpriseSearch.whatsNextBox.whatsNextPanelDescription": "您可以手动同步数据,计划重复同步或参阅文档。", "xpack.enterpriseSearch.whatsNextBox.whatsNextPanelLabel": "后续操作", - "xpack.enterpriseSearch.workplaceSearch.cta": "浏览", "xpack.enterpriseSearch.workplaceSearch.explorePlatinumFeatures.link": "了解白金级功能", - "xpack.enterpriseSearch.workplaceSearch.productCardDescription": "Workplace Search 为内部业务团队量身定制,将常见的生产力工具和第三方源即时连接到单个统一平台中。", - "xpack.enterpriseSearch.workplaceSearch.productDescription": "搜索整个虚拟工作区中存在的所有文档、文件和源。", - "xpack.enterpriseSearch.workplaceSearch.productName": "Workplace Search", "xpack.eventLog.savedObjectProviderRegistry.getProvidersClient.noDefaultProvider": "事件日志需要默认提供程序。", "xpack.exploratoryView..synthetics.addDataButtonLabel": "添加 Synthetics 数据", "xpack.exploratoryView.alerts.alertStarted": "时间戳", diff --git a/x-pack/solutions/search/plugins/enterprise_search/common/constants.ts b/x-pack/solutions/search/plugins/enterprise_search/common/constants.ts index 8e69b80564802..78992ebcfc552 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/common/constants.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/common/constants.ts @@ -12,8 +12,6 @@ import { ENTERPRISE_SEARCH_CONTENT_APP_ID, ENTERPRISE_SEARCH_APPLICATIONS_APP_ID, ENTERPRISE_SEARCH_ANALYTICS_APP_ID, - ENTERPRISE_SEARCH_APPSEARCH_APP_ID, - ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID, SEARCH_ELASTICSEARCH, SEARCH_VECTOR_SEARCH, SEARCH_SEMANTIC_SEARCH, @@ -105,33 +103,6 @@ export const ELASTICSEARCH_PLUGIN = { SUPPORT_URL: 'https://discuss.elastic.co/c/elastic-stack/elasticsearch/', }; -export const APP_SEARCH_PLUGIN = { - ID: ENTERPRISE_SEARCH_APPSEARCH_APP_ID, - NAME: i18n.translate('xpack.enterpriseSearch.appSearch.productName', { - defaultMessage: 'App Search', - }), - DESCRIPTION: i18n.translate('xpack.enterpriseSearch.appSearch.productDescription', { - defaultMessage: - 'Leverage dashboards, analytics, and APIs for advanced application search made simple.', - }), - URL: '/app/enterprise_search/app_search', - SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/app-search/', -}; - -export const WORKPLACE_SEARCH_PLUGIN = { - ID: ENTERPRISE_SEARCH_WORKPLACESEARCH_APP_ID, - NAME: i18n.translate('xpack.enterpriseSearch.workplaceSearch.productName', { - defaultMessage: 'Workplace Search', - }), - DESCRIPTION: i18n.translate('xpack.enterpriseSearch.workplaceSearch.productDescription', { - defaultMessage: - 'Search all documents, files, and sources available across your virtual workplace.', - }), - URL: '/app/enterprise_search/workplace_search', - NON_ADMIN_URL: '/app/enterprise_search/workplace_search/p', - SUPPORT_URL: 'https://discuss.elastic.co/c/enterprise-search/workplace-search/', -}; - export const SEARCH_EXPERIENCES_PLUGIN = { ID: 'searchExperiences', NAME: i18n.translate('xpack.enterpriseSearch.searchExperiences.productName', { diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/app_search_product_card.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/app_search_product_card.tsx deleted file mode 100644 index f8dac98f048ad..0000000000000 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/app_search_product_card.tsx +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { i18n } from '@kbn/i18n'; - -import { APP_SEARCH_PLUGIN } from '../../../../../common/constants'; -import { ProductCard } from '../product_card'; - -export interface AppSearchProductCardProps { - hasBorder: boolean; - hasShadow: boolean; -} - -export const AppSearchProductCard: React.FC = ({ - hasBorder = true, - hasShadow = true, -}) => ( - -); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.test.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.test.tsx deleted file mode 100644 index b1c0394e80235..0000000000000 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.test.tsx +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { setMockValues } from '../../../__mocks__/kea_logic'; - -import React from 'react'; - -import { mount } from 'enzyme'; - -import { AppSearchProductCard } from './app_search_product_card'; -import { EnterpriseSearchProductCard } from './enterprise_search_product_card'; -import { WorkplaceSearchProductCard } from './workplace_search_product_card'; - -describe('EnterpriseSearchProductCard', () => { - beforeEach(() => { - setMockValues({ config: { host: 'localhost' } }); - }); - - it('renders both services with access', () => { - const wrapper = mount( - - ); - - expect(wrapper.find(AppSearchProductCard)).toHaveLength(1); - expect(wrapper.find(WorkplaceSearchProductCard)).toHaveLength(1); - }); - it('can render just app search', () => { - const wrapper = mount( - - ); - - expect(wrapper.find(AppSearchProductCard)).toHaveLength(1); - expect(wrapper.find(WorkplaceSearchProductCard)).toHaveLength(0); - }); - it('can render just workplace search', () => { - const wrapper = mount( - - ); - - expect(wrapper.find(AppSearchProductCard)).toHaveLength(0); - expect(wrapper.find(WorkplaceSearchProductCard)).toHaveLength(1); - }); -}); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.tsx deleted file mode 100644 index d76940d1721b3..0000000000000 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/enterprise_search_product_card.tsx +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { i18n } from '@kbn/i18n'; - -import { - ENTERPRISE_SEARCH_PRODUCT_NAME, - ENTERPRISE_SEARCH_CONTENT_PLUGIN, -} from '../../../../../common/constants'; -import { docLinks } from '../../../shared/doc_links'; -import { ProductCard } from '../product_card'; - -import { AppSearchProductCard } from './app_search_product_card'; -import { WorkplaceSearchProductCard } from './workplace_search_product_card'; - -export interface EnterpriseSearchProductCardProps { - hasAppSearchAccess: boolean; - hasWorkplaceSearchAccess: boolean; - isWorkplaceSearchAdmin: boolean; -} - -export const EnterpriseSearchProductCard = ({ - hasAppSearchAccess, - hasWorkplaceSearchAccess, - isWorkplaceSearchAdmin, -}: EnterpriseSearchProductCardProps) => { - const rightPanelItems: React.ReactNode[] = []; - if (hasAppSearchAccess) { - rightPanelItems.push(); - } - if (hasWorkplaceSearchAccess) { - rightPanelItems.push( - - ); - } - return ( - - ); -}; diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.test.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.test.tsx deleted file mode 100644 index f3e5ab549dd9f..0000000000000 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.test.tsx +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { shallow } from 'enzyme'; - -import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; -import { ProductCard } from '../product_card'; - -import { WorkplaceSearchProductCard } from './workplace_search_product_card'; - -describe('WorkplaceSearchProductCard', () => { - it('renders with url when admin', () => { - const wrapper = shallow( - - ); - - expect(wrapper.find(ProductCard)).toHaveLength(1); - expect(wrapper.find(ProductCard).prop('url')).toEqual(WORKPLACE_SEARCH_PLUGIN.URL); - }); - it('renders with non-admin url when not admin', () => { - const wrapper = shallow( - - ); - - expect(wrapper.find(ProductCard)).toHaveLength(1); - expect(wrapper.find(ProductCard).prop('url')).toEqual(WORKPLACE_SEARCH_PLUGIN.NON_ADMIN_URL); - }); -}); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.tsx deleted file mode 100644 index 94d3c9bd96bfc..0000000000000 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/workplace_search_product_card.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { i18n } from '@kbn/i18n'; - -import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; -import { ProductCard } from '../product_card'; - -export interface WorkplaceSearchProductCardProps { - hasBorder: boolean; - hasShadow: boolean; - isWorkplaceSearchAdmin: boolean; -} - -export const WorkplaceSearchProductCard: React.FC = ({ - hasBorder = true, - hasShadow = true, - isWorkplaceSearchAdmin, -}) => ( - -); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts index 7cda1c6893b17..c6d86dc385b23 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.test.ts @@ -19,9 +19,7 @@ import { useGenerateBreadcrumbs, useEuiBreadcrumbs, useEnterpriseSearchBreadcrumbs, - useAppSearchBreadcrumbs, useSearchBreadcrumbs, - useWorkplaceSearchBreadcrumbs, } from './generate_breadcrumbs'; describe('useGenerateBreadcrumbs', () => { @@ -228,115 +226,3 @@ describe('useEnterpriseSearchBreadcrumbs', () => { ]); }); }); - -describe('useAppSearchBreadcrumbs', () => { - beforeEach(() => { - jest.clearAllMocks(); - mockHistory.createHref.mockImplementation( - ({ pathname }: any) => `/app/enterprise_search/app_search${pathname}` - ); - }); - - it('Builds a chain of breadcrumbs with Enterprise Search and App Search at the root', () => { - const breadcrumbs = [ - { - text: 'Page 1', - path: '/page1', - }, - { - text: 'Page 2', - path: '/page2', - }, - ]; - - expect(useAppSearchBreadcrumbs(breadcrumbs)).toEqual([ - { - text: 'Enterprise Search', - href: '/app/elasticsearch/overview', - onClick: expect.any(Function), - }, - { - text: 'App Search', - href: '/app/enterprise_search/app_search/', - onClick: expect.any(Function), - }, - { - text: 'Page 1', - href: '/app/enterprise_search/app_search/page1', - onClick: expect.any(Function), - }, - { - text: 'Page 2', - }, - ]); - }); - - it('shows just the root if breadcrumbs is empty', () => { - expect(useAppSearchBreadcrumbs()).toEqual([ - { - text: 'Enterprise Search', - href: '/app/elasticsearch/overview', - onClick: expect.any(Function), - }, - { - text: 'App Search', - }, - ]); - }); -}); - -describe('useWorkplaceSearchBreadcrumbs', () => { - beforeEach(() => { - jest.clearAllMocks(); - mockHistory.createHref.mockImplementation( - ({ pathname }: any) => `/app/enterprise_search/workplace_search${pathname}` - ); - }); - - it('Builds a chain of breadcrumbs with Enterprise Search and Workplace Search at the root', () => { - const breadcrumbs = [ - { - text: 'Page 1', - path: '/page1', - }, - { - text: 'Page 2', - path: '/page2', - }, - ]; - - expect(useWorkplaceSearchBreadcrumbs(breadcrumbs)).toEqual([ - { - text: 'Enterprise Search', - href: '/app/elasticsearch/overview', - onClick: expect.any(Function), - }, - { - text: 'Workplace Search', - href: '/app/enterprise_search/workplace_search/', - onClick: expect.any(Function), - }, - { - text: 'Page 1', - href: '/app/enterprise_search/workplace_search/page1', - onClick: expect.any(Function), - }, - { - text: 'Page 2', - }, - ]); - }); - - it('shows just the root if breadcrumbs is empty', () => { - expect(useWorkplaceSearchBreadcrumbs()).toEqual([ - { - text: 'Enterprise Search', - href: '/app/elasticsearch/overview', - onClick: expect.any(Function), - }, - { - text: 'Workplace Search', - }, - ]); - }); -}); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.ts index 024a84858f108..a8765af733550 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_breadcrumbs.ts @@ -12,14 +12,12 @@ import { i18n } from '@kbn/i18n'; import { ANALYTICS_PLUGIN, - APP_SEARCH_PLUGIN, ENTERPRISE_SEARCH_CONTENT_PLUGIN, ENTERPRISE_SEARCH_PRODUCT_NAME, AI_SEARCH_PLUGIN, SEARCH_EXPERIENCES_PLUGIN, SEARCH_PRODUCT_NAME, VECTOR_SEARCH_PLUGIN, - WORKPLACE_SEARCH_PLUGIN, SEMANTIC_SEARCH_PLUGIN, APPLICATIONS_PLUGIN, GETTING_STARTED_TITLE, @@ -144,15 +142,6 @@ export const useElasticsearchBreadcrumbs = (breadcrumbs: Breadcrumbs = []) => ...breadcrumbs, ]); -export const useAppSearchBreadcrumbs = (breadcrumbs: Breadcrumbs = []) => - useEnterpriseSearchBreadcrumbs([{ text: APP_SEARCH_PLUGIN.NAME, path: '/' }, ...breadcrumbs]); - -export const useWorkplaceSearchBreadcrumbs = (breadcrumbs: Breadcrumbs = []) => - useEnterpriseSearchBreadcrumbs([ - { text: WORKPLACE_SEARCH_PLUGIN.NAME, path: '/' }, - ...breadcrumbs, - ]); - export const useEnterpriseSearchContentBreadcrumbs = (breadcrumbs: Breadcrumbs = []) => useSearchBreadcrumbs([ { text: ENTERPRISE_SEARCH_CONTENT_PLUGIN.NAV_TITLE, path: '/' }, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.test.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.test.ts index 5db04cc0a15c2..44e34e1f29241 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.test.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { generateTitle, searchTitle, appSearchTitle, workplaceSearchTitle } from './generate_title'; +import { generateTitle, searchTitle } from './generate_title'; describe('generateTitle', () => { it('creates a hyphen separated string from an array of page titles', () => { @@ -21,7 +21,7 @@ describe('searchTitle', () => { }); it('can be mixed and matched', () => { - const title = searchTitle([appSearchTitle(['Some Page'])]); + const title = searchTitle([generateTitle(['Some Page', 'App Search'])]); expect(title).toEqual('Some Page - App Search - Elasticsearch'); }); @@ -30,27 +30,3 @@ describe('searchTitle', () => { expect(title).toEqual('Elasticsearch'); }); }); - -describe('appSearchTitle', () => { - it('automatically appends the App Search product onto the pages array', () => { - const title = appSearchTitle(['Engines']); - expect(title).toEqual('Engines - App Search'); - }); - - it('falls back to product name', () => { - const title = appSearchTitle(); - expect(title).toEqual('App Search'); - }); -}); - -describe('workplaceSearchTitle', () => { - it('automatically appends the Workplace Search product onto the pages array', () => { - const title = workplaceSearchTitle(['Sources']); - expect(title).toEqual('Sources - Workplace Search'); - }); - - it('falls back to product name', () => { - const title = workplaceSearchTitle(); - expect(title).toEqual('Workplace Search'); - }); -}); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.ts index df7d16cddc4d4..42bc9be087bd2 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/generate_title.ts @@ -10,13 +10,11 @@ import { i18n } from '@kbn/i18n'; import { AI_SEARCH_PLUGIN, ANALYTICS_PLUGIN, - APP_SEARCH_PLUGIN, ENTERPRISE_SEARCH_CONTENT_PLUGIN, SEARCH_EXPERIENCES_PLUGIN, SEARCH_PRODUCT_NAME, SEMANTIC_SEARCH_PLUGIN, VECTOR_SEARCH_PLUGIN, - WORKPLACE_SEARCH_PLUGIN, } from '../../../../common/constants'; /** @@ -49,12 +47,6 @@ export const elasticsearchTitle = (page: Title = []) => }), ]); -export const appSearchTitle = (page: Title = []) => - generateTitle([...page, APP_SEARCH_PLUGIN.NAME]); - -export const workplaceSearchTitle = (page: Title = []) => - generateTitle([...page, WORKPLACE_SEARCH_PLUGIN.NAME]); - export const searchExperiencesTitle = (page: Title = []) => generateTitle([...page, SEARCH_EXPERIENCES_PLUGIN.NAME]); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/index.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/index.ts index 2da72eb28b6e9..a77acdbba6177 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/index.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/index.ts @@ -11,8 +11,6 @@ export { SetEnterpriseSearchContentChrome, SetElasticsearchChrome, SetAiSearchChrome, - SetAppSearchChrome, - SetWorkplaceSearchChrome, SetSearchExperiencesChrome, SetEnterpriseSearchApplicationsChrome, SetSemanticSearchChrome, diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.test.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.test.tsx index 9fd2799c81330..264b7bd24b7e4 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.test.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.test.tsx @@ -16,28 +16,17 @@ import { shallow } from 'enzyme'; jest.mock('./generate_breadcrumbs', () => ({ useGenerateBreadcrumbs: jest.requireActual('./generate_breadcrumbs').useGenerateBreadcrumbs, useSearchBreadcrumbs: jest.fn(() => (crumbs: any) => crumbs), - useAppSearchBreadcrumbs: jest.fn(() => (crumbs: any) => crumbs), - useWorkplaceSearchBreadcrumbs: jest.fn(() => (crumbs: any) => crumbs), })); -import { - useSearchBreadcrumbs, - useAppSearchBreadcrumbs, - useWorkplaceSearchBreadcrumbs, -} from './generate_breadcrumbs'; +import { useSearchBreadcrumbs } from './generate_breadcrumbs'; jest.mock('./generate_title', () => ({ searchTitle: jest.fn((title: any) => title), - appSearchTitle: jest.fn((title: any) => title), - workplaceSearchTitle: jest.fn((title: any) => title), })); -import { searchTitle, appSearchTitle, workplaceSearchTitle } from './generate_title'; +import { searchTitle } from './generate_title'; -import { SetSearchChrome, SetAppSearchChrome, SetWorkplaceSearchChrome } from '.'; +import { SetSearchChrome } from '.'; describe('Set Kibana Chrome helpers', () => { - const mockCurrentPath = (pathname: string) => - setMockValues({ history: { location: { pathname } } }); - beforeEach(() => { jest.clearAllMocks(); setMockValues({ history: mockHistory }); @@ -68,52 +57,4 @@ describe('Set Kibana Chrome helpers', () => { expect(useSearchBreadcrumbs).toHaveBeenCalledWith([]); }); }); - - describe('SetAppSearchChrome', () => { - it('sets breadcrumbs and document title', () => { - mockCurrentPath('/engines/{name}/curations'); - shallow(); - - expect(appSearchTitle).toHaveBeenCalledWith(['Curations', 'Some Engine', 'Engines']); - expect(useAppSearchBreadcrumbs).toHaveBeenCalledWith([ - { text: 'Engines', path: '/engines' }, - { text: 'Some Engine', path: '/engines/{name}' }, - { text: 'Curations', path: '/engines/{name}/curations' }, - ]); - }); - - it('handles empty trails as a root-level page', () => { - shallow(); - - expect(appSearchTitle).toHaveBeenCalledWith([]); - expect(useAppSearchBreadcrumbs).toHaveBeenCalledWith([]); - }); - }); - - describe('SetWorkplaceSearchChrome', () => { - it('sets breadcrumbs and document title', () => { - mockCurrentPath('/groups/{id}/source_prioritization'); - shallow( - - ); - - expect(workplaceSearchTitle).toHaveBeenCalledWith([ - 'Source Prioritization', - 'Some Group', - 'Groups', - ]); - expect(useWorkplaceSearchBreadcrumbs).toHaveBeenCalledWith([ - { text: 'Groups', path: '/groups' }, - { text: 'Some Group', path: '/groups/{id}' }, - { text: 'Source Prioritization', path: '/groups/{id}/source_prioritization' }, - ]); - }); - - it('handles empty trails as a root-level page', () => { - shallow(); - - expect(workplaceSearchTitle).toHaveBeenCalledWith([]); - expect(useWorkplaceSearchBreadcrumbs).toHaveBeenCalledWith([]); - }); - }); }); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.tsx b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.tsx index c556213ec8b42..34664d16503d0 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.tsx +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/kibana_chrome/set_chrome.tsx @@ -20,8 +20,6 @@ import { useEnterpriseSearchContentBreadcrumbs, useAiSearchBreadcrumbs, useElasticsearchBreadcrumbs, - useAppSearchBreadcrumbs, - useWorkplaceSearchBreadcrumbs, BreadcrumbTrail, useSearchExperiencesBreadcrumbs, useVectorSearchBreadcrumbs, @@ -30,7 +28,6 @@ import { import { aiSearchTitle, analyticsTitle, - appSearchTitle, elasticsearchTitle, enterpriseSearchContentTitle, generateTitle, @@ -39,7 +36,6 @@ import { searchTitle, semanticSearchTitle, vectorSearchTitle, - workplaceSearchTitle, } from './generate_title'; /** @@ -112,23 +108,6 @@ export const SetElasticsearchChrome: React.FC = ({ trail = [] }) return null; }; -export const SetAppSearchChrome: React.FC = ({ trail = [] }) => { - const { setBreadcrumbs, setDocTitle } = useValues(KibanaLogic); - - const title = reverseArray(trail); - const docTitle = appSearchTitle(title); - - const crumbs = useGenerateBreadcrumbs(trail); - const breadcrumbs = useAppSearchBreadcrumbs(crumbs); - - useEffect(() => { - setBreadcrumbs(breadcrumbs); - setDocTitle(docTitle); - }, [trail]); - - return null; -}; - export const SetAiSearchChrome: React.FC = ({ trail = [] }) => { const { setBreadcrumbs, setDocTitle } = useValues(KibanaLogic); @@ -146,23 +125,6 @@ export const SetAiSearchChrome: React.FC = ({ trail = [] }) => { return null; }; -export const SetWorkplaceSearchChrome: React.FC = ({ trail = [] }) => { - const { setBreadcrumbs, setDocTitle } = useValues(KibanaLogic); - - const title = reverseArray(trail); - const docTitle = workplaceSearchTitle(title); - - const crumbs = useGenerateBreadcrumbs(trail); - const breadcrumbs = useWorkplaceSearchBreadcrumbs(crumbs); - - useEffect(() => { - setBreadcrumbs(breadcrumbs); - setDocTitle(docTitle); - }, [trail]); - - return null; -}; - export const SetEnterpriseSearchContentChrome: React.FC = ({ trail = [] }) => { const { setBreadcrumbs, setDocTitle } = useValues(KibanaLogic); diff --git a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/types.ts b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/types.ts index 83148acd05cc6..5f6e893b750ba 100644 --- a/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/types.ts +++ b/x-pack/solutions/search/plugins/enterprise_search/public/applications/shared/types.ts @@ -7,8 +7,6 @@ import type { AppDeepLinkId, EuiSideNavItemTypeEnhanced } from '@kbn/core-chrome-browser'; -import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../../../common/constants'; - import { ADD, UPDATE } from './constants/operations'; export type TOperation = typeof ADD | typeof UPDATE; @@ -40,8 +38,6 @@ export interface RoleMapping { }; } -export type ProductName = typeof APP_SEARCH_PLUGIN.NAME | typeof WORKPLACE_SEARCH_PLUGIN.NAME; - export interface Invitation { email: string; code: string;