Skip to content

[Discover] Minor embeddable/controls cleanups#250336

Merged
davismcphee merged 5 commits intoelastic:mainfrom
davismcphee:discover-controls-anywhere-cleanup
Jan 28, 2026
Merged

[Discover] Minor embeddable/controls cleanups#250336
davismcphee merged 5 commits intoelastic:mainfrom
davismcphee:discover-controls-anywhere-cleanup

Conversation

@davismcphee
Copy link
Copy Markdown
Contributor

Summary

Just a couple of minor cleanups I've been meaning to do after the controls anywhere #245588 PR merged, mainly pulling the addPanelFromLibrary out of the plugin file.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@davismcphee davismcphee self-assigned this Jan 26, 2026
@davismcphee davismcphee added Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Feature:Embeddables Relating to the Embeddable system labels Jan 26, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
discover 2067 2068 +1

Async chunks

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

id before after diff
discover 1.5MB 1.5MB +161.0B

Page load bundle

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

id before after diff
discover 25.5KB 25.1KB -369.0B

History

cc @davismcphee

@davismcphee davismcphee marked this pull request as ready for review January 26, 2026 16:51
@davismcphee davismcphee requested review from a team as code owners January 26, 2026 16:51
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jan 27, 2026
getTooltipForSavedObject,
}: {
onAdd: RegistryItem['onAdd'];
onAdd: RegistryItem<TSavedObjectAttributes>['onAdd'];
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.

Can you explain why this type change is needed? I'm aware that it's currently quite tied to the Saved Object typings, but we are trying to move it away from that, and I'd prefer not to introduce a new linkage. Is there any way you can leave off this generic type and cast it on your side?

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.

It's not needed, just seemed correct to type it with the already provided TSavedObjectAttributes vs re-casting on our end. I thought omitting It was accidental tbh, seems confusing otherwise. But I can revert it, done here: b0fddf7.

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.

Thanks for the revert, we have plans to decouple this bit from content management (and saved objects in general) because eventually these should be the return types of various panel-level APIs, not saved objects directly.

@davismcphee davismcphee merged commit a882c5b into elastic:main Jan 28, 2026
16 checks passed
@davismcphee davismcphee deleted the discover-controls-anywhere-cleanup branch January 28, 2026 16:03
hannahbrooks pushed a commit to hannahbrooks/kibana that referenced this pull request Jan 30, 2026
## Summary

Just a couple of minor cleanups I've been meaning to do after the
controls anywhere elastic#245588 PR merged, mainly pulling the
`addPanelFromLibrary` out of the plugin file.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

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:skip This PR does not require backporting Feature:Discover Discover Application Feature:Embeddables Relating to the Embeddable system Feature:Embedding Embedding content via iFrame release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants