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 error messages on Rule Details page taking too much space #157271

Merged
merged 2 commits into from May 18, 2023

Conversation

nikitaindik
Copy link
Contributor

@nikitaindik nikitaindik commented May 10, 2023

Fixes: #149468

Summary

When a large "last execution" error message is displayed on Rule Details page it takes too much vertical space:

https://user-images.githubusercontent.com/2946766/214444343-dde0d9cd-6bc7-4aca-a6cf-07891d206888.png

This PR changes the error callout component. Error text is now displayed using EUI's TextBlock component. Users will see a scroll if error text takes too much vertical space. Now it's also possible to view the text fullscreen or copy it to clipboard.

Screenshot 2023-05-10 at 16 16 40

Another addition is a button to expand a row in the Execution Log to view / copy a full error message.
Screenshot 2023-05-10 at 16 15 16

Checklist

For maintainers

Known issue: Copy button is not shown in Execution Log expandable row in Safari. Opened an issue in EUI: elastic/eui#6770

@nikitaindik nikitaindik changed the title Scrollable callout [Security Solution] Fix error messages on Rule Details page taking too much space May 10, 2023
@nikitaindik nikitaindik self-assigned this May 10, 2023
@nikitaindik nikitaindik added bug Fixes for quality problems that affect the customer experience release_note:fix Team:Detections and Resp Security Detection Response Team Feature:Rule Monitoring Security Solution Detection Rule Monitoring Team:Security Solution Platform Security Solution Platform Team Team:Detection Rule Management Security Detection Rule Management Team Feature:Rule Details Security Solution Detection Rule Details v8.8.0 v8.7.2 labels May 10, 2023
@nikitaindik nikitaindik force-pushed the scrollable-callout branch 2 times, most recently from 96e3d33 to 5519c8f Compare May 10, 2023 14:50
@nikitaindik nikitaindik marked this pull request as ready for review May 10, 2023 14:51
@nikitaindik nikitaindik requested a review from a team as a code owner May 10, 2023 14:51
@nikitaindik nikitaindik requested a review from jpdjere May 10, 2023 14:51
@elasticmachine
Copy link
Contributor

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

@nikitaindik nikitaindik requested review from xcrzx and removed request for jpdjere May 10, 2023 14:51
@nikitaindik nikitaindik added backport:prev-minor Backport to the previous minor version (i.e. one version back from main) v8.9.0 and removed v8.8.0 v8.7.2 labels May 10, 2023
Copy link
Contributor

@xcrzx xcrzx left a comment

Choose a reason for hiding this comment

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

Verified the fix locally; everything works as expected. Thank you, @nikitaindik 🙏

I left a minor comment on function naming, but other than that, the code changes look good.

@nikitaindik nikitaindik marked this pull request as draft May 18, 2023 11:55
@nikitaindik nikitaindik marked this pull request as ready for review May 18, 2023 11:59
@nikitaindik nikitaindik enabled auto-merge (squash) May 18, 2023 12:00
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

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 9.2MB 9.2MB +1.8KB
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 400 404 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 480 484 +4
total +6

History

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

cc @nikitaindik

@nikitaindik nikitaindik merged commit f214b55 into elastic:main May 18, 2023
19 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 18, 2023
…o much space (elastic#157271)

## Summary

When a large "last execution" error message is displayed on Rule Details
page it takes too much vertical space:

https://user-images.githubusercontent.com/2946766/214444343-dde0d9cd-6bc7-4aca-a6cf-07891d206888.png

This PR changes the error callout component. Error text is now displayed
using EUI's TextBlock component. Users will see a scroll if error text
takes too much vertical space. Now it's also possible to view the text
fullscreen or copy it to clipboard.

<img width="1206" alt="Screenshot 2023-05-10 at 16 16 40"
src="https://github.com/elastic/kibana/assets/15949146/bca81852-afa0-44f6-acad-51c7c60c8a6f">

  ---

Another addition is a button to expand a row in the Execution Log to
view / copy a full error message.
<img width="1179" alt="Screenshot 2023-05-10 at 16 15 16"
src="https://github.com/elastic/kibana/assets/15949146/624e3fdc-8dd7-4fa1-a8a6-b1608be17eec">

### 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)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

**Known issue**: Copy button is not shown in Execution Log expandable
row in Safari. Opened an issue in EUI:
elastic/eui#6770

(cherry picked from commit f214b55)
@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 18, 2023
…ing too much space (#157271) (#158079)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Security Solution] Fix error messages on Rule Details page taking
too much space (#157271)](#157271)

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

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

<!--BACKPORT [{"author":{"name":"Nikita
Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2023-05-18T13:38:03Z","message":"[Security
Solution] Fix error messages on Rule Details page taking too much space
(#157271)\n\n## Summary\r\n\r\nWhen a large \"last execution\" error
message is displayed on Rule Details\r\npage it takes too much vertical
space:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/2946766/214444343-dde0d9cd-6bc7-4aca-a6cf-07891d206888.png\r\n\r\nThis
PR changes the error callout component. Error text is now
displayed\r\nusing EUI's TextBlock component. Users will see a scroll if
error text\r\ntakes too much vertical space. Now it's also possible to
view the text\r\nfullscreen or copy it to clipboard.\r\n\r\n<img
width=\"1206\" alt=\"Screenshot 2023-05-10 at 16 16
40\"\r\nsrc=\"https://github.com/elastic/kibana/assets/15949146/bca81852-afa0-44f6-acad-51c7c60c8a6f\">\r\n\r\n
---\r\n\r\nAnother addition is a button to expand a row in the Execution
Log to\r\nview / copy a full error message.\r\n<img width=\"1179\"
alt=\"Screenshot 2023-05-10 at 16 15
16\"\r\nsrc=\"https://github.com/elastic/kibana/assets/15949146/624e3fdc-8dd7-4fa1-a8a6-b1608be17eec\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[x] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [x] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n\r\n**Known
issue**: Copy button is not shown in Execution Log expandable\r\nrow in
Safari. Opened an issue in
EUI:\r\nhttps://github.com/elastic/eui/issues/6770","sha":"f214b55704dd9c300be845530de956a27fd12bab","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Detections
and Resp","Feature:Rule Monitoring","Team:Security Solution
Platform","Team:Detection Rule Management","Feature:Rule
Details","backport:prev-minor","v8.9.0"],"number":157271,"url":"#157271
Solution] Fix error messages on Rule Details page taking too much space
(#157271)\n\n## Summary\r\n\r\nWhen a large \"last execution\" error
message is displayed on Rule Details\r\npage it takes too much vertical
space:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/2946766/214444343-dde0d9cd-6bc7-4aca-a6cf-07891d206888.png\r\n\r\nThis
PR changes the error callout component. Error text is now
displayed\r\nusing EUI's TextBlock component. Users will see a scroll if
error text\r\ntakes too much vertical space. Now it's also possible to
view the text\r\nfullscreen or copy it to clipboard.\r\n\r\n<img
width=\"1206\" alt=\"Screenshot 2023-05-10 at 16 16
40\"\r\nsrc=\"https://github.com/elastic/kibana/assets/15949146/bca81852-afa0-44f6-acad-51c7c60c8a6f\">\r\n\r\n
---\r\n\r\nAnother addition is a button to expand a row in the Execution
Log to\r\nview / copy a full error message.\r\n<img width=\"1179\"
alt=\"Screenshot 2023-05-10 at 16 15
16\"\r\nsrc=\"https://github.com/elastic/kibana/assets/15949146/624e3fdc-8dd7-4fa1-a8a6-b1608be17eec\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[x] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [x] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n\r\n**Known
issue**: Copy button is not shown in Execution Log expandable\r\nrow in
Safari. Opened an issue in
EUI:\r\nhttps://github.com/elastic/eui/issues/6770","sha":"f214b55704dd9c300be845530de956a27fd12bab"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"#157271
Solution] Fix error messages on Rule Details page taking too much space
(#157271)\n\n## Summary\r\n\r\nWhen a large \"last execution\" error
message is displayed on Rule Details\r\npage it takes too much vertical
space:\r\n\r\n\r\nhttps://user-images.githubusercontent.com/2946766/214444343-dde0d9cd-6bc7-4aca-a6cf-07891d206888.png\r\n\r\nThis
PR changes the error callout component. Error text is now
displayed\r\nusing EUI's TextBlock component. Users will see a scroll if
error text\r\ntakes too much vertical space. Now it's also possible to
view the text\r\nfullscreen or copy it to clipboard.\r\n\r\n<img
width=\"1206\" alt=\"Screenshot 2023-05-10 at 16 16
40\"\r\nsrc=\"https://github.com/elastic/kibana/assets/15949146/bca81852-afa0-44f6-acad-51c7c60c8a6f\">\r\n\r\n
---\r\n\r\nAnother addition is a button to expand a row in the Execution
Log to\r\nview / copy a full error message.\r\n<img width=\"1179\"
alt=\"Screenshot 2023-05-10 at 16 15
16\"\r\nsrc=\"https://github.com/elastic/kibana/assets/15949146/624e3fdc-8dd7-4fa1-a8a6-b1608be17eec\">\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [x] Any UI
touched in this PR is usable by keyboard only (learn more\r\nabout
[keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n-
[x] Any UI touched in this PR does not create any new axe
failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[x] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[x] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
For maintainers\r\n\r\n- [x] This was checked for breaking API changes
and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n\r\n**Known
issue**: Copy button is not shown in Execution Log expandable\r\nrow in
Safari. Opened an issue in
EUI:\r\nhttps://github.com/elastic/eui/issues/6770","sha":"f214b55704dd9c300be845530de956a27fd12bab"}}]}]
BACKPORT-->

Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
@banderror banderror added v8.8.1 and removed v8.8.0 labels May 20, 2023
delanni pushed a commit to delanni/kibana that referenced this pull request May 25, 2023
…o much space (elastic#157271)

## Summary

When a large "last execution" error message is displayed on Rule Details
page it takes too much vertical space:


https://user-images.githubusercontent.com/2946766/214444343-dde0d9cd-6bc7-4aca-a6cf-07891d206888.png

This PR changes the error callout component. Error text is now displayed
using EUI's TextBlock component. Users will see a scroll if error text
takes too much vertical space. Now it's also possible to view the text
fullscreen or copy it to clipboard.

<img width="1206" alt="Screenshot 2023-05-10 at 16 16 40"
src="https://github.com/elastic/kibana/assets/15949146/bca81852-afa0-44f6-acad-51c7c60c8a6f">

  ---

Another addition is a button to expand a row in the Execution Log to
view / copy a full error message.
<img width="1179" alt="Screenshot 2023-05-10 at 16 15 16"
src="https://github.com/elastic/kibana/assets/15949146/624e3fdc-8dd7-4fa1-a8a6-b1608be17eec">



### 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)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)


**Known issue**: Copy button is not shown in Execution Log expandable
row in Safari. Opened an issue in EUI:
elastic/eui#6770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience Feature:Rule Details Security Solution Detection Rule Details Feature:Rule Monitoring Security Solution Detection Rule Monitoring release_note:fix Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team:Security Solution Platform Security Solution Platform Team v8.8.1 v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution] Rule Details error callout is not truncated
6 participants