-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution] Set onboarding page to open "add integration" step when being used as an empty prompt #175296
Conversation
…174867) ## Summary #174742 This PR move the get_started component from `security_solution_serverless` plugin to `security_solution` plugin, so we can share the same UI between ESS and serverless. Parameters are set via `x-pack/plugins/security_solution/public/contract_get_started_page.ts` 1. productTypes - set by serverless only 2. projectsUrl - set by serverless only (when running serverless locally, this value is empty) 3. projectFeaturesUrl - set by serverless only (when running serverless locally, this value is empty) 4. availableSteps - set by both serverless and ESS (ESS doesn't contain `create your first project` step) Known issue: #175296 --- #### Serverless: 6 steps in total + the first step is finished by default ![serverless](https://github.com/elastic/kibana/assets/6295984/8bbf6557-8c8e-42c6-843b-fc24ac1dd178) #### ESS: 5 steps in total ![Screenshot 2024-01-24 at 20 04 19](https://github.com/elastic/kibana/assets/6295984/6486916a-9976-4fb5-bf07-721ba4d411aa) ### 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 <[email protected]>
1bcdf85
to
dec4be8
Compare
buildkite test this |
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore) |
const OnBoarding = useMemo(() => getOnboardingComponent(), []); | ||
return <OnBoarding indicesExist={indicesExist} defaultExpandedStep={defaultExpandedStep} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this getOnboardingComponent
function now that we have the component? Couldn't we just return the lazy component itself from the index.tsx and render it directly here? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right @semd , we don't need this anymore. I've removed it in https://github.com/elastic/kibana/pull/175719/files#diff-10832002bc5dfd1354f367e187c839c6e69e7155931e0bf2ab2db4e1fb6afba4
Reopened as I think we still need this before the design of new empty prompt is ready. |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @angorayc |
…lastic#174867) ## Summary elastic#174742 This PR move the get_started component from `security_solution_serverless` plugin to `security_solution` plugin, so we can share the same UI between ESS and serverless. Parameters are set via `x-pack/plugins/security_solution/public/contract_get_started_page.ts` 1. productTypes - set by serverless only 2. projectsUrl - set by serverless only (when running serverless locally, this value is empty) 3. projectFeaturesUrl - set by serverless only (when running serverless locally, this value is empty) 4. availableSteps - set by both serverless and ESS (ESS doesn't contain `create your first project` step) Known issue: elastic#175296 --- #### Serverless: 6 steps in total + the first step is finished by default ![serverless](https://github.com/elastic/kibana/assets/6295984/8bbf6557-8c8e-42c6-843b-fc24ac1dd178) #### ESS: 5 steps in total ![Screenshot 2024-01-24 at 20 04 19](https://github.com/elastic/kibana/assets/6295984/6486916a-9976-4fb5-bf07-721ba4d411aa) ### 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 <[email protected]>
Summary
Since this PR #174867, we've been sharing the onboarding page between serverless and ESS Kibana.
However when the onboarding component being used as an empty prompt, it still expands the step according to local storage. This user experience is not great, so I am adding
defaultExpandedStep
prop to the onboarding component, so it can expand the specified step by default. By doing this, we can expandAddIntegrationSteps
when it is rendered as an empty prompt.Screen.Recording.2024-01-23.at.20.20.40.mov
Add
defaultExpandedStep
prop, so it can expand the specific step.Scenario 1. Used as empty prompt
It should be redirected to the onboarding page and expand the
defaultExpandedStep
(It should beAddIntegrationSteps
expanded by default when being used as an empty prompt).Scenario 2. Landing on the
Landing page
e.g.: /app/security/get_startedIt should expand the last visited step according to local storage. If never visited before, all the steps are collapsed.
Scenario 3. Landing on the
Landing page
with hash e.g.: /app/security/get_started#add_integrationsIt should expand the step specified in the hash
Checklist
Delete any items that are not applicable to this PR.