Skip to content

Commit

Permalink
[Search] remove app search guided onboarding (elastic#206670)
Browse files Browse the repository at this point in the history
## Summary

Removing references to the appSearch guided onboarding guide. App Search
is removed in v9.

### Checklist

- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
TattdCodeMonkey and elasticmachine authored Jan 24, 2025
1 parent c6f7416 commit 2812f8b
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ interface MainProps {
}

const exampleGuideIds: GuideId[] = [
'appSearch',
'websiteSearch',
'databaseSearch',
'siem',
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,6 @@ export const guideCards: GuideCardConstants[] = [
telemetryId: 'onboarding--search--ai',
order: 7,
},
{
solution: 'search',
icon: 'wrench',
title: (
<FormattedMessage
id="guidedOnboardingPackage.gettingStarted.cards.appSearch.title"
defaultMessage="Build an application on {lineBreak} top of Elasticsearch"
values={{
lineBreak: <br />,
}}
/>
),
guideId: 'appSearch',
telemetryId: 'onboarding--search--application',
order: 10,
},
{
solution: 'search',
icon: 'search',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,6 @@ export const guideCards: GuideCardConstants[] = [
telemetryId: 'onboarding--search--ai',
order: 7,
},
{
solution: 'search',
icon: 'wrench',
title: (
<FormattedMessage
id="guidedOnboardingPackage.gettingStarted.cards.appSearch.title"
defaultMessage="Build an application on {lineBreak} top of Elasticsearch"
values={{
lineBreak: <br />,
}}
/>
),
guideId: 'appSearch',
telemetryId: 'onboarding--search--application',
order: 10,
},
{
solution: 'search',
icon: 'search',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export type GuideId =
| 'kubernetes'
| 'siem'
| 'appSearch'
| 'websiteSearch'
| 'databaseSearch'
| 'testGuide';
export type GuideId = 'kubernetes' | 'siem' | 'websiteSearch' | 'databaseSearch' | 'testGuide';

type KubernetesStepIds = 'add_data' | 'view_dashboard' | 'tour_observability';
type SiemStepIds = 'add_data' | 'rules' | 'alertsCases';
Expand Down
2 changes: 1 addition & 1 deletion src/platform/plugins/shared/guided_onboarding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ The value of the parameter `indexID` needs to be passed to the API service when
## Guides config
To use the API service, you need to know a guide ID (currently one of `appSearch`, `websiteSearch`, `databaseSearch`, `kubernetes`, `siem`) and a step ID (for example, `add_data`, `search_experience`, `rules` etc). The consumers of guided onboarding register their guide configs themselves and have therefore full control over the guide ID and step IDs used for their guide. For more details on registering a guide config, see below.
To use the API service, you need to know a guide ID (currently one of `websiteSearch`, `databaseSearch`, `kubernetes`, `siem`) and a step ID (for example, `add_data`, `search_experience`, `rules` etc). The consumers of guided onboarding register their guide configs themselves and have therefore full control over the guide ID and step IDs used for their guide. For more details on registering a guide config, see below.
## Server side: register a guide config
Expand Down
2 changes: 1 addition & 1 deletion test/api_integration/apis/guided_onboarding/get_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function testGetGuideConfig({ getService }: FtrProviderContext) {

describe(`GET ${getConfigsPath}`, () => {
// check that production guides are present
['siem', 'appSearch', 'websiteSearch', 'databaseSearch', 'kubernetes'].map((guideId) => {
['siem', 'websiteSearch', 'databaseSearch', 'kubernetes'].map((guideId) => {
it(`returns config for ${guideId}`, async () => {
const response = await supertest
.get(`${getConfigsPath}/${guideId}`)
Expand Down
6 changes: 3 additions & 3 deletions test/api_integration/apis/guided_onboarding/get_guides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
guideStateSavedObjectsType,
pluginStateSavedObjectsType,
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
import { appSearchGuideId } from '@kbn/enterprise-search-plugin/common/guided_onboarding/search_guide_config';
import { websiteSearchGuideId } from '@kbn/enterprise-search-plugin/common/guided_onboarding/search_guide_config';
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
import type { FtrProviderContext } from '../../ftr_provider_context';
Expand Down Expand Up @@ -44,7 +44,7 @@ export default function testGetGuidesState({ getService }: FtrProviderContext) {
it('returns all created guides (active and inactive)', async () => {
await createGuides(kibanaServer, [
testGuideStep1ActiveState,
{ ...testGuideStep1ActiveState, guideId: appSearchGuideId },
{ ...testGuideStep1ActiveState, guideId: websiteSearchGuideId },
]);
const response = await supertest
.get(getGuidesPath)
Expand All @@ -53,7 +53,7 @@ export default function testGetGuidesState({ getService }: FtrProviderContext) {
expect(response.body).not.to.be.empty();
expect(response.body.state).to.eql([
testGuideStep1ActiveState,
{ ...testGuideStep1ActiveState, guideId: appSearchGuideId },
{ ...testGuideStep1ActiveState, guideId: websiteSearchGuideId },
]);
});
});
Expand Down
6 changes: 3 additions & 3 deletions test/api_integration/apis/guided_onboarding/put_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
guideStateSavedObjectsType,
} from '@kbn/guided-onboarding-plugin/server/saved_objects/guided_setup';
import { testGuideId } from '@kbn/guided-onboarding';
import { appSearchGuideId } from '@kbn/enterprise-search-plugin/common/guided_onboarding/search_guide_config';
import { websiteSearchGuideId } from '@kbn/enterprise-search-plugin/common/guided_onboarding/search_guide_config';
import { API_BASE_PATH } from '@kbn/guided-onboarding-plugin/common';
import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common';
import type { FtrProviderContext } from '../../ftr_provider_context';
Expand Down Expand Up @@ -137,7 +137,7 @@ export default function testPutState({ getService }: FtrProviderContext) {
// create an active guide and an inactive guide
await createGuides(kibanaServer, [
testGuideStep1ActiveState,
{ ...testGuideNotActiveState, guideId: appSearchGuideId },
{ ...testGuideNotActiveState, guideId: websiteSearchGuideId },
]);

// Create a new guide with isActive: true
Expand All @@ -162,7 +162,7 @@ export default function testPutState({ getService }: FtrProviderContext) {

const searchGuideSO = await kibanaServer.savedObjects.get({
type: guideStateSavedObjectsType,
id: appSearchGuideId,
id: websiteSearchGuideId,
});
expect(searchGuideSO.attributes.isActive).to.eql(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3811,7 +3811,6 @@
"guidedOnboarding.quitGuideModal.quitButtonLabel": "Quitter le guide",
"guidedOnboardingPackage.gettingStarted.cards.aiSearch.title": "Développer une expérience de recherche optimisée par l'IA",
"guidedOnboardingPackage.gettingStarted.cards.apmObservability.title": "Surveiller les performances {lineBreak} de mon application (APM / traçage)",
"guidedOnboardingPackage.gettingStarted.cards.appSearch.title": "Développer une application {lineBreak} au-dessus d'Elasticsearch",
"guidedOnboardingPackage.gettingStarted.cards.cloudSecurity.title": "Sécuriser mes ressources cloud {lineBreak} grâce à la gestion du niveau de sécurité du cloud (CSPM)",
"guidedOnboardingPackage.gettingStarted.cards.completeLabel": "Guide terminé",
"guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title": "Rechercher dans les bases de données {lineBreak} et les systèmes d'entreprise",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3806,7 +3806,6 @@
"guidedOnboarding.quitGuideModal.quitButtonLabel": "ガイドを終了",
"guidedOnboardingPackage.gettingStarted.cards.aiSearch.title": "AIを活用した検索エクスペリエンスの構築",
"guidedOnboardingPackage.gettingStarted.cards.apmObservability.title": "アプリケーション{lineBreak}パフォーマンスを監視(APM / トレース)",
"guidedOnboardingPackage.gettingStarted.cards.appSearch.title": "Elasticsearchの上に{lineBreak}アプリケーションを構築",
"guidedOnboardingPackage.gettingStarted.cards.cloudSecurity.title": "クラウドセキュリティ態勢管理(CSPM)でクラウド{lineBreak}資産を保護",
"guidedOnboardingPackage.gettingStarted.cards.completeLabel": "ガイド完了",
"guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title": "データベースと{lineBreak}ビジネスシステムで検索",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3786,7 +3786,6 @@
"guidedOnboarding.quitGuideModal.quitButtonLabel": "退出指南",
"guidedOnboardingPackage.gettingStarted.cards.aiSearch.title": "构建 AI 驱动式搜索体验",
"guidedOnboardingPackage.gettingStarted.cards.apmObservability.title": "监测我的应用程序{lineBreak}性能(APM/跟踪)",
"guidedOnboardingPackage.gettingStarted.cards.appSearch.title": "在 Elasticsearch 之上{lineBreak}构建应用程序",
"guidedOnboardingPackage.gettingStarted.cards.cloudSecurity.title": "借助云{lineBreak}安全态势管理 (CSPM) 保护我的云资产",
"guidedOnboardingPackage.gettingStarted.cards.completeLabel": "指南完成",
"guidedOnboardingPackage.gettingStarted.cards.databaseSearch.title": "跨数据库和{lineBreak}业务系统进行搜索",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,15 @@
import type { GuideConfig, StepConfig } from '@kbn/guided-onboarding';
import { i18n } from '@kbn/i18n';

export const appSearchGuideId = 'appSearch';
export const websiteSearchGuideId = 'websiteSearch';
export const databaseSearchGuideId = 'databaseSearch';

const apiRoutes = {
[appSearchGuideId]: '/search_indices/new_index/api',
[databaseSearchGuideId]: '/connectors/select_connector',
[websiteSearchGuideId]: '/crawlers',
};

export type EnterpriseSearchGuideIds =
| typeof appSearchGuideId
| typeof websiteSearchGuideId
| typeof databaseSearchGuideId;
export type EnterpriseSearchGuideIds = typeof websiteSearchGuideId | typeof databaseSearchGuideId;

const getAddDataStep: (method?: EnterpriseSearchGuideIds) => StepConfig = (method) => {
return {
Expand Down Expand Up @@ -88,8 +83,6 @@ const getGuideConfig: (telemetryId: EnterpriseSearchGuideIds) => GuideConfig = (
};
};

export const appSearchGuideConfig: GuideConfig = getGuideConfig(appSearchGuideId);

export const websiteSearchGuideConfig: GuideConfig = getGuideConfig(websiteSearchGuideId);

export const databaseSearchGuideConfig: GuideConfig = getGuideConfig(databaseSearchGuideId);
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ export const SearchIndex: React.FC = () => {
updateSideNavDefinition,
} = useValues(KibanaLogic);

useEffect(() => {
const subscription = guidedOnboarding?.guidedOnboardingApi
?.isGuideStepActive$('appSearch', 'add_data')
.subscribe((isStepActive) => {
if (isStepActive && index?.count) {
guidedOnboarding?.guidedOnboardingApi?.completeGuideStep('appSearch', 'add_data');
}
});
return () => subscription?.unsubscribe();
}, [guidedOnboarding, index?.count]);

useEffect(() => {
const subscription = guidedOnboarding?.guidedOnboardingApi
?.isGuideStepActive$('websiteSearch', 'add_data')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ import {
} from '../common/constants';

import {
appSearchGuideId,
websiteSearchGuideId,
databaseSearchGuideId,
appSearchGuideConfig,
websiteSearchGuideConfig,
databaseSearchGuideConfig,
} from '../common/guided_onboarding/search_guide_config';
Expand Down Expand Up @@ -359,7 +357,6 @@ export class EnterpriseSearchPlugin implements Plugin<void, void, PluginsSetup,
/**
* Register a config for the search guide
*/
guidedOnboarding?.registerGuideConfig(appSearchGuideId, appSearchGuideConfig);
if (config.hasWebCrawler) {
guidedOnboarding?.registerGuideConfig(websiteSearchGuideId, websiteSearchGuideConfig);
}
Expand Down

0 comments on commit 2812f8b

Please sign in to comment.