Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
drewdaemon opened this issue Apr 10, 2024 · 5 comments
Open

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

drewdaemon opened this issue Apr 10, 2024 · 5 comments
Labels
enhancement New value added to drive a business result impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:ESQL ES|QL related features in Kibana

Comments

@drewdaemon
Copy link
Contributor

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!

@drewdaemon drewdaemon added enhancement New value added to drive a business result impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:ESQL ES|QL related features in Kibana labels Apr 10, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@stratoula
Copy link
Contributor

Nice idea Drew!

@stratoula
Copy link
Contributor

@drewdaemon does it still make sense you think after the enhancements we did on our autocomplete?

@drewdaemon
Copy link
Contributor Author

I think it could still be a nice enhancement. But, we'd run into the z-index header problems. WDYT?

@stratoula
Copy link
Contributor

Yeah..., unless monaco has a setting to force it to appear only from the bottom (as Quynh did with the hover)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. Team:ESQL ES|QL related features in Kibana
Projects
None yet
Development

No branches or pull requests

3 participants