-
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][Endpoint][Guided onboarding] New extension point with the endpoint UI #142395
[Security Solution][Endpoint][Guided onboarding] New extension point with the endpoint UI #142395
Conversation
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
@elasticmachine merge upstream |
…n-point-with-the-endpoint-ui
Pinging @elastic/fleet (Team:Fleet) |
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.
This is looking great! 🔥 Left some questions/suggestions, let me know if anything is not clear or needs more explanation. Happy to discuss about those 🙂
Read more about Endpoint security configuration in our {docsPage}." | ||
values={{ | ||
docsPage: ( | ||
<EuiLink href="https://www.elastic.co/guide/en/security/master/configure-endpoint-integration-policy.html"> |
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 have to use kibana docs service here. This will show the link with the stack version. You can check how it works here . You will also have to update kibana docs types to add the new one if it doesn't exists yet.
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.
/** The integration policy being created */ | ||
newPolicy: NewPackagePolicy; | ||
} | ||
export type PackagePolicyCreateMultiStepExtensionComponent = ComponentType<{}>; |
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.
I would not remove these props as could be used in the future (or might be used for other integrations) when we add any kind of integration modification action.
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.
As we discussed, I'd leave them removed to avoid unneeded complexity, and put them back when they are really needed.
); | ||
|
||
const LargeSecurityLogo = () => ( | ||
<EuiIcon type="logoSecurity" style={{ width: '128px', height: '128px' }} /> |
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.
suggestion: create a styled component instead so we don't have inline css styles defined.
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.
memo<PackagePolicyCreateMultiStepExtensionComponentProps>(({ newPolicy }) => { | ||
return <></>; | ||
}); | ||
export const EndpointPolicyCreateMultiStepExtension = memo(() => { |
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.
Can you move the final component at the end so we see first all the defined consts and finally the component that uses those?
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.
Also, for functions that returns a component or JSX code I think it would be better to define those inside the component so all are rendered on component render and not on module import level. What do you think?
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.
Can you move the final component at the end so we see first all the defined consts and finally the component that uses those?
Personally I like it better when the higher level components/functions are on the top of the file, so when one opens it, they can see the high level logic first, and if they want to see the details, they can go down in the file. But I see that your suggestion is the general style in our codebase, so of course! It's better to have an aligned code style.
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.
Also, for functions that returns a component or JSX code I think it would be better to define those inside the component so all are rendered on component render and not on module import level. What do you think?
Great idea! Usually I'd keep small components out of the main component, so the functional components are not re-created on every re-render, but in this case with a static component, I agree that favouring a faster module load is probably better.
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.
EndpointPolicyCreateMultiStepExtension.displayName = 'EndpointPolicyCreateMultiStepExtension'; | ||
|
||
const Container = styled('div')` |
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.
Can we avoid this using an EUI component with some spacing? It seems too much specific
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.
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.
This is looking good, but I belive we can simplifiy the code further if we use CSS padding and margins instead of using EuiSpacer
.
const LargeCustomSpacer = () => ( | ||
<> | ||
<EuiSpacer size="m" /> | ||
<EuiSpacer size="xxl" /> | ||
</> | ||
); | ||
|
||
const MediumCustomSpacer = () => ( | ||
<> | ||
<EuiSpacer size="m" /> | ||
<EuiSpacer size="xl" /> | ||
</> | ||
); |
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.
Please merge these two separate components into a single one called CustomSpacer
that takes sizes as an array and then spits out EuiSpacers
based on that. Then you can just use something like <CustomSpacer spacers={['m', 'xxl']} />
or <CustomSpacer spacers={['m', 'xl']} />
where needed.
EndpointPolicyCreateMultiStepExtension.displayName = 'EndpointPolicyCreateMultiStepExtension'; | ||
|
||
const Container = styled('div')` | ||
padding: 0 23px; |
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.
Yeah, why is this exact padding needed instead of using the Eui token values for padding? Also looks like either the Container
should have padding that is equal to the LargeCustomSpacer
instead of the custom spacer. Also, the EuiFlexGroup
on line 23 should have a margin that is equal to MediumCustomSpacer
instead.
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.
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.
Looks great! Left two more suggestions but this is ready 🔥 Thanks for applying all the changes!
`; | ||
|
||
const LargeLogo = styled(EuiIcon)` | ||
width: 128px; |
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.
Can we use any UI token here too?
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.
Read more about Endpoint security configuration in our {docsPage}." | ||
values={{ | ||
docsPage: ( | ||
<EuiLink href={docLinks.links.securitySolution.configureEndpointIntegrationPolicy}> |
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.
Wondering if we should open the link in a new tab:
<EuiLink href={docLinks.links.securitySolution.configureEndpointIntegrationPolicy} target="_blank" external> [...] </EuiLink>
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.
Yes, let's open on a new tab so that it doesn't take the user from the onboarding flow
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.
@elasticmachine merge upstream |
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.
🔥 🔥 🔥
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.
Looking good to 🚢
margin-bottom: ${marginSize}; | ||
margin-top: ${marginSize}; |
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.
Should be padding
and not margin
. Conceptually, you're padding out the content so that there's spacing around it.
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.
Cool, thanks! It also makes things easier, that's for sure.
50d0017
margin-top: ${marginSize}; | ||
`} | ||
> | ||
<CenteredEuiFlexItem grow={false}>{securityLogo}</CenteredEuiFlexItem> |
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.
I don't think you need this additional center alignment. You can just use the EuiFlexItem
.
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.
For the given design, you are right! The center alignment helps with the mobile view.
<p> | ||
<FormattedMessage | ||
id="xpack.securitySolution.endpoint.policy.multiStepOnboarding.details" | ||
defaultMessage="You can change this later by editing the Endpoint Security integration agent policy. |
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.
This is Janeen. Edit to @kellyemurphy 's suggestion because we updated the name to Elastic Defend
in 8.5
.
defaultMessage="You can change this later by editing the Endpoint Security integration agent policy. | |
defaultMessage="You can edit these settings later in the Elastic Defend integration policy. |
<FormattedMessage | ||
id="xpack.securitySolution.endpoint.policy.multiStepOnboarding.details" | ||
defaultMessage="You can change this later by editing the Endpoint Security integration agent policy. | ||
Read more about Endpoint security configuration in our {docsPage}." |
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.
We can shorten this entire sentence to just "Learn more" that links to that doc page and a jumpout icon.
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.
Added a comment for language. @joepeeples can you make sure we don't need to edit language anywhere else in this PR? Thanks!
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.
doclink is good.
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.
One small nit about "macOS" vs. "Mac", otherwise LGTM!
<p> | ||
<FormattedMessage | ||
id="xpack.securitySolution.endpoint.policy.multiStepOnboarding.feature" | ||
defaultMessage="Windows, Mac, and Linux event collection" |
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.
Nit: "macOS" (capitalized as such) is the proper name of the operating system, and Apple usually uses "Mac" to refer to a piece of hardware
defaultMessage="Windows, Mac, and Linux event collection" | |
defaultMessage="Windows, macOS, and Linux event collection" |
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.
Great catch!
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.
The UI copy looks good to me, once the other reviewers' comments have been included. Only other thing I would suggest considering is to make the header "Set up an Elastic Defend integration" (the current version doesn't have an "an"). Not crucial but I think it would be slightly more accurate.
@kellyemurphy @jmikell821 @joepeeples |
@elasticmachine merge upstream |
…n-point-with-the-endpoint-ui
I agree, the heading needs an article. I might lean toward "Set up the Elastic Defend integration", but "an" probably works too. |
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
@joepeeples @benironside Would there ever be more than one? If it's singular, then "the" makes sense. If there could be multiple, then "an" is ok. |
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.
Fleet changes looks good to me
@kellyemurphy I merge the current modification, because modifying the title is rather related to the overall onboarding flow, than the UI in this issue. Do you have an Epic/workflow to discuss the title change? In case not, please let me know if you would like me to create an issue for that change. |
…with the endpoint UI (elastic#142395) * Add new UI for extension for onboarding * Remove unnecessary props * Improve layout for mobile browsers * use Kibana Docs service for documentation url * use styled components instead of inline style * move small components above/in the main component * use Eui components and tokens instead of custom ones * use Eui sizing tokens for logo size * open documentation link on new tab * use padding instead of margin * update texts * [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs' Co-authored-by: Kibana Machine <[email protected]>
…with the endpoint UI (elastic#142395) * Add new UI for extension for onboarding * Remove unnecessary props * Improve layout for mobile browsers * use Kibana Docs service for documentation url * use styled components instead of inline style * move small components above/in the main component * use Eui components and tokens instead of custom ones * use Eui sizing tokens for logo size * open documentation link on new tab * use padding instead of margin * update texts * [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs' Co-authored-by: Kibana Machine <[email protected]>
Summary
Added new UI for onboarding users through setting up Elastic Defend.
Screenshots:
Checklist
Delete any items that are not applicable to this PR.