Skip to content

[Lens] [ES|QL] Improve types for ES|QL conversion.#251042

Merged
walterra merged 8 commits intoelastic:mainfrom
walterra:lens-esql-convert-types
Feb 5, 2026
Merged

[Lens] [ES|QL] Improve types for ES|QL conversion.#251042
walterra merged 8 commits intoelastic:mainfrom
walterra:lens-esql-convert-types

Conversation

@walterra
Copy link
Copy Markdown
Contributor

@walterra walterra commented Jan 30, 2026

Summary

Updates in this PR:

  • Moves ES|QL conversion types into a dedicated file (esql_conversion_types.ts)
  • Return type for getActiveDatasourceIdFromDoc, this is what triggers more or less all other updates and test updates
  • getEditLensConfiguration is a factory that returns a React component. The code was structured in a way that didn't let React linting kick in, this missed a "rule of hooks" where we returned early from the component but used other hooks after the return. This PR refactors the factory and breaks out the component to the top level of the file so these linting rules kickin.

Checklist

@walterra walterra self-assigned this Jan 30, 2026
@walterra walterra 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 backport:skip This PR does not require backporting v9.4.0 Feature:Lens labels Jan 30, 2026
@walterra walterra changed the title Lens esql convert types [Lens] [ES|QL] Improve types for ES|QL conversion. Jan 30, 2026
@walterra walterra marked this pull request as ready for review January 30, 2026 21:03
@walterra walterra requested a review from a team as a code owner January 30, 2026 21:03
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #131 / "before all" hook in "{root}"

Metrics [docs]

Async chunks

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

id before after diff
lens 2.0MB 2.0MB +267.0B

History

cc @walterra

Copy link
Copy Markdown
Contributor

@markov00 markov00 left a comment

Choose a reason for hiding this comment

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

Nice cleanup, and good work on spotting the skipped hook lint rule on tha function

Copy link
Copy Markdown
Contributor

@mariairiartef mariairiartef left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@walterra walterra merged commit 4f4df61 into elastic:main Feb 5, 2026
16 checks passed
@walterra walterra deleted the lens-esql-convert-types branch February 5, 2026 09:01
mbondyra added a commit to mbondyra/kibana that referenced this pull request Feb 5, 2026
* commit '5c0872d56bc0268177cd3c7150a1685481fb5238': (221 commits)
  Add .cursorignore file (elastic#251709)
  [Search] Add descriptions to semantic_text field inference endpoint select (elastic#249265)
  [Agent Builder] Agent skills implementation (elastic#251209)
  [Lens] [ES|QL] Improve types for ES|QL conversion. (elastic#251042)
  Update the trace waterfall to make it easy to understand (elastic#250442)
  [ES|QL] [Lens] Adds query stats (elastic#251029)
  [Lens] Fix KQL character escaping when query is generated from Top values column (breakdown). (elastic#250925)
  fix(kbn-elastic-assistant): fix a11y issue with missing label on flyout (elastic#251656)
  Update dependency @elastic/monaco-esql to v3.1.16 (main) (elastic#251666)
  [Automatic Import V2] Add langsmith tracing (elastic#251592)
  [scout] fix duplicated test failure reports in Buildkite annotations (elastic#251455)
  chore(NA): remove us-central1-b from gcp zones on high load jobs (elastic#251748)
  skip flaky suite (elastic#250973)
  [Lens] Allow read only view for users with write permissions but having no write access to the dashboard (elastic#247746)
  [CI] Increase artifacts disk to 180gb (elastic#251774)
  [content-list] 1. Provider Foundation (elastic#251344)
  [AI Infra] Add missing ES|QL commands and functions documentation for inference tasks (elastic#249089)
  [docs-utils] 4️⃣ pre-req: Prepare for new validations (elastic#250810)
  [APM] Extend React flow service map test coverage (elastic#251624)
  [scout] discover tests with custom server configs (elastic#251297)
  ...

# Conflicts:
#	src/platform/plugins/shared/dashboard/tsconfig.json
#	x-pack/platform/plugins/shared/agent_builder_platform/server/tools/create_visualization/create_visualization.ts
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// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants