Skip to content

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

Merged
umbopepato merged 3 commits intoelastic:mainfrom
umbopepato:190954-grouping-empty-state-while-loading
Oct 14, 2024
Merged

[ResponseOps][Alerts] Don't show empty state in grouping component while first loading#195777
umbopepato merged 3 commits intoelastic:mainfrom
umbopepato:190954-grouping-empty-state-while-loading

Conversation

@umbopepato
Copy link
Copy Markdown
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 Platform ResponseOps team (formerly the Cases and Alerting teams) t// backport:prev-major labels Oct 10, 2024
@umbopepato umbopepato requested a review from a team as a code owner October 10, 2024 13:59
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@kibanamachine
Copy link
Copy Markdown
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
Copy Markdown
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":"umbopepato@users.noreply.github.com"},"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 <umbopepato@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// 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