[Lens] Avoid unnecessary data fetching on dimension flyout open#82957
Merged
dej611 merged 3 commits intoelastic:masterfrom Nov 16, 2020
Merged
[Lens] Avoid unnecessary data fetching on dimension flyout open#82957dej611 merged 3 commits intoelastic:masterfrom
dej611 merged 3 commits intoelastic:masterfrom
Conversation
Contributor
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
flash1293
approved these changes
Nov 11, 2020
Contributor
flash1293
left a comment
There was a problem hiding this comment.
Tested and no unexpected double fetches anymore, LGTM.
I'm unsure about the max bars value handling in general, but let's discuss separately.
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
|
merge conflict between base and head |
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
phillipb
added a commit
to phillipb/kibana
that referenced
this pull request
Nov 16, 2020
… 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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses a common behaviour of some operation on Dimension flyout opening action.
Some components for the
termsorrangeoperations were updating the state on mount, due to theuseDebounceimplementation.A custom
useDebouncewrapper 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
rangebase 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