Skip to content

[Lens] Add embeddable transforms#229545

Closed
nickofthyme wants to merge 72 commits intoelastic:mainfrom
nickofthyme:lens-transforms-phase-2
Closed

[Lens] Add embeddable transforms#229545
nickofthyme wants to merge 72 commits intoelastic:mainfrom
nickofthyme:lens-transforms-phase-2

Conversation

@nickofthyme
Copy link
Contributor

@nickofthyme nickofthyme commented Jul 27, 2025

Summary

Branched off of #229534 See nickofthyme#7 for simplified code diff.

Lens transforms Phase 2 - Lens by-value transforms for dashboard and standalone embeddables.

Adds new Lens embeddable transform. This initially only transforms current Lens Serialized state attributes with old configurations to the latest Serialized state attributes. Applying all existing runtime migrations and pins version to latest Lens item.

Additionally, this implements the embeddable transforms on the embeddable renderer to handle standalone usages of the Lens embeddable, an extension of the work done in #227141.

Closes #229543

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.

- make accessible from /common
- fix reference.name schema misalignment
- add `createdBy` and `updatedBy` to the SO schema
- use generics on common schema functions to pass type correctly
- add schema for search result
- The `getContentClientFactory` required request but never uses it.
- Add `request` to `StorageContext` to pass to CM storage handlers
- This never checked if `mSearch` was available when creating the ctx.
- Check for `mSearch` before adding to ctx, log server warning if missing
- Add `logger` to `mSearch` factory
- We should allow transforms to run on unversioned items
- These version are not targets, they are only pulled up to the first version.
- allow using `kbn/object-versioning` in common.
- Vis type alias client only needs basic methods (i.e. `get` and `update`).
- Create a slim `BasicVisualizationClient`
- The basic client can use `cm` or `http`.
- update constants and use route schema
- update handling of API formats in and out of CM client
- This add CM transforms to convert existing lens items to v1
- Adds version number to lens SO attributes.
- Duplicates and tweaks runtime migrations for legend and color mappings.
- Refactor lens client to use new CRUD api instead of CM
- Create basic lens client using CM to use new API types
- Convert lens type alias client to use new basic client
- Update calls to lens client dependency to `http`
- Update lens doc service to use new lens client
- Update lens attribute service to use updated doc service
@nickofthyme nickofthyme added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This PR does not require backporting labels Jul 27, 2025
@elastic elastic deleted a comment from elasticmachine Jul 27, 2025
nickofthyme and others added 28 commits August 2, 2025 21:07
- an existing SO import should not fail if no version is supplied
- save old lens SO as is and handle migration when retrieved and updates.
… src/core/server/integration_tests/ci_checks'
- Create may still be called with the old state such as saving an old lens by-value dashboard panel.
- the original attributes may have changed, or transformed. The request will always return the correct updated attributes.
… src/core/server/integration_tests/ci_checks'
… src/core/server/integration_tests/ci_checks'
- we don't need schemas in common only their types
- using schema in common pulls in joi to the bundle
- keep constants in common and import in server, public
@nickofthyme
Copy link
Contributor Author

Closed in favor of #235277

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:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens as code] Register runtime transforms for Lens Embeddable

2 participants