[Controls Anywhere] Add variable controls when search session embeddable is added to Dashboard#242205
Conversation
| // Only add controls whose variableName exists in current esqlVariables | ||
| Object.values(controlsState).forEach((panel) => { | ||
| // Only add controls whose variableName does not exist in current esqlVariables | ||
| for (const panel of Object.values(controlsState)) { |
There was a problem hiding this comment.
I was running into placement issues if we didn't add these new panels sequentially (i.e. we wait for one panel to be fully added, including waiting for the child API to be available, before adding the next one). That is why you see a slight delay in adding the second variable in the video in the PR description. Not ideal, but 🤷
| if (scrollToPanel) { | ||
| trackPanel.setScrollToPanelId(uuid); | ||
| } |
There was a problem hiding this comment.
The screen would jitter when adding multiple panels. So we need the ability to turn it off when we know we are adding more than one panel in sequence.
…er/kibana into fix-discover-sessions_2025-11-06
ThomThomson
left a comment
There was a problem hiding this comment.
Very cool! Nice work and a small & clean set of changes. Left one suggestion
|
|
||
| export interface PublishesPauseFetch { | ||
| isFetchPaused$: Observable<boolean>; | ||
| setFetchPaused: (paused: boolean) => void; |
There was a problem hiding this comment.
Can we separate this out into a different interface in the same file? IMO we shouldn't enforce that every API that pauses fetch can also have its fetch paused publicly.
💔 Build Failed
Failed CI StepsHistory
|
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.
Part of #241678
Summary
This PR ensures that, when you are adding a Discover embeddable via the "Add from library" flyout, if that search session includes controls, these controls are added as panels alongside the Discover session embeddable.
Screen.Recording.2025-11-06.at.2.12.48.PM.mov