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

[ResponseOps][Alerts] Don't show empty state in grouping component while first loading #195777

Merged

Conversation

umbopepato
Copy link
Member

@umbopepato umbopepato commented Oct 10, 2024

Summary

Makes the loading state and empty state mutually exclusive in the grouping component to avoid showing the empty state when first loading the groups data.

To verify

  1. Create one or more O11y rules that fire alerts
  2. Open the O11y > Alerts page
  3. Toggle on grouping
  4. Reload the page (possibly after activating network throttling)
  5. Verify that while the loading indicator is shown, the empty state is not and viceversa

References

Fixes #190954

@umbopepato umbopepato added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development labels Oct 10, 2024
@umbopepato umbopepato requested a review from a team as a code owner October 10, 2024 13:59
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Copy link
Member

Choose a reason for hiding this comment

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

Could you please add a unit test for the new behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

I took the occasion and also updated the whole test file to screen._ queries 🙂

Copy link
Member

@maryam-saeidi maryam-saeidi left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Copy link
Contributor

@adcoelho adcoelho left a comment

Choose a reason for hiding this comment

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

Tested and works as expected 👍

@elasticmachine
Copy link
Contributor

💚 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
cloudSecurityPosture 507.8KB 507.8KB -1.0B
observability 467.5KB 467.5KB -1.0B
securitySolution 20.8MB 20.8MB -1.0B
total -3.0B

History

@umbopepato umbopepato merged commit 45a9cf0 into elastic:main Oct 14, 2024
28 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.15, 8.x

https://github.com/elastic/kibana/actions/runs/11326038498

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 14, 2024
…ile first loading (elastic#195777)

## Summary

Makes the loading state and empty state mutually exclusive in the
grouping component to avoid showing the empty state when first loading
the groups data.

## To verify

1. Create one or more O11y rules that fire alerts
2. Open the O11y > Alerts page
3. Toggle on grouping
4. Reload the page (possibly after activating network throttling)
5. Verify that while the loading indicator is shown, the empty state is
not and viceversa

## References

Fixes elastic#190954

(cherry picked from commit 45a9cf0)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.15 Backport failed because of merge conflicts
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 195777

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 14, 2024
…omponent while first loading (#195777) (#196106)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps][Alerts] Don't show empty state in grouping
component while first loading
(#195777)](#195777)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Umberto
Pepato","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-14T10:50:55Z","message":"[ResponseOps][Alerts]
Don't show empty state in grouping component while first loading
(#195777)\n\n## Summary\r\n\r\nMakes the loading state and empty state
mutually exclusive in the\r\ngrouping component to avoid showing the
empty state when first loading\r\nthe groups data.\r\n\r\n## To
verify\r\n\r\n1. Create one or more O11y rules that fire alerts\r\n2.
Open the O11y > Alerts page\r\n3. Toggle on grouping\r\n4. Reload the
page (possibly after activating network throttling)\r\n5. Verify that
while the loading indicator is shown, the empty state is\r\nnot and
viceversa\r\n\r\n## References\r\n\r\nFixes
#190954","sha":"45a9cf0e343e6c4045834968fa27f6f468cdf3e3","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-major"],"title":"[ResponseOps][Alerts]
Don't show empty state in grouping component while first
loading","number":195777,"url":"https://github.com/elastic/kibana/pull/195777","mergeCommit":{"message":"[ResponseOps][Alerts]
Don't show empty state in grouping component while first loading
(#195777)\n\n## Summary\r\n\r\nMakes the loading state and empty state
mutually exclusive in the\r\ngrouping component to avoid showing the
empty state when first loading\r\nthe groups data.\r\n\r\n## To
verify\r\n\r\n1. Create one or more O11y rules that fire alerts\r\n2.
Open the O11y > Alerts page\r\n3. Toggle on grouping\r\n4. Reload the
page (possibly after activating network throttling)\r\n5. Verify that
while the loading indicator is shown, the empty state is\r\nnot and
viceversa\r\n\r\n## References\r\n\r\nFixes
#190954","sha":"45a9cf0e343e6c4045834968fa27f6f468cdf3e3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195777","number":195777,"mergeCommit":{"message":"[ResponseOps][Alerts]
Don't show empty state in grouping component while first loading
(#195777)\n\n## Summary\r\n\r\nMakes the loading state and empty state
mutually exclusive in the\r\ngrouping component to avoid showing the
empty state when first loading\r\nthe groups data.\r\n\r\n## To
verify\r\n\r\n1. Create one or more O11y rules that fire alerts\r\n2.
Open the O11y > Alerts page\r\n3. Toggle on grouping\r\n4. Reload the
page (possibly after activating network throttling)\r\n5. Verify that
while the loading indicator is shown, the empty state is\r\nnot and
viceversa\r\n\r\n## References\r\n\r\nFixes
#190954","sha":"45a9cf0e343e6c4045834968fa27f6f468cdf3e3"}}]}]
BACKPORT-->

Co-authored-by: Umberto Pepato <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps][Grouping] Empty state is shown while first loading groups data
6 participants