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][Alerts] resolves alerts suppression review feedback #155839

Merged
merged 25 commits into from
May 9, 2023

Conversation

vitaliidm
Copy link
Contributor

@vitaliidm vitaliidm commented Apr 26, 2023

Summary

Before

Screenshot 2023-04-24 at 19 44 33

After

Intended Fields

Screenshot 2023-05-05 at 10 42 46

Tooltip

Screenshot 2023-05-05 at 10 43 41

@vitaliidm vitaliidm added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Alerts Security Detection Alerts Area Team v8.8.0 labels Apr 26, 2023
@vitaliidm vitaliidm changed the title [Security Solution][Alerts] resolves suppression review feedback [Security Solution][Alerts] resolves alerts suppression review feedback Apr 26, 2023
@vitaliidm
Copy link
Contributor Author

@elasticmachine merge upstream

@vitaliidm vitaliidm added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels May 4, 2023
@vitaliidm vitaliidm requested a review from a team as a code owner May 5, 2023 09:47
@vitaliidm vitaliidm requested a review from spong May 5, 2023 09:47
@elasticmachine
Copy link
Contributor

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

@vitaliidm vitaliidm self-assigned this May 5, 2023
@vitaliidm vitaliidm requested a review from marshallmain May 5, 2023 09:47

return (
<EuiPopover button={button} isOpen={isPopoverOpen} closePopover={closePopover}>
<EuiText style={{ width: POPOVER_WIDTH }}>
Copy link
Member

Choose a reason for hiding this comment

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

nit: Text size feels a bit big in the popover at 16px IMO, especially since the regular text below is at 14px. To be honest though, we're not consistent here with our rich text 'tooltips', so could go either way here.

Suppression 16px
image

Execution Log 14px
image

Integrations 14px
image

Rule Monitoring 16px
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it makes sense to set text size to 14px in my case.
Thanks for the suggestion

Comment on lines 943 to 957
<IntendedRuleTypeEuiFormRow
$isVisible={isQueryRule(ruleType)}
data-test-subj="alertSuppressionMissingFields"
label={
<span>
{i18n.ALERT_SUPPRESSION_MISSING_FIELDS_FORM_ROW_LABEL} <SuppressionInfoIcon />
</span>
}
>
<UseMultiFields
fields={{
suppressionMissingFields: {
path: 'suppressionMissingFields',
},
}}
Copy link
Member

Choose a reason for hiding this comment

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

nit: might be nice to add a little extra width here to prevent text wrapping and save on vertical space

current:
image

w/ extra width so no line-wrap
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

like this idea!
Implemented

Comment on lines +906 to +908
<RuleTypeEuiFormRow
$isVisible={isQueryRule(ruleType)}
data-test-subj="alertSuppressionInput"
Copy link
Member

Choose a reason for hiding this comment

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

ux nit: May want to consider hiding the suppression configuration UI until a field is selected, as it's in a disabled state until the user selects a field, which adds extra information to an already well populated form

current:
image

hidden w/o selection:
image

visible w/ selection:
image


We do something similar w/ the expanded Severity/Risk Score override UI:

image image

Copy link
Contributor Author

@vitaliidm vitaliidm May 9, 2023

Choose a reason for hiding this comment

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

Thanks for suggestions with different approaches on UI.

We, actually, considered each of them + accordion, to wrap all suppression settings, on Advanced Correlation Workgroup meetings with Product and UI teams.
#150101 (comment)
#150101 (comment)

In the end, we decided to stick to current implementation: just intend suppression settings fields on rules form.

Comment on lines +132 to +135
const IntendedRuleTypeEuiFormRow = styled(RuleTypeEuiFormRow)`
${({ theme }) => `padding-left: ${theme.eui.euiSizeXL};`}
`;

Copy link
Member

Choose a reason for hiding this comment

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

I heard in passing that we're encouraged to use emotion over styled-components these days. I honestly prefer the style-components way you're using here by declaring a new semantic 'component', but figured I'd bring it up in case others know more or could point to relevant resources, as we currently have conflicting information in our dev docs here & 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.

tried first emotion, but it wasn't working. That's how I discovered issues and workaround related to CSS-in-JS, when it styled-components conflict with emotion, when speaking with eui team up.
I decided then to leave it as it was implemented, to not mix for one component both css-in-js and styled components

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

Checked out, tested locally, code reviewed, and LGTM! 👍 🚀 🙌

Left a few ux nits, but not required -- pick and choose as you and the design folks see fit. Thanks for these enhancements @vitaliidm, appreciate it! 🙂

@joepeeples
Copy link
Contributor

joepeeples commented May 5, 2023

@gchaps Thanks for pinging about this. Looks like that help message is actually already a popover component and not a tooltip, so the message will be "sticky" and the user should be able to easily click the "Learn more" link. I confirmed this with a local build, and also confirmed that the docs link points to the correct page/heading.

As for any revisions to popover text, I think we'll go with what we have. The first line does echo the option name/title a bit, but with a complex feature like this I'm OK with a little repetition for the sake of additional explanation.

Copy link
Contributor

@e40pud e40pud left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@dplumlee dplumlee left a comment

Choose a reason for hiding this comment

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

UI and review changes look good to me, make sure to update the i18n string in x-pack/plugins/security_solution/public/detections/components/rules/step_define_rule/schema.tsx before merging

vitaliidm and others added 2 commits May 9, 2023 09:06
…rules/step_define_rule/schema.tsx

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
@vitaliidm
Copy link
Contributor Author

@gchaps Thanks for pinging about this. Looks like that help message is actually already a popover component and not a tooltip, so the message will be "sticky" and the user should be able to easily click the "Learn more" link. I confirmed this with a local build, and also confirmed that the docs link points to the correct page/heading.

Yes, component is popover, that allows clicking on link documentation

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Security Solution Tests #3 / timeline flyout button the (+) button popover menu owns focus

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 3866 3867 +1

Async chunks

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

id before after diff
lists 157.7KB 157.8KB +84.0B
securitySolution 9.1MB 9.1MB +1.2KB
total +1.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 363.7KB 363.8KB +84.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 399 403 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 479 483 +4
total +6

History

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

cc @vitaliidm

@vitaliidm vitaliidm enabled auto-merge (squash) May 9, 2023 15:55
Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

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

doclink LGTM

@vitaliidm vitaliidm merged commit 31b6062 into elastic:main May 9, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2023
…ck (elastic#155839)

## Summary

- addresses review feedback on
elastic#155055
- addresses UI changes from
elastic#150101
  - removes accordion in favour of intended suppression components
  - adds popover with a link to documentation
  - changes wording
- addresses elastic#156247

### Before
<img width="1017" alt="Screenshot 2023-04-24 at 19 44 33"
src="https://user-images.githubusercontent.com/92328789/234824612-b0ed2870-8aa0-44af-a37d-c061358c54a3.png">

### After

#### Intended Fields
<img width="1016" alt="Screenshot 2023-05-05 at 10 42 46"
src="https://user-images.githubusercontent.com/92328789/236426053-279d2f5b-46ea-434b-9cfa-696c71321661.png">

#### Tooltip
<img width="1016" alt="Screenshot 2023-05-05 at 10 43 41"
src="https://user-images.githubusercontent.com/92328789/236426061-1c39a5c2-63ca-4a36-b15e-2a1c1943481d.png">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
(cherry picked from commit 31b6062)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 10, 2023
…feedback (#155839) (#157192)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Security Solution][Alerts] resolves alerts suppression review
feedback (#155839)](#155839)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Vitalii
Dmyterko","email":"92328789+vitaliidm@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-05-09T16:12:20Z","message":"[Security
Solution][Alerts] resolves alerts suppression review feedback
(#155839)\n\n## Summary\r\n\r\n- addresses review feedback
on\r\nhttps://github.com//pull/155055\r\n- addresses UI
changes from\r\nhttps://github.com//issues/150101\r\n -
removes accordion in favour of intended suppression components\r\n -
adds popover with a link to documentation\r\n - changes wording\r\n-
addresses https://github.com/elastic/kibana/issues/156247\r\n\r\n###
Before\r\n<img width=\"1017\" alt=\"Screenshot 2023-04-24 at 19 44
33\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/234824612-b0ed2870-8aa0-44af-a37d-c061358c54a3.png\">\r\n\r\n###
After\r\n\r\n#### Intended Fields\r\n<img width=\"1016\"
alt=\"Screenshot 2023-05-05 at 10 42
46\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/236426053-279d2f5b-46ea-434b-9cfa-696c71321661.png\">\r\n\r\n####
Tooltip\r\n<img width=\"1016\" alt=\"Screenshot 2023-05-05 at 10 43
41\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/236426061-1c39a5c2-63ca-4a36-b15e-2a1c1943481d.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Garrett Spong
<spong@users.noreply.github.com>","sha":"31b6062148b55f712015fc9061172eca54c0acd4","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:
SecuritySolution","Team:Detection
Alerts","backport:prev-minor","v8.8.0","v8.9.0"],"number":155839,"url":"https://github.com/elastic/kibana/pull/155839","mergeCommit":{"message":"[Security
Solution][Alerts] resolves alerts suppression review feedback
(#155839)\n\n## Summary\r\n\r\n- addresses review feedback
on\r\nhttps://github.com//pull/155055\r\n- addresses UI
changes from\r\nhttps://github.com//issues/150101\r\n -
removes accordion in favour of intended suppression components\r\n -
adds popover with a link to documentation\r\n - changes wording\r\n-
addresses https://github.com/elastic/kibana/issues/156247\r\n\r\n###
Before\r\n<img width=\"1017\" alt=\"Screenshot 2023-04-24 at 19 44
33\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/234824612-b0ed2870-8aa0-44af-a37d-c061358c54a3.png\">\r\n\r\n###
After\r\n\r\n#### Intended Fields\r\n<img width=\"1016\"
alt=\"Screenshot 2023-05-05 at 10 42
46\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/236426053-279d2f5b-46ea-434b-9cfa-696c71321661.png\">\r\n\r\n####
Tooltip\r\n<img width=\"1016\" alt=\"Screenshot 2023-05-05 at 10 43
41\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/236426061-1c39a5c2-63ca-4a36-b15e-2a1c1943481d.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Garrett Spong
<spong@users.noreply.github.com>","sha":"31b6062148b55f712015fc9061172eca54c0acd4"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155839","number":155839,"mergeCommit":{"message":"[Security
Solution][Alerts] resolves alerts suppression review feedback
(#155839)\n\n## Summary\r\n\r\n- addresses review feedback
on\r\nhttps://github.com//pull/155055\r\n- addresses UI
changes from\r\nhttps://github.com//issues/150101\r\n -
removes accordion in favour of intended suppression components\r\n -
adds popover with a link to documentation\r\n - changes wording\r\n-
addresses https://github.com/elastic/kibana/issues/156247\r\n\r\n###
Before\r\n<img width=\"1017\" alt=\"Screenshot 2023-04-24 at 19 44
33\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/234824612-b0ed2870-8aa0-44af-a37d-c061358c54a3.png\">\r\n\r\n###
After\r\n\r\n#### Intended Fields\r\n<img width=\"1016\"
alt=\"Screenshot 2023-05-05 at 10 42
46\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/236426053-279d2f5b-46ea-434b-9cfa-696c71321661.png\">\r\n\r\n####
Tooltip\r\n<img width=\"1016\" alt=\"Screenshot 2023-05-05 at 10 43
41\"\r\nsrc=\"https://user-images.githubusercontent.com/92328789/236426061-1c39a5c2-63ca-4a36-b15e-2a1c1943481d.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Garrett Spong
<spong@users.noreply.github.com>","sha":"31b6062148b55f712015fc9061172eca54c0acd4"}}]}]
BACKPORT-->

Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>
Co-authored-by: Pedro Jaramillo <pedro.jaramillo@elastic.co>
@vitaliidm vitaliidm deleted the alerts_8_8/suppression-feedback branch March 4, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Detection Alerts Security Detection Alerts Area Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants