Skip to content

[ES|QL] show function signature while typing #180528

@drewdaemon

Description

@drewdaemon

WHEN I am typing the arguments to a function
THEN I should see the function signature
AND I should see the type of the argument which I am currently typing

When typing an opening bracket, VS Code shows an awesome popup with information about all function signatures. As you continue typing arguments, it scopes the popup down to the signatures that match the arguments that have already been entered. It also highlights the definition of the current argument that is being typed. E.g.

Screen.Recording.2024-04-10.at.12.50.01.PM.mov

We should do something similar!

This would be extra helpful for when we don't have any suggestions for a particular parameter but we still know its type.

Screenshot 2024-04-10 at 12 58 41 PM

Here we have nothing to suggest for the second parameter of auto_bucket but we know it has to be a number. We don't communicate this to the user though...

Extra credit

In VS Code (Typescript), it also shows a parameter description when available.

Screenshot 2024-04-10 at 1 02 04 PM

The definitions provided by Elasticsearch sometimes include these but right now we have nowhere to show them in the UI. If we built a similar experience to VS Code, we could totally wire this up after #179634!

Metadata

Metadata

Labels

Team:ESQLES|QL related features in Kibana t//enhancementNew value added to drive a business resultimpact:needs-assessmentProduct and/or Engineering needs to evaluate the impact of the change.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions