Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Search][Homepage] Remove usage #194870

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,5 @@ xpack.searchInferenceEndpoints.ui.enabled: false
# Search Notebooks
xpack.search.notebooks.catalog.url: https://elastic-enterprise-search.s3.us-east-2.amazonaws.com/serverless/catalog.json

# Search Homepage
xpack.search.homepage.ui.enabled: true

# Semantic text UI
xpack.index_management.dev.enableSemanticText: false
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
// 'xpack.reporting.poll.jobsRefresh.intervalErrorMultiplier (number)',
'xpack.rollup.ui.enabled (boolean?)',
'xpack.saved_object_tagging.cache_refresh_interval (duration?)',
'xpack.search.homepage.ui.enabled (boolean?)',
'xpack.searchInferenceEndpoints.ui.enabled (boolean?)',
'xpack.searchPlayground.ui.enabled (boolean?)',
'xpack.security.loginAssistanceMessage (string?)',
Expand Down
13 changes: 4 additions & 9 deletions x-pack/plugins/enterprise_search/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,15 @@
"id": "enterpriseSearch",
"server": true,
"browser": true,
"configPath": [
"enterpriseSearch"
],
"configPath": ["enterpriseSearch"],
"requiredPlugins": [
"data",
"features",
"licensing",
"logsShared",
"logsDataAccess",
"esUiShared",
"navigation",
"navigation"
],
"optionalPlugins": [
"customIntegrations",
Expand All @@ -31,18 +29,15 @@
"guidedOnboarding",
"console",
"searchConnectors",
"searchHomepage",
"searchPlayground",
"searchInferenceEndpoints",
"embeddable",
"discover",
"charts",
"cloud",
"lens",
"share",
"share"
],
"requiredBundles": [
"kibanaReact"
]
"requiredBundles": ["kibanaReact"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export const mockKibanaValues = {
history: mockHistory,
indexMappingComponent: null,
isCloud: false,
isSearchHomepageEnabled: false,
isSidebarEnabled: true,
lens: {
EmbeddableComponent: jest.fn(),
Expand All @@ -65,7 +64,6 @@ export const mockKibanaValues = {
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
searchHomepage: null,
searchInferenceEndpoints: null,
searchPlayground: searchPlaygroundMock.createStart(),
security: securityMock.createStart(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export const renderApp = (
guidedOnboarding,
history,
indexMappingComponent,
isSearchHomepageEnabled: plugins.searchHomepage?.isHomepageFeatureEnabled() ?? false,
isSidebarEnabled,
lens,
ml,
Expand All @@ -128,7 +127,6 @@ export const renderApp = (
params.setHeaderActionMenu(
HeaderActions ? renderHeaderActions.bind(null, HeaderActions, store, params) : undefined
),
searchHomepage: plugins.searchHomepage,
searchPlayground: plugins.searchPlayground,
searchInferenceEndpoints: plugins.searchInferenceEndpoints,
security,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { LensPublicStart } from '@kbn/lens-plugin/public';
import { MlPluginStart } from '@kbn/ml-plugin/public';
import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants';
import { ConnectorDefinition } from '@kbn/search-connectors-plugin/public';
import type { SearchHomepagePluginStart } from '@kbn/search-homepage/public';
import { SearchInferenceEndpointsPluginStart } from '@kbn/search-inference-endpoints/public';
import { SearchPlaygroundPluginStart } from '@kbn/search-playground/public';
import { AuthenticatedUser, SecurityPluginStart } from '@kbn/security-plugin/public';
Expand Down Expand Up @@ -59,15 +58,13 @@ export interface KibanaLogicProps {
guidedOnboarding?: GuidedOnboardingPluginStart;
history: ScopedHistory;
indexMappingComponent?: React.FC<IndexMappingProps>;
isSearchHomepageEnabled: boolean;
isSidebarEnabled: boolean;
lens?: LensPublicStart;
ml?: MlPluginStart;
navigateToUrl: RequiredFieldsOnly<ApplicationStart['navigateToUrl']>;
productAccess: ProductAccess;
productFeatures: ProductFeatures;
renderHeaderActions(HeaderActions?: FC): void;
searchHomepage?: SearchHomepagePluginStart;
searchInferenceEndpoints?: SearchInferenceEndpointsPluginStart;
searchPlayground?: SearchPlaygroundPluginStart;
security?: SecurityPluginStart;
Expand All @@ -94,15 +91,13 @@ export interface KibanaValues {
history: ScopedHistory;
indexMappingComponent: React.FC<IndexMappingProps> | null;
isCloud: boolean;
isSearchHomepageEnabled: boolean;
isSidebarEnabled: boolean;
lens: LensPublicStart | null;
ml: MlPluginStart | null;
navigateToUrl(path: string, options?: CreateHrefOptions): Promise<void>;
productAccess: ProductAccess;
productFeatures: ProductFeatures;
renderHeaderActions(HeaderActions?: FC): void;
searchHomepage: SearchHomepagePluginStart | null;
searchInferenceEndpoints: SearchInferenceEndpointsPluginStart | null;
searchPlayground: SearchPlaygroundPluginStart | null;
security: SecurityPluginStart | null;
Expand Down Expand Up @@ -134,7 +129,6 @@ export const KibanaLogic = kea<MakeLogicType<KibanaValues>>({
guidedOnboarding: [props.guidedOnboarding || null, {}],
history: [props.history, {}],
indexMappingComponent: [props.indexMappingComponent || null, {}],
isSearchHomepageEnabled: [props.isSearchHomepageEnabled, {}],
isSidebarEnabled: [props.isSidebarEnabled, {}],
lens: [props.lens || null, {}],
ml: [props.ml || null, {}],
Expand All @@ -149,7 +143,6 @@ export const KibanaLogic = kea<MakeLogicType<KibanaValues>>({
productAccess: [props.productAccess, {}],
productFeatures: [props.productFeatures, {}],
renderHeaderActions: [props.renderHeaderActions, {}],
searchHomepage: [props.searchHomepage || null, {}],
searchInferenceEndpoints: [props.searchInferenceEndpoints || null, {}],
searchPlayground: [props.searchPlayground || null, {}],
security: [props.security || null, {}],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ import { generateNavLink } from './nav_link_helpers';
* @returns The Enterprise Search navigation items
*/
export const useEnterpriseSearchNav = (alwaysReturn = false) => {
const { isSearchHomepageEnabled, searchHomepage, isSidebarEnabled, productAccess } =
useValues(KibanaLogic);
const { isSidebarEnabled, productAccess } = useValues(KibanaLogic);

const { hasEnterpriseLicense } = useValues(LicensingLogic);

Expand All @@ -74,10 +73,7 @@ export const useEnterpriseSearchNav = (alwaysReturn = false) => {
...generateNavLink({
shouldNotCreateHref: true,
shouldShowActiveForSubroutes: true,
to:
isSearchHomepageEnabled && searchHomepage
? searchHomepage.app.appRoute
: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
to: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.URL,
}),
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export const mockKibanaProps: KibanaLogicProps = {
indexMappingComponent: () => {
return <></>;
},
isSearchHomepageEnabled: false,
isSidebarEnabled: true,
lens: {
EmbeddableComponent: jest.fn(),
Expand All @@ -86,7 +85,6 @@ export const mockKibanaProps: KibanaLogicProps = {
hasWebCrawler: true,
},
renderHeaderActions: jest.fn(),
searchHomepage: undefined,
searchPlayground: searchPlaygroundMock.createStart(),
security: securityMock.createStart(),
setBreadcrumbs: jest.fn(),
Expand Down
6 changes: 2 additions & 4 deletions x-pack/plugins/enterprise_search/public/navigation_tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,12 @@ const euiItemTypeToNodeDefinition = ({

export const getNavigationTreeDefinition = ({
dynamicItems$,
isSearchHomepageEnabled,
}: {
dynamicItems$: Observable<DynamicSideNavItems>;
isSearchHomepageEnabled: boolean;
}): AddSolutionNavigationArg => {
return {
dataTestSubj: 'searchSideNav',
homePage: isSearchHomepageEnabled ? 'searchHomepage' : 'enterpriseSearch',
homePage: 'enterpriseSearch',
icon,
id: 'es',
navigationTree$: dynamicItems$.pipe(
Expand All @@ -88,7 +86,7 @@ export const getNavigationTreeDefinition = ({
breadcrumbStatus: 'hidden',
children: [
{
link: isSearchHomepageEnabled ? 'searchHomepage' : 'enterpriseSearch',
link: 'enterpriseSearch',
},
{
getIsActive: ({ pathNameSerialized, prepend }) => {
Expand Down
Loading