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] Improve initial empty state #183971

Closed
ryankeairns opened this issue May 21, 2024 · 4 comments
Closed

[ES|QL] Improve initial empty state #183971

ryankeairns opened this issue May 21, 2024 · 4 comments
Labels
enhancement New value added to drive a business result Feature:ES|QL impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:ESQL ES|QL related features in Kibana

Comments

@ryankeairns
Copy link
Contributor

Describe the feature:
Currently, an error message is present when the editor is empty. This means all new queries begin with an error warning.
Instead, we could suppress the error/validation check and, alternatively, show either placeholder text or an initial suggestion once the user enters (focuses) on the editor.

image (35)

Describe a specific use case for the feature:

  1. The editor start in an empty state with no error message.
  2. User tabs or clicks into the empty editor.
  3. An autocomplete suggestion appears suggesting to write from, row, or show. Technically, they can type anything, but this seems the most common, logical starting point for a new query.

CleanShot 2024-05-21 at 16 28 04@2x

@ryankeairns ryankeairns added Feature:ES|QL Team:ESQL ES|QL related features in Kibana labels May 21, 2024
@elasticmachine
Copy link
Contributor

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

@stratoula stratoula added enhancement New value added to drive a business result impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels May 22, 2024
@stratoula
Copy link
Contributor

@ryankeairns also it would be nice to think how an empty state will look in discover. Currently if the user submits an empty query we error out (as we are sending the request at ES and query is a mandatory field)

image

Ideas:

  • Not allow submitting an empty query
  • Allow the submission but show no error but a nice empty state instead
  • More...

stratoula added a commit that referenced this issue May 23, 2024
## Summary

Part of #183971

This PR suppresses the errors in the editor when the query is empty.

It also sets the editor in a read only state when the query is not set
and the user hasn't focused. Read only means that the validation won't
run. At the point the user focuses on the editor, the validation will
start running again.


![meow](https://github.com/elastic/kibana/assets/17003240/636a9d12-6b0e-4533-8f6a-d63664336178)![meow1](https://github.com/elastic/kibana/assets/17003240/911450a0-96bc-4627-9fff-bbdc8aadfa2a)
rshen91 pushed a commit to rshen91/kibana that referenced this issue May 30, 2024
## Summary

Part of elastic#183971

This PR suppresses the errors in the editor when the query is empty.

It also sets the editor in a read only state when the query is not set
and the user hasn't focused. Read only means that the validation won't
run. At the point the user focuses on the editor, the validation will
start running again.


![meow](https://github.com/elastic/kibana/assets/17003240/636a9d12-6b0e-4533-8f6a-d63664336178)![meow1](https://github.com/elastic/kibana/assets/17003240/911450a0-96bc-4627-9fff-bbdc8aadfa2a)
@stratoula
Copy link
Contributor

This has been partially been addressed. Now we don't error out on an empty query

@ryankeairns
Copy link
Contributor Author

Closing this given the partial resolution. Will open a new issue once design is ready.

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 Feature:ES|QL impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:ESQL ES|QL related features in Kibana
Projects
None yet
Development

No branches or pull requests

3 participants