Skip to content

[ES|QL] [Controls] Fixes fields values not available after editing#268102

Closed
stratoula wants to merge 5 commits into
elastic:mainfrom
stratoula:esql-control-fix-fields-dropdown
Closed

[ES|QL] [Controls] Fixes fields values not available after editing#268102
stratoula wants to merge 5 commits into
elastic:mainfrom
stratoula:esql-control-fix-fields-dropdown

Conversation

@stratoula
Copy link
Copy Markdown
Contributor

@stratoula stratoula commented May 7, 2026

Summary

This PR #259670 created a regression. When now you try to edit a fields control, the dropdown doesnt depict the available values.

BEFORE

image

The FIELDS controls have a legitimate need to remember the source query, and add it back deliberately. This PR is fixing it.

NOW

image

Note: Existing fields controls with the problem will still not show the list.

Checklist

@stratoula stratoula added release_note:fix v9.5.0 backport:skip This PR does not require backporting Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// Feature:ES|QL ES|QL related features in Kibana labels May 7, 2026
@stratoula stratoula changed the title [ES|QL] [Controls] Fixes fields available values not available after … [ES|QL] [Controls] Fixes fields available values not available after editing May 7, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout Lane #36 - serverless-observability_complete / default / local-serverless-observability_complete - Serverless Observability Navigation - Complete tier body - clicking body nav items sets the active link, updates breadcrumbs, and navigates

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
controls 524.2KB 524.5KB +251.0B
esql 896.6KB 896.6KB +47.0B
total +298.0B

History

@stratoula stratoula marked this pull request as ready for review May 8, 2026 05:41
@stratoula stratoula requested review from a team as code owners May 8, 2026 05:41
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

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

@stratoula stratoula changed the title [ES|QL] [Controls] Fixes fields available values not available after editing [ES|QL] [Controls] Fixes fields values not available after editing May 8, 2026
@Heenawter Heenawter self-requested a review May 8, 2026 15:00
Comment on lines +195 to 203
source_esql_query: schema.maybe(
schema.string({
meta: {
description:
'The ES|QL query the control was created from. Not evaluated at runtime; persisted only so the available identifiers list (e.g. fields) can be repopulated when the control is edited.',
},
})
),
},
Copy link
Copy Markdown
Contributor

@Heenawter Heenawter May 8, 2026

Choose a reason for hiding this comment

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

I'm not sure this is the right approach. By adding it to the user-facing API schema like this, it is up to the user who makes the control to copy paste the query from some other ES|QL query into this and then we somehow have to keep these values up-to-date... Not good!

Instead, I wonder if we could use the related panels logic once that merges in order to determine which query to use at runtime? Especially with my suggested approach - if we move the related panels logic into the ES|QL control like I suggested, we could pretty easily know which ES|QL query is using the field control variable at runtime, which we could then use to populate the suggested options dropdown. What do you think @stratoula?

cc @Zacqary here, too

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.

yeah I see what you say and I hear it. I am fine with fixing it the way you suggest Hannah. I am going to close this PR but can you please handle it? It is a bad regression and I dont like it 🙏

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.

Created an issue to track: #268695

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:ES|QL ES|QL related features in Kibana release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants