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

[Response Ops][Cases] Spinner on assigning user to case from case page #191490

Merged
merged 4 commits into from
Aug 29, 2024

Conversation

jcger
Copy link
Contributor

@jcger jcger commented Aug 27, 2024

Summary

Fixes #190303

In 8.15 we disabled a request that showed a spinner while React Query's isLoading was true. isLoading remains true as long as no data has been received. Because the request was disabled, isLoading stayed true the entire time, causing the spinner to be displayed instead of the form that would have activated the request. The fix uses another React Query state called isFetching, which is only true while the request is actively being made, so initially, no spinner is shown.

Release Note

Fix endless loading spinner when wanting to add a assignee to a case from the cases list

@jcger jcger changed the title [Response Ops] useQuery isFetching instead of loading [Response Ops] Spinner on assigning user to case from case page Aug 27, 2024
@jcger jcger added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.15.0 v8.16.0 labels Aug 27, 2024
@jcger
Copy link
Contributor Author

jcger commented Aug 27, 2024

/ci

@jcger jcger marked this pull request as ready for review August 27, 2024 15:44
@jcger jcger requested a review from a team as a code owner August 27, 2024 15:44
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@jcger jcger changed the title [Response Ops] Spinner on assigning user to case from case page Response Ops][Cases] Spinner on assigning user to case from case page Aug 27, 2024
@jcger jcger changed the title Response Ops][Cases] Spinner on assigning user to case from case page [Response Ops][Cases] Spinner on assigning user to case from case page Aug 27, 2024
@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
cases 480.2KB 480.2KB +1.0B

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

Copy link
Contributor

@js-jankisalvi js-jankisalvi left a comment

Choose a reason for hiding this comment

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

Verified locally, works as expected 👍

Copy link
Contributor

@guskovaue guskovaue left a comment

Choose a reason for hiding this comment

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

LGTM!

@jcger jcger merged commit 19f6469 into elastic:main Aug 29, 2024
29 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Aug 29, 2024
elastic#191490)

## Summary

Fixes elastic#190303

In 8.15 we disabled a request that showed a spinner while React Query's
`isLoading` was true. `isLoading` remains true as long as no data has
been received. Because the request was disabled, `isLoading` stayed true
the entire time, causing the spinner to be displayed instead of the form
that would have activated the request. The fix uses another React Query
state called `isFetching`, which is only true while the request is
actively being made, so initially, no spinner is shown.

## Release Note
Fix endless loading spinner when wanting to add a assignee to a case
from the cases list

(cherry picked from commit 19f6469)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15

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 Aug 29, 2024
…ase page (#191490) (#191725)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Response Ops][Cases] Spinner on assigning user to case from case
page (#191490)](#191490)

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

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

<!--BACKPORT [{"author":{"name":"Julian
Gernun","email":"17549662+jcger@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-08-29T11:08:33Z","message":"[Response
Ops][Cases] Spinner on assigning user to case from case page
(#191490)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/190303\r\n\r\nIn 8.15 we
disabled a request that showed a spinner while React
Query's\r\n`isLoading` was true. `isLoading` remains true as long as no
data has\r\nbeen received. Because the request was disabled, `isLoading`
stayed true\r\nthe entire time, causing the spinner to be displayed
instead of the form\r\nthat would have activated the request. The fix
uses another React Query\r\nstate called `isFetching`, which is only
true while the request is\r\nactively being made, so initially, no
spinner is shown.\r\n\r\n## Release Note\r\nFix endless loading spinner
when wanting to add a assignee to a case\r\nfrom the cases
list","sha":"19f6469be705d88ec8f3b803e349257d45603f09","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","Feature:Cases","v8.15.0","v8.16.0"],"title":"[Response
Ops][Cases] Spinner on assigning user to case from case
page","number":191490,"url":"https://github.com/elastic/kibana/pull/191490","mergeCommit":{"message":"[Response
Ops][Cases] Spinner on assigning user to case from case page
(#191490)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/190303\r\n\r\nIn 8.15 we
disabled a request that showed a spinner while React
Query's\r\n`isLoading` was true. `isLoading` remains true as long as no
data has\r\nbeen received. Because the request was disabled, `isLoading`
stayed true\r\nthe entire time, causing the spinner to be displayed
instead of the form\r\nthat would have activated the request. The fix
uses another React Query\r\nstate called `isFetching`, which is only
true while the request is\r\nactively being made, so initially, no
spinner is shown.\r\n\r\n## Release Note\r\nFix endless loading spinner
when wanting to add a assignee to a case\r\nfrom the cases
list","sha":"19f6469be705d88ec8f3b803e349257d45603f09"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"8.15","label":"v8.15.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191490","number":191490,"mergeCommit":{"message":"[Response
Ops][Cases] Spinner on assigning user to case from case page
(#191490)\n\n## Summary\r\n\r\nFixes
https://github.com/elastic/kibana/issues/190303\r\n\r\nIn 8.15 we
disabled a request that showed a spinner while React
Query's\r\n`isLoading` was true. `isLoading` remains true as long as no
data has\r\nbeen received. Because the request was disabled, `isLoading`
stayed true\r\nthe entire time, causing the spinner to be displayed
instead of the form\r\nthat would have activated the request. The fix
uses another React Query\r\nstate called `isFetching`, which is only
true while the request is\r\nactively being made, so initially, no
spinner is shown.\r\n\r\n## Release Note\r\nFix endless loading spinner
when wanting to add a assignee to a case\r\nfrom the cases
list","sha":"19f6469be705d88ec8f3b803e349257d45603f09"}}]}] BACKPORT-->

Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
@cnasikas cnasikas added the bug Fixes for quality problems that affect the customer experience label Sep 2, 2024
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:Cases Cases feature release_note:fix Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.15.0 v8.15.1 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security Solution]Circle Loader on assigning user to case from case page
7 participants