[Guided onboarding] Registers 3 separate guide IDs for search (#149968)

## Summary
Fixes https://github.com/elastic/kibana/issues/149691 
Follow up to https://github.com/elastic/kibana/pull/149528 

This PR adds 3 separate guide ID values `appSearch`, `websiteSearch` and
`databaseSearch` instead of previously used `search`. With that change,
each card for Search on the landing page has its own independent guide
that can be completed.

Example plugin for guided onboarding is also updated so that all 3
search guides can be managed there. Otherwise there should not be any
UI/UX changes.

Currently, all 3 ids are registered with the same config and that can be
easily updated by the team in the future.

#### Screenshot
<img width="485" alt="Screenshot 2023-01-31 at 18 24 12"
src="https://user-images.githubusercontent.com/6585477/215840343-f9a65be3-0568-40ca-b458-5de92bfe8aaf.png">


### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Yulia Čech 2023-02-06 14:16:26 +01:00 committed by GitHub
parent af3ae7b555
commit 8705a6a77b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 76 additions and 26 deletions

View file

@ -25,6 +25,7 @@ import {
EuiText,
EuiTitle,
EuiSelectOption,
EuiFlexGrid,
} from '@elastic/eui';
import type { GuideState, GuideStepIds, GuideId, GuideStep } from '@kbn/guided-onboarding';
import type { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public';
@ -34,7 +35,14 @@ interface MainProps {
notifications: CoreStart['notifications'];
}
const exampleGuideIds: GuideId[] = ['search', 'siem', 'kubernetes', 'testGuide'];
const exampleGuideIds: GuideId[] = [
'appSearch',
'websiteSearch',
'databaseSearch',
'siem',
'kubernetes',
'testGuide',
];
const selectOptions: EuiSelectOption[] = exampleGuideIds.map((guideId) => ({
value: guideId,
text: guideId,
@ -211,7 +219,7 @@ export const Main = (props: MainProps) => {
</h3>
</EuiText>
<EuiSpacer />
<EuiFlexGroup>
<EuiFlexGrid columns={3}>
{exampleGuideIds.map((guideId) => {
const guideState = guidesState?.find((guide) => guide.guideId === guideId);
return (
@ -255,7 +263,7 @@ export const Main = (props: MainProps) => {
</EuiFlexItem>
);
})}
</EuiFlexGroup>
</EuiFlexGrid>
<EuiSpacer />
<EuiHorizontalRule />
<EuiText>