-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Synthetics] modify use overview status hook to mimic use_monitor_list #210936
[Synthetics] modify use overview status hook to mimic use_monitor_list #210936
Conversation
Two methods explored: - adding loading boolean to conditions that would execute quietAction - modifying hook to mimic use_monitor_list
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
@elasticmachine merge upstream |
useDebounce( | ||
() => { | ||
// Don't load on initial mount, only meant to handle pageState changes | ||
if (isInitialMount.current || !loaded) { | ||
if (loaded) { | ||
// setting false here to account for debounce timing | ||
isInitialMount.current = false; | ||
return; | ||
} | ||
dispatch(fetchOverviewStatusAction.get({ pageState, scopeStatusByLocation })); | ||
} | ||
}, | ||
100, | ||
[pageState, scopeStatusByLocation] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when pageState is changed, after initial loaded state, this will never be called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now
d48ea00
to
f6a25db
Compare
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!
Starting backport for target branches: 8.x, 9.0 |
elastic#210936) Resolves elastic#197066 ## Summary Two methods explored: - adding loading boolean to conditions that would execute quietAction to account for renders without completed data loads - modifying hook to mimic use_monitor_list [here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts) <img width="1722" alt="Screenshot 2025-02-12 at 4 27 38 PM" src="https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5" /> ## Risks Debounce was introduced for an api call which may impact UX and data availability in limited cases. (cherry picked from commit 258eef7)
elastic#210936) Resolves elastic#197066 ## Summary Two methods explored: - adding loading boolean to conditions that would execute quietAction to account for renders without completed data loads - modifying hook to mimic use_monitor_list [here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts) <img width="1722" alt="Screenshot 2025-02-12 at 4 27 38 PM" src="https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5" /> ## Risks Debounce was introduced for an api call which may impact UX and data availability in limited cases. (cherry picked from commit 258eef7)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…or_list (#210936) (#211932) # Backport This will backport the following commits from `main` to `9.0`: - [[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)](#210936) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Bailey Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-02-20T16:50:08Z","message":"[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)\n\nResolves #197066\n\n## Summary\n\nTwo methods explored:\n- adding loading boolean to conditions that would execute quietAction to\naccount for renders without completed data loads\n- modifying hook to mimic use_monitor_list\n[here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts)\n\n<img width=\"1722\" alt=\"Screenshot 2025-02-12 at 4 27 38 PM\"\nsrc=\"https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5\"\n/>\n\n## Risks\nDebounce was introduced for an api call which may impact UX and data\navailability in limited cases.","sha":"258eef7e37745a63256fdc56b32b21e3b103ec2a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-management","v9.1.0","v8.19.0"],"title":"[Synthetics] modify use overview status hook to mimic use_monitor_list","number":210936,"url":"https://github.com/elastic/kibana/pull/210936","mergeCommit":{"message":"[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)\n\nResolves #197066\n\n## Summary\n\nTwo methods explored:\n- adding loading boolean to conditions that would execute quietAction to\naccount for renders without completed data loads\n- modifying hook to mimic use_monitor_list\n[here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts)\n\n<img width=\"1722\" alt=\"Screenshot 2025-02-12 at 4 27 38 PM\"\nsrc=\"https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5\"\n/>\n\n## Risks\nDebounce was introduced for an api call which may impact UX and data\navailability in limited cases.","sha":"258eef7e37745a63256fdc56b32b21e3b103ec2a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210936","number":210936,"mergeCommit":{"message":"[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)\n\nResolves #197066\n\n## Summary\n\nTwo methods explored:\n- adding loading boolean to conditions that would execute quietAction to\naccount for renders without completed data loads\n- modifying hook to mimic use_monitor_list\n[here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts)\n\n<img width=\"1722\" alt=\"Screenshot 2025-02-12 at 4 27 38 PM\"\nsrc=\"https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5\"\n/>\n\n## Risks\nDebounce was introduced for an api call which may impact UX and data\navailability in limited cases.","sha":"258eef7e37745a63256fdc56b32b21e3b103ec2a"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
…or_list (#210936) (#211931) # Backport This will backport the following commits from `main` to `8.x`: - [[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)](#210936) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Bailey Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-02-20T16:50:08Z","message":"[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)\n\nResolves #197066\n\n## Summary\n\nTwo methods explored:\n- adding loading boolean to conditions that would execute quietAction to\naccount for renders without completed data loads\n- modifying hook to mimic use_monitor_list\n[here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts)\n\n<img width=\"1722\" alt=\"Screenshot 2025-02-12 at 4 27 38 PM\"\nsrc=\"https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5\"\n/>\n\n## Risks\nDebounce was introduced for an api call which may impact UX and data\navailability in limited cases.","sha":"258eef7e37745a63256fdc56b32b21e3b103ec2a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-management","v9.1.0","v8.19.0"],"title":"[Synthetics] modify use overview status hook to mimic use_monitor_list","number":210936,"url":"https://github.com/elastic/kibana/pull/210936","mergeCommit":{"message":"[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)\n\nResolves #197066\n\n## Summary\n\nTwo methods explored:\n- adding loading boolean to conditions that would execute quietAction to\naccount for renders without completed data loads\n- modifying hook to mimic use_monitor_list\n[here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts)\n\n<img width=\"1722\" alt=\"Screenshot 2025-02-12 at 4 27 38 PM\"\nsrc=\"https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5\"\n/>\n\n## Risks\nDebounce was introduced for an api call which may impact UX and data\navailability in limited cases.","sha":"258eef7e37745a63256fdc56b32b21e3b103ec2a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210936","number":210936,"mergeCommit":{"message":"[Synthetics] modify use overview status hook to mimic use_monitor_list (#210936)\n\nResolves #197066\n\n## Summary\n\nTwo methods explored:\n- adding loading boolean to conditions that would execute quietAction to\naccount for renders without completed data loads\n- modifying hook to mimic use_monitor_list\n[here](https://github.com/baileycash-elastic/kibana/blob/main/x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_monitor_list.ts)\n\n<img width=\"1722\" alt=\"Screenshot 2025-02-12 at 4 27 38 PM\"\nsrc=\"https://github.com/user-attachments/assets/4ca9638b-6fa6-4a1d-8818-af3232f1fdf5\"\n/>\n\n## Risks\nDebounce was introduced for an api call which may impact UX and data\navailability in limited cases.","sha":"258eef7e37745a63256fdc56b32b21e3b103ec2a"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
Resolves #197066
Summary
Two methods explored:
Risks
Debounce was introduced for an api call which may impact UX and data availability in limited cases.