Skip to content

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

Merged
Zacqary merged 2 commits intoelastic:9.2from
Zacqary:backport/9.2/pr-246628
Dec 18, 2025
Merged

[9.2] [Dashboard][Controls Anywhere] Move panel placement registry to presentationUtil plugin#246950
Zacqary merged 2 commits intoelastic:9.2from
Zacqary:backport/9.2/pr-246628

Conversation

@Zacqary
Copy link
Copy Markdown
Contributor

@Zacqary Zacqary commented Dec 18, 2025

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

…ntationUtil plugin (elastic#246628)

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](elastic#245588).

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, elastic#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.

- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@Zacqary Zacqary added the backport This PR is a backport of another PR label Dec 18, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@Zacqary Zacqary enabled auto-merge (squash) December 18, 2025 18:03
import { DASHBOARD_APP_ID, LANDING_PAGE_PATH, SEARCH_SESSION_ID } from '../common/constants';
import type { GetPanelPlacementSettings } from './panel_placement';
import { registerDashboardPanelSettings } from './panel_placement';
import type { FindDashboardsService } from './services/dashboard_content_management_service/types';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we still need this line (#71)

Copy link
Copy Markdown
Contributor

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

lgtm!

@Zacqary Zacqary merged commit 9719d6b into elastic:9.2 Dec 18, 2025
13 checks passed
@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 706 704 -2
presentationUtil 105 108 +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 94 90 -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 662.4KB 662.5KB +73.0B
links 99.1KB 99.1KB +10.0B
total +83.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 11 10 -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.4KB -584.0B
links 7.7KB 7.7KB +7.0B
presentationUtil 8.3KB 8.9KB +530.0B
slo 33.1KB 33.1KB +14.0B
synthetics 28.2KB 28.2KB +14.0B
total -19.0B
Unknown metric groups

API count

id before after diff
dashboard 98 94 -4
presentationUtil 108 122 +14
total +10

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:obs-ux-management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants