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] Fix rule snooze description on the rule editing page #155850

Merged
merged 5 commits into from
May 5, 2023

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Apr 26, 2023

Addresses: #147737
Relates to: #155612

Summary

After merging #155612 back there is one issue is left unresolved described in this comment:

Looks like we show the Actions will not be preformed until it is unsnoozed message unconditionally, i.e. regardless of whether the rule is snoozed or not. Since it's in bold it feels like a warning in the case where it doesn't really matter:

Can we hide it when the rule is not snoozed? If it's not trivial, can we make it look less dangerous by making the font regular and playing with the copy a little bit? E.g. If snoozed actions will not be triggered.

This PR resolves rule snooze description text issue. As snooze settings are resolved outside the security solution plugin having any logic to conditionally display a message will increase the complexity. This way the message was changes to avoid any text to appear conditionally.

Before:

Screenshot 2023-04-24 at 18 36 31

After:

image

Checklist

@maximpn maximpn added enhancement New value added to drive a business result release_note:skip Skip the PR/issue when compiling release notes Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team v8.8.0 labels Apr 26, 2023
@maximpn maximpn self-assigned this Apr 26, 2023
@@ -29,17 +33,27 @@ export const NO_ACTIONS_READ_PERMISSIONS = i18n.translate(
}
);

export const RULE_SNOOZE_DESCRIPTION = i18n.translate(
'xpack.securitySolution.detectionEngine.createRule.stepRuleActions.snoozeDescription',
const ruleSnoozeDocsLink = `${
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not 100% sure the link is the right one though I wasn't able to find any rule snooze related docs.

@nastasha-solomon should I use another link here?

Copy link
Contributor

@nastasha-solomon nastasha-solomon May 3, 2023

Choose a reason for hiding this comment

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

The anchor for this is snooze-rules-ui. I'm adding docs for this feature here.

Copy link
Contributor

@nastasha-solomon nastasha-solomon May 4, 2023

Choose a reason for hiding this comment

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

Morning/afternoon! Scratch what I said yesterday. If this doc link is appearing at the end of this message, you can use these existing docs for editing rule settings. The anchor for this section is edit-rules-settings.

@banderror banderror added bug Fixes for quality problems that affect the customer experience and removed enhancement New value added to drive a business result labels Apr 26, 2023
@maximpn
Copy link
Contributor Author

maximpn commented Apr 26, 2023

@elasticmachine merge upstream

@nastasha-solomon nastasha-solomon added the ui-copy Review of UI copy with docs team is recommended label Apr 26, 2023
export const RULE_SNOOZE_DESCRIPTION = (
<FormattedMessage
id="xpack.securitySolution.detectionEngine.createRule.stepRuleActions.snoozeDescription"
defaultMessage="Select when automated actions should be performed. If a rule is snoozed actions will not be performed. Learn more about actions in our {docs}."
Copy link
Contributor

@nastasha-solomon nastasha-solomon May 3, 2023

Choose a reason for hiding this comment

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

Hey, @maximpn! I Just want to verify that the second sentence will appear on a new line, and to the right of the snooze button (similar to what's shown in the original design). Putting it directly after the instruction to choose when actions are performed is a little confusing and contradictory. Putting it next to the snooze button helps form the relationship between the button and the informational text.

For the informational text about the snooze feature, would something like the following work:
Notifications are snoozed for X days. Turn snoozing off to begin sending notifications again. Learn more

Another option:
Notifications are snoozed for X days. They will resume when you unsnooze actions. Learn more

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @nastasha-solomon!

This PR simplifies the approach and just displays the static text on the top.

The problem the text on the right like Notifications are snoozed for X days is managed outside of Security Solution plugin so adding something extra text requires checking if a rule is snoozed. Having it will increase overall complexity which we wanna avoid.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the additional context, @maximpn. I wasn't aware of that limitation but knowing it now, it makes sense why the new UI copy was added under the section title. Here's a few new options for you to choose from:

Option 1: Choose when to perform actions or snooze them. Notifications are not created for snoozed actions. Learn more

Option 2: Select when automated actions should be performed or snooze actions. Learn more

I prefer the first one because I think it flows better and is more descriptive, but the second one works if you can't alter the first part of the sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated the text with Option 1.

@@ -29,17 +33,27 @@ export const NO_ACTIONS_READ_PERMISSIONS = i18n.translate(
}
);

export const RULE_SNOOZE_DESCRIPTION = i18n.translate(
'xpack.securitySolution.detectionEngine.createRule.stepRuleActions.snoozeDescription',
const ruleSnoozeDocsLink = `${
Copy link
Contributor

@nastasha-solomon nastasha-solomon May 3, 2023

Choose a reason for hiding this comment

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

The anchor for this is snooze-rules-ui. I'm adding docs for this feature here.

@maximpn maximpn force-pushed the rule-snoozing-editing-page-fixes branch from 06e0cf0 to 313e7e2 Compare May 4, 2023 13:43
@maximpn maximpn marked this pull request as ready for review May 4, 2023 13:43
@maximpn maximpn requested review from a team as code owners May 4, 2023 13:43
@maximpn maximpn requested a review from banderror May 4, 2023 13:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

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

@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
lists 157.5KB 157.5KB +52.0B
securitySolution 9.1MB 9.1MB -38.0B
total +14.0B

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.3KB 363.4KB +52.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 398 401 +3
total +5

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 478 481 +3
total +5

History

  • 💛 Build #123431 was flaky 06e0cf0f9ae04e79b9d7d5b82b918869cf6c2269
  • 💔 Build #123396 failed 2ac7a0cb4db7aea990a457d559f92ab0b9c2969e

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

cc @maximpn

Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

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

Great, thank you @maximpn!
I checked the diff but didn't test it.

@maximpn maximpn merged commit 6714d92 into elastic:main May 5, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 5, 2023
…age (elastic#155850)

**Addresses:** elastic#147737
**Relates to:** elastic#155612

## Summary

After merging elastic#155612 back there is one issue is left unresolved described in this [comment](elastic#155612 (comment)):

> Looks like we show the `Actions will not be preformed until it is unsnoozed` message unconditionally, i.e. regardless of whether the rule is snoozed or not. Since it's in bold it feels like a warning in the case where it doesn't really matter:

> Can we hide it when the rule is not snoozed? If it's not trivial, can we make it look less dangerous by making the font regular and playing with the copy a little bit? E.g. `If snoozed actions will not be triggered`.

This PR resolves rule snooze description text issue. As snooze settings are resolved outside the security solution plugin having any logic to conditionally display a message will increase the complexity. This way the message was changes to avoid any text to appear conditionally.

*Before:*

<img width="703" alt="Screenshot 2023-04-24 at 18 36 31" src="https://user-images.githubusercontent.com/7359339/234060523-fe9161a1-0e83-4d39-a193-81c946d95106.png">

*After:*

![image](https://user-images.githubusercontent.com/3775283/236254424-533a6502-49ba-444e-87e5-9cda7e84c315.png)

### Checklist

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

(cherry picked from commit 6714d92)
@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

maximpn added a commit to maximpn/kibana that referenced this pull request May 5, 2023
…age (elastic#155850)

**Addresses:** elastic#147737
**Relates to:** elastic#155612

## Summary

After merging elastic#155612 back there is one issue is left unresolved described in this [comment](elastic#155612 (comment)):

> Looks like we show the `Actions will not be preformed until it is unsnoozed` message unconditionally, i.e. regardless of whether the rule is snoozed or not. Since it's in bold it feels like a warning in the case where it doesn't really matter:

> Can we hide it when the rule is not snoozed? If it's not trivial, can we make it look less dangerous by making the font regular and playing with the copy a little bit? E.g. `If snoozed actions will not be triggered`.

This PR resolves rule snooze description text issue. As snooze settings are resolved outside the security solution plugin having any logic to conditionally display a message will increase the complexity. This way the message was changes to avoid any text to appear conditionally.

*Before:*

<img width="703" alt="Screenshot 2023-04-24 at 18 36 31" src="https://user-images.githubusercontent.com/7359339/234060523-fe9161a1-0e83-4d39-a193-81c946d95106.png">

*After:*

![image](https://user-images.githubusercontent.com/3775283/236254424-533a6502-49ba-444e-87e5-9cda7e84c315.png)

### Checklist

- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

(cherry picked from commit 6714d92)
@maximpn maximpn deleted the rule-snoozing-editing-page-fixes branch May 5, 2023 16:32
kibanamachine added a commit that referenced this pull request May 5, 2023
…ting page (#155850) (#156888)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Security Solution] Fix rule snooze description on the rule editing
page (#155850)](#155850)

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

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

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-05-05T16:14:41Z","message":"[Security
Solution] Fix rule snooze description on the rule editing page
(#155850)\n\n**Addresses:**
https://github.com/elastic/kibana/issues/147737\r\n**Relates to:**
https://github.com/elastic/kibana/pull/155612\r\n\r\n##
Summary\r\n\r\nAfter merging
#155612 back there is one issue is
left unresolved described in this
[comment](https://github.com/elastic/kibana/pull/155612#discussion_r1175545697):\r\n\r\n>
Looks like we show the `Actions will not be preformed until it is
unsnoozed` message unconditionally, i.e. regardless of whether the rule
is snoozed or not. Since it's in bold it feels like a warning in the
case where it doesn't really matter:\r\n\r\n> Can we hide it when the
rule is not snoozed? If it's not trivial, can we make it look less
dangerous by making the font regular and playing with the copy a little
bit? E.g. `If snoozed actions will not be triggered`.\r\n\r\nThis PR
resolves rule snooze description text issue. As snooze settings are
resolved outside the security solution plugin having any logic to
conditionally display a message will increase the complexity. This way
the message was changes to avoid any text to appear
conditionally.\r\n\r\n*Before:*\r\n\r\n<img width=\"703\"
alt=\"Screenshot 2023-04-24 at 18 36 31\"
src=\"https://user-images.githubusercontent.com/7359339/234060523-fe9161a1-0e83-4d39-a193-81c946d95106.png\">\r\n\r\n*After:*\r\n\r\n![image](https://user-images.githubusercontent.com/3775283/236254424-533a6502-49ba-444e-87e5-9cda7e84c315.png)\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)","sha":"6714d926ee041d61c627037189263905918303b3","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection
Rules","ui-copy","v8.8.0","v8.9.0"],"number":155850,"url":"https://github.com/elastic/kibana/pull/155850","mergeCommit":{"message":"[Security
Solution] Fix rule snooze description on the rule editing page
(#155850)\n\n**Addresses:**
https://github.com/elastic/kibana/issues/147737\r\n**Relates to:**
https://github.com/elastic/kibana/pull/155612\r\n\r\n##
Summary\r\n\r\nAfter merging
#155612 back there is one issue is
left unresolved described in this
[comment](https://github.com/elastic/kibana/pull/155612#discussion_r1175545697):\r\n\r\n>
Looks like we show the `Actions will not be preformed until it is
unsnoozed` message unconditionally, i.e. regardless of whether the rule
is snoozed or not. Since it's in bold it feels like a warning in the
case where it doesn't really matter:\r\n\r\n> Can we hide it when the
rule is not snoozed? If it's not trivial, can we make it look less
dangerous by making the font regular and playing with the copy a little
bit? E.g. `If snoozed actions will not be triggered`.\r\n\r\nThis PR
resolves rule snooze description text issue. As snooze settings are
resolved outside the security solution plugin having any logic to
conditionally display a message will increase the complexity. This way
the message was changes to avoid any text to appear
conditionally.\r\n\r\n*Before:*\r\n\r\n<img width=\"703\"
alt=\"Screenshot 2023-04-24 at 18 36 31\"
src=\"https://user-images.githubusercontent.com/7359339/234060523-fe9161a1-0e83-4d39-a193-81c946d95106.png\">\r\n\r\n*After:*\r\n\r\n![image](https://user-images.githubusercontent.com/3775283/236254424-533a6502-49ba-444e-87e5-9cda7e84c315.png)\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)","sha":"6714d926ee041d61c627037189263905918303b3"}},"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/155850","number":155850,"mergeCommit":{"message":"[Security
Solution] Fix rule snooze description on the rule editing page
(#155850)\n\n**Addresses:**
https://github.com/elastic/kibana/issues/147737\r\n**Relates to:**
https://github.com/elastic/kibana/pull/155612\r\n\r\n##
Summary\r\n\r\nAfter merging
#155612 back there is one issue is
left unresolved described in this
[comment](https://github.com/elastic/kibana/pull/155612#discussion_r1175545697):\r\n\r\n>
Looks like we show the `Actions will not be preformed until it is
unsnoozed` message unconditionally, i.e. regardless of whether the rule
is snoozed or not. Since it's in bold it feels like a warning in the
case where it doesn't really matter:\r\n\r\n> Can we hide it when the
rule is not snoozed? If it's not trivial, can we make it look less
dangerous by making the font regular and playing with the copy a little
bit? E.g. `If snoozed actions will not be triggered`.\r\n\r\nThis PR
resolves rule snooze description text issue. As snooze settings are
resolved outside the security solution plugin having any logic to
conditionally display a message will increase the complexity. This way
the message was changes to avoid any text to appear
conditionally.\r\n\r\n*Before:*\r\n\r\n<img width=\"703\"
alt=\"Screenshot 2023-04-24 at 18 36 31\"
src=\"https://user-images.githubusercontent.com/7359339/234060523-fe9161a1-0e83-4d39-a193-81c946d95106.png\">\r\n\r\n*After:*\r\n\r\n![image](https://user-images.githubusercontent.com/3775283/236254424-533a6502-49ba-444e-87e5-9cda7e84c315.png)\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)","sha":"6714d926ee041d61c627037189263905918303b3"}}]}]
BACKPORT-->

Co-authored-by: Maxim Palenov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Rule Management Security Solution Detection Rule Management area release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. ui-copy Review of UI copy with docs team is recommended v8.8.0 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants