Skip to content

[Dashboard][Controls Anywhere] Move panel placement registry to presentationUtil plugin#246628

Merged
Zacqary merged 10 commits intoelastic:mainfrom
Zacqary:panel-placement-util
Dec 18, 2025
Merged

[Dashboard][Controls Anywhere] Move panel placement registry to presentationUtil plugin#246628
Zacqary merged 10 commits intoelastic:mainfrom
Zacqary:panel-placement-util

Conversation

@Zacqary
Copy link
Copy Markdown
Contributor

@Zacqary Zacqary commented Dec 16, 2025

Summary

Moves the panel placement registry from the dashboard plugin into the presentationUtil plugin. This is necessary to avoid circular dependency issues in the Controls Anywhere project.

Background

Controls Anywhere introduces the concept of dashboard controls being rendered as movable panels. For this, we need to define their PanelPlacementStrategy: creating them with a very short height, medium width, and in the top left corner of the dashboard.

This required adding the dashboard plugin as a requiredPlugin for controls.

Unfortunately, #245299 introduced onechat as a dependency to observabilityAIAssistant, triggering this circular dependency cycle:

   │ERROR Detected circular dependencies:
   │ERROR   dashboard -> observabilityAIAssistant -> onechat -> stackConnectors -> triggersActionsUi -> controls -> dashboard
   │ERROR   triggersActionsUi -> controls -> dashboard -> observabilityAIAssistant -> onechat -> triggersActionsUi
   │ERROR   workflowsManagement -> triggersActionsUi -> controls -> dashboard -> observabilityAIAssistant -> onechat -> workflowsManagement
   │ERROR   stackConnectors -> triggersActionsUi -> controls -> dashboard -> observabilityAIAssistant -> onechat -> workflowsManagement -> stackConnectors

Unfortunately, Kibana architecture doesn't have a good way of moving registries into @kbn packages yet, so we need to find a safer plugin for it to live in. We determined that controls and dashboard both depend on the presentationUtil plugin without incident, and it's already a place to put other miscellaneous dashboard-related things.

Checklist

@Zacqary Zacqary added Feature:Dashboard Dashboard related features Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes impact:critical This issue should be addressed immediately due to a critical level of impact on the product. labels Dec 16, 2025
painlessLab: 6299
presentationPanel: 11418
presentationUtil: 9000
presentationUtil: 9948
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does increase the size of presentationUtil, but does it by removing code from dashboard, so it's about even

@elastic/kibana-operations As recommended by CI I ran node scripts/build_kibana_platform_plugins --focus presentationUtil --update-limits. I'm not sure if it was supposed to update limits for plugins besides the --focus plugin, but this is what it did.

# Conflicts:
#	packages/kbn-optimizer/limits.yml
@Zacqary Zacqary marked this pull request as ready for review December 16, 2025 22:39
@Zacqary Zacqary requested review from a team as code owners December 16, 2025 22:39
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Copy Markdown
Contributor

@Heenawter Heenawter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one nit but otherwise LGTM - changes are straightforward. Maybe worth getting @nreese's input on the decision to move this to presentationUtil for some extra confidence - but the code looks good to me, and I tested to ensure that the Links panel still respects its panel placement :)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@Zacqary Zacqary added backport:version Backport to applied version labels v9.3.0 labels Dec 16, 2025
@nreese
Copy link
Copy Markdown
Contributor

nreese commented Dec 16, 2025

Would it make more sense to move the registry to embeddables? Maybe there should be a quick conversation about the best long term place for this registry.

Copy link
Copy Markdown
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kibana-presentation changes LGTM
code review only

Copy link
Copy Markdown
Contributor

@mgiota mgiota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review only. LGTM

@Zacqary Zacqary enabled auto-merge (squash) December 17, 2025 16:16
@Zacqary Zacqary added the v9.2.4 label Dec 17, 2025
@Zacqary Zacqary merged commit 5312bbb into elastic:main Dec 18, 2025
13 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.2

https://github.com/elastic/kibana/actions/runs/20321353487

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
dashboard 998 996 -2
presentationUtil 108 111 +3
total +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
dashboard 104 100 -4
presentationUtil 82 96 +14
total +10

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 721.4KB 721.4KB +75.0B
links 99.1KB 99.1KB +10.0B
total +85.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
dashboard 12 11 -1
presentationUtil 5 7 +2
total +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dashboard 18.0KB 17.5KB -584.0B
links 7.7KB 7.7KB +7.0B
presentationUtil 8.3KB 8.8KB +530.0B
slo 33.6KB 33.6KB +14.0B
synthetics 29.1KB 29.1KB +14.0B
total -19.0B
Unknown metric groups

API count

id before after diff
dashboard 106 102 -4
presentationUtil 108 122 +14
total +10

History

cc @Zacqary

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.2 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 246628

Questions ?

Please refer to the Backport tool documentation

Zacqary added a commit that referenced this pull request Dec 18, 2025
… presentationUtil plugin (#246950)

# Backport

This will backport the following commits from `main` to `9.2`:
- [[Dashboard][Controls Anywhere] Move panel placement registry to
presentationUtil plugin
(#246628)](#246628)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Dashboard Dashboard related features impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-management Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.2.4 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants