[Controls Anywhere] Keep controls focused when creating + editing other panels#241023
[Controls Anywhere] Keep controls focused when creating + editing other panels#241023Zacqary wants to merge 11 commits intoelastic:controlsAnywherefrom
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
src/platform/packages/shared/controls/controls-constants/src/control_constants.ts
Outdated
Show resolved
Hide resolved
This reverts commit 13d95d8.
…control-focus-fix # Conflicts: # src/platform/plugins/shared/dashboard/public/dashboard_api/get_dashboard_api.ts # src/platform/plugins/shared/dashboard/public/dashboard_api/types.ts
|
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
src/platform/plugins/shared/dashboard/public/dashboard_renderer/grid/dashboard_grid_item.tsx
Show resolved
Hide resolved
src/platform/plugins/shared/dashboard/public/dashboard_api/esql_variables_manager.ts
Show resolved
Hide resolved
…control-focus-fix
…/kibana into 236021-control-focus-fix # Conflicts: # src/platform/plugins/shared/controls/public/controls/data_controls/options_list_control/get_options_list_control_factory.tsx
💔 Build Failed
Failed CI StepsHistory
|
There was a problem hiding this comment.
This doesn't work when you are adding an existing control to an ES|QL query:
Screen.Recording.2025-11-05.at.3.21.32.PM.mov
But that is complicated, since we would somehow need to respond to the ES|QL query changing..... Unless there is an easy way to do that from within Dashboard, I am honestly starting to feel like we need to revisit this later with a different approach 🫠 A lot of more high-impact stuff has popped up since we started this.
Either that, or we just return to the simple approach of "all controls remain focused" 🤷
There was a problem hiding this comment.
Yeah I think we'd need to go into the ES|QL panel editor to make that possible.
@ThomThomson what do you think we should do here? Go back to keeping all controls in focus, or table this and keep pushing later?
There was a problem hiding this comment.
We talked offline - we will leave this until after the feature branch merges so that it can be done properly. Feel free fo close this or keep it open to revisit later @Zacqary :)
cd58634 to
126887a
Compare
…er panels (#248021) ## Summary Closes #236021 (Second pass at this issue after #241023 was closed, previous discussions may contain some helpful context.) Focuses filter controls that apply to the same section as the focused panel: https://github.com/user-attachments/assets/2eedfd2f-ef73-4afb-88e9-839cd32e8ad9 Also focuses ES|QL controls which affect the currently focused ES|QL panel, including controls that have just been created: https://github.com/user-attachments/assets/09d68f3d-cd03-4d91-82e6-ef6b95a69d48 I opted NOT to check whether ES|QL panels and ES|QL controls were in the same section, because it shouldn't be possible to use an ES|QL variable that's unavailable in a certain panel's section. It is currently possible to do this, but once #248198 is fixed we shouldn't need any special section checking logic for ES|QL. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
…er panels (elastic#248021) ## Summary Closes elastic#236021 (Second pass at this issue after elastic#241023 was closed, previous discussions may contain some helpful context.) Focuses filter controls that apply to the same section as the focused panel: https://github.com/user-attachments/assets/2eedfd2f-ef73-4afb-88e9-839cd32e8ad9 Also focuses ES|QL controls which affect the currently focused ES|QL panel, including controls that have just been created: https://github.com/user-attachments/assets/09d68f3d-cd03-4d91-82e6-ef6b95a69d48 I opted NOT to check whether ES|QL panels and ES|QL controls were in the same section, because it shouldn't be possible to use an ES|QL variable that's unavailable in a certain panel's section. It is currently possible to do this, but once elastic#248198 is fixed we shouldn't need any special section checking logic for ES|QL. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --------- Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
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.
Type failures are expected because the feature branch is currently in an incomplete state, where the controls that have not yet been converted are dependent on things that no longer exist.
Summary
Fixes #236021

This is a quick fix which just checks the panel type against defined control types, and prevents it from being blurred when another panel is in focus. I don't think we're planning to apply this non-blurring behavior to anything except controls, so I don't know if we need a more generic solution like passingisAlwaysInFocusinto the panel.If we're okay with tightly coupling control types to the dashboard renderer, this solution should work fine as-is.When editing a panel, this PR will unblur any ES|QL controls that output any variables in the current panel's ES|QL query.