-
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
[Lens] Avoid unnecessary data fetching on dimension flyout open #82957
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
Tested and no unexpected double fetches anymore, LGTM.
I'm unsure about the max bars value handling in general, but let's discuss separately.
@elasticmachine merge upstream |
merge conflict between base and head |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
… into add-logs-to-node-details * 'add-logs-to-node-details' of github.com:phillipb/kibana: fix tall vislib charts in visualize (elastic#83340) [Lens] Avoid unnecessary data fetching on dimension flyout open (elastic#82957) [Security Solution][Case] Change case connector minimum required license to basic (elastic#83401) fix logstash central pipeline management test (elastic#83281) [Search] Send to background UI (elastic#81793) Migrate `/translations` route to core (elastic#83280) [APM] Ensure APM jest script can run (elastic#83398) [Uptime] Monitor status alert use url as instance (elastic#81736) [ML] Add basic license test run details to ML+Transform READMEs (elastic#83259) TSVB doesn't communicate it's index-patterns to dashboard (elastic#82964) [Alerting UI] Added ability to assign alert actions to resolved action group in UI (elastic#83139) Skips Vega test skip flaky suite (elastic#79967) [bundle optimization] Update to semver 7.x to get tree-shaking (elastic#83020) Added ability to fire actions when an alert instance is resolved (elastic#82799)
Summary
This PR addresses a common behaviour of some operation on Dimension flyout opening action.
Some components for the
terms
orrange
operations were updating the state on mount, due to theuseDebounce
implementation.A custom
useDebounce
wrapper has been created that skips the first render - but ideally it could be extended as well in the future.This new implementation avoids most of the data fetching scenario.
There's still an initial data fetching in case of first panel opening for the
range
base operation as the frontend needs to convert the"auto"
value into a numeric value: note this was happening in all modes before, while now it has a really specific target.Tests have been adapted to handle the new implementation, and new tests have been added to detect this specific scenario.
Fixes: #82605
Checklist