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

[Security Solution] Set onboarding page to open "add integration" step when being used as an empty prompt #175296

Closed
wants to merge 3 commits into from

Conversation

angorayc
Copy link
Contributor

@angorayc angorayc commented Jan 23, 2024

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 expand AddIntegrationSteps 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 be AddIntegrationSteps expanded by default when being used as an empty prompt).

Scenario 2. Landing on the Landing page e.g.: /app/security/get_started

It 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_integrations

It should expand the step specified in the hash

Checklist

Delete any items that are not applicable to this PR.

@angorayc angorayc changed the title Empty prompt Update empty prompt to be redirected to add integration step Jan 23, 2024
angorayc added a commit that referenced this pull request Jan 24, 2024
…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]>
@angorayc angorayc changed the title Update empty prompt to be redirected to add integration step [Security Solution] Set onboarding page to open "add integration" step when being used as an empty prompt Jan 25, 2024
@angorayc angorayc self-assigned this Jan 25, 2024
@angorayc angorayc added Team:Threat Hunting Security Solution Threat Hunting Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore v8.13.0 labels Jan 25, 2024
@angorayc
Copy link
Contributor Author

buildkite test this

@angorayc angorayc marked this pull request as ready for review January 25, 2024 15:49
@angorayc angorayc requested review from a team as code owners January 25, 2024 15:49
@angorayc angorayc requested a review from machadoum January 25, 2024 15:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-explore (Team:Threat Hunting:Explore)

@angorayc angorayc added release_note:skip Skip the PR/issue when compiling release notes needs_docs labels Jan 25, 2024
Comment on lines +16 to +17
const OnBoarding = useMemo(() => getOnboardingComponent(), []);
return <OnBoarding indicesExist={indicesExist} defaultExpandedStep={defaultExpandedStep} />;
Copy link
Contributor

@semd semd Jan 25, 2024

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? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angorayc angorayc closed this Jan 26, 2024
@angorayc angorayc reopened this Jan 30, 2024
@angorayc
Copy link
Contributor Author

angorayc commented Jan 30, 2024

Reopened as I think we still need this before the design of new empty prompt is ready.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.2MB 11.2MB +1.1KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @angorayc

@angorayc angorayc closed this Feb 1, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_docs release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Threat Hunting:Explore Team:Threat Hunting Security Solution Threat Hunting Team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants