[Controls Anywhere] Fix initialization of control group renderer#242049
Merged
Heenawter merged 6 commits intoelastic:controlsAnywherefrom Nov 7, 2025
Conversation
Contributor
⏳ Build in-progress, with failures
Failed CI StepsHistory
|
Heenawter
commented
Nov 6, 2025
Comment on lines
+100
to
+104
| // ignore meta data when comparing and storing filters, since we do not use it | ||
| const variablesWithoutMetaData = newVariables.map((variable) => omit(variable, 'meta')); | ||
| if (!isEqual(variablesWithoutMetaData, currentEsqlVariables)) { | ||
| // Update the ESQL variables in the internal state | ||
| dispatch(setEsqlVariables({ esqlVariables: newVariables })); | ||
| dispatch(setEsqlVariables({ esqlVariables: variablesWithoutMetaData })); |
Contributor
Author
There was a problem hiding this comment.
Discover initializes the variables from the URL state so that the histogram can load right away; but when the variables actually publish via esqlVariables$, they now have metadata injected. This was causing unsaved changes issues + refetching issues because it thought things were different due to the new metadata. Since Discover doesn't use this info, it's easier to just omit it at the point of publishing
ThomThomson
approved these changes
Nov 7, 2025
Contributor
ThomThomson
left a comment
There was a problem hiding this comment.
Approach here looks good! I like that the changes are pretty well limited to the control-group-renderer.
| */ | ||
| const ignoreWhileLoading = pipe( | ||
| combineLatestWith(parentApi.childrenLoading$), | ||
| filter(([, loading]) => !loading), |
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.
Warning
This work is being merged into a feature branch, not main!
Because of this, we only need a review from @elastic/kibana-presentation for now.
Closes #241680
Summary
This PR ensures that
fetch$only emits once when reloading a Discover session with variables. This prevents the histogram from trying to load before the variables are ready, which caused an error.Before
Screen.Recording.2025-11-05.at.3.27.47.PM.mov
After
Screen.Recording.2025-11-05.at.3.28.48.PM.mov