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 Autocomplete duplicates string in some cases #187184

Closed
Tracked by #176033
timductive opened this issue Jun 28, 2024 · 3 comments · Fixed by #190465
Closed
Tracked by #176033

ES|QL Autocomplete duplicates string in some cases #187184

timductive opened this issue Jun 28, 2024 · 3 comments · Fixed by #190465
Labels
bug Fixes for quality problems that affect the customer experience Feature:ES|QL ES|QL related features in Kibana impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:ESQL ES|QL related features in Kibana

Comments

@timductive
Copy link
Member

When typing commands with spaces the autocomplete can get confused on how much of the string is left to autcomplete. Resulting in duplicated parts of the string..

https://www.loom.com/share/8665eb41d8ff4d6a94697648a85a78f5?sid=efd454f2-d552-43d1-a5b3-c0e593dc5cbc

@timductive timductive added bug Fixes for quality problems that affect the customer experience Team:ESQL ES|QL related features in Kibana labels Jun 28, 2024
@elasticmachine
Copy link
Contributor

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

@stratoula stratoula added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Feature:ES|QL ES|QL related features in Kibana labels Jul 1, 2024
@drewdaemon
Copy link
Contributor

drewdaemon commented Jul 18, 2024

Possible overlap with #188677

@drewdaemon
Copy link
Contributor

My hunch is that this is happening because IS NOT NULL is currently three Monaco tokens. I'm thinking that merging them into a single token will fix the problem.

drewdaemon added a commit that referenced this issue Aug 9, 2024
## Summary

Adds some validation around our Monaco theme and tokenizer. I thought
fixing the tokenizer would help with
#187184 but it looks like
providing an explicit [replacement
range](https://microsoft.github.io/monaco-editor/docs.html#interfaces/languages.CompletionItem.html#range)
is actually the right route.

Still, we got a few things out of this since these changes fix a few
styling issues.

INLINESTATS
<img width="144" alt="Screenshot 2024-08-08 at 2 34 46 PM"
src="https://github.com/user-attachments/assets/85433d49-15c1-4d70-a6c0-30788fd6d177">

Casting operator
<img width="278" alt="Screenshot 2024-08-08 at 2 34 03 PM"
src="https://github.com/user-attachments/assets/8baafe33-d351-410d-955d-5624b76ce406">

Timespan literals
<img width="310" alt="Screenshot 2024-08-08 at 2 32 58 PM"
src="https://github.com/user-attachments/assets/8d17bdb4-c10e-4a5a-94b0-859a20a1982b">

Subsequent nulls last/first
<img width="835" alt="Screenshot 2024-08-08 at 3 23 52 PM"
src="https://github.com/user-attachments/assets/ce0906fe-2b15-4e94-9249-cdf547fb60ca">

MATCH
<img width="319" alt="Screenshot 2024-08-08 at 3 42 18 PM"
src="https://github.com/user-attachments/assets/54691803-c4a7-4834-8d00-0072581c5354">


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
drewdaemon added a commit that referenced this issue Sep 16, 2024
…191312)

## Summary

Part of #189662

Also, a follow-on to #187184
with certain source names (e.g. `foo$bar`, `my-policy`) and fields in
the `ENRICH` command.

During this effort I discovered
#191321 and a bug with the
validation of field names in the "ENRICH ... WITH" list (documented
[here](#177699)), both of which
will be addressed separately.

## Sources

### General flow


https://github.com/user-attachments/assets/4b103621-0e66-4c36-807f-4932f0cb8faf

### Works with wild-card matches


https://github.com/user-attachments/assets/6b47fffc-e922-4e2d-b6aa-3d9a2fc2236c

### `METADATA` field list


https://github.com/user-attachments/assets/d3bdf4dc-1d0c-4d56-81d7-af6bc4e25a4a

## ENRICH

Autosuggest now helps you along


https://github.com/user-attachments/assets/d627484c-e729-4dc7-9e7b-795395a31d4f

Also, fixed this bug (follow on to
#187184 )



https://github.com/user-attachments/assets/aa62a0c3-6db5-434a-829a-59f14c5c4c85


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Sep 16, 2024
…lastic#191312)

## Summary

Part of elastic#189662

Also, a follow-on to elastic#187184
with certain source names (e.g. `foo$bar`, `my-policy`) and fields in
the `ENRICH` command.

During this effort I discovered
elastic#191321 and a bug with the
validation of field names in the "ENRICH ... WITH" list (documented
[here](elastic#177699)), both of which
will be addressed separately.

## Sources

### General flow

https://github.com/user-attachments/assets/4b103621-0e66-4c36-807f-4932f0cb8faf

### Works with wild-card matches

https://github.com/user-attachments/assets/6b47fffc-e922-4e2d-b6aa-3d9a2fc2236c

### `METADATA` field list

https://github.com/user-attachments/assets/d3bdf4dc-1d0c-4d56-81d7-af6bc4e25a4a

## ENRICH

Autosuggest now helps you along

https://github.com/user-attachments/assets/d627484c-e729-4dc7-9e7b-795395a31d4f

Also, fixed this bug (follow on to
elastic#187184 )

https://github.com/user-attachments/assets/aa62a0c3-6db5-434a-829a-59f14c5c4c85

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
(cherry picked from commit e404a39)
kibanamachine added a commit that referenced this issue Sep 16, 2024
…60;ENRICH&#x60; (#191312) (#193013)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] open suggestions automatically in sources lists and
&#x60;ENRICH&#x60;
(#191312)](#191312)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Drew
Tate","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-16T13:41:38Z","message":"[ES|QL]
open suggestions automatically in sources lists and `ENRICH`
(#191312)\n\n## Summary\r\n\r\nPart of
https://github.com/elastic/kibana/issues/189662\r\n\r\nAlso, a follow-on
to https://github.com/elastic/kibana/issues/187184\r\nwith certain
source names (e.g. `foo$bar`, `my-policy`) and fields in\r\nthe `ENRICH`
command.\r\n\r\nDuring this effort I
discovered\r\nhttps://github.com//issues/191321 and a bug
with the\r\nvalidation of field names in the \"ENRICH ... WITH\" list
(documented\r\n[here](#177699)),
both of which\r\nwill be addressed separately.\r\n\r\n##
Sources\r\n\r\n### General
flow\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4b103621-0e66-4c36-807f-4932f0cb8faf\r\n\r\n###
Works with wild-card
matches\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6b47fffc-e922-4e2d-b6aa-3d9a2fc2236c\r\n\r\n###
`METADATA` field
list\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d3bdf4dc-1d0c-4d56-81d7-af6bc4e25a4a\r\n\r\n##
ENRICH\r\n\r\nAutosuggest now helps you
along\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d627484c-e729-4dc7-9e7b-795395a31d4f\r\n\r\nAlso,
fixed this bug (follow on
to\r\nhttps://github.com//issues/187184
)\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/aa62a0c3-6db5-434a-829a-59f14c5c4c85\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by: Stratoula
Kalafateli
<[email protected]>","sha":"e404a3992e220735ae51918c532a1a032e7f7993","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL"],"title":"[ES|QL]
open suggestions automatically in sources lists and
`ENRICH`","number":191312,"url":"https://github.com/elastic/kibana/pull/191312","mergeCommit":{"message":"[ES|QL]
open suggestions automatically in sources lists and `ENRICH`
(#191312)\n\n## Summary\r\n\r\nPart of
https://github.com/elastic/kibana/issues/189662\r\n\r\nAlso, a follow-on
to https://github.com/elastic/kibana/issues/187184\r\nwith certain
source names (e.g. `foo$bar`, `my-policy`) and fields in\r\nthe `ENRICH`
command.\r\n\r\nDuring this effort I
discovered\r\nhttps://github.com//issues/191321 and a bug
with the\r\nvalidation of field names in the \"ENRICH ... WITH\" list
(documented\r\n[here](#177699)),
both of which\r\nwill be addressed separately.\r\n\r\n##
Sources\r\n\r\n### General
flow\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4b103621-0e66-4c36-807f-4932f0cb8faf\r\n\r\n###
Works with wild-card
matches\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6b47fffc-e922-4e2d-b6aa-3d9a2fc2236c\r\n\r\n###
`METADATA` field
list\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d3bdf4dc-1d0c-4d56-81d7-af6bc4e25a4a\r\n\r\n##
ENRICH\r\n\r\nAutosuggest now helps you
along\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d627484c-e729-4dc7-9e7b-795395a31d4f\r\n\r\nAlso,
fixed this bug (follow on
to\r\nhttps://github.com//issues/187184
)\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/aa62a0c3-6db5-434a-829a-59f14c5c4c85\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by: Stratoula
Kalafateli
<[email protected]>","sha":"e404a3992e220735ae51918c532a1a032e7f7993"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191312","number":191312,"mergeCommit":{"message":"[ES|QL]
open suggestions automatically in sources lists and `ENRICH`
(#191312)\n\n## Summary\r\n\r\nPart of
https://github.com/elastic/kibana/issues/189662\r\n\r\nAlso, a follow-on
to https://github.com/elastic/kibana/issues/187184\r\nwith certain
source names (e.g. `foo$bar`, `my-policy`) and fields in\r\nthe `ENRICH`
command.\r\n\r\nDuring this effort I
discovered\r\nhttps://github.com//issues/191321 and a bug
with the\r\nvalidation of field names in the \"ENRICH ... WITH\" list
(documented\r\n[here](#177699)),
both of which\r\nwill be addressed separately.\r\n\r\n##
Sources\r\n\r\n### General
flow\r\n\r\n\r\nhttps://github.com/user-attachments/assets/4b103621-0e66-4c36-807f-4932f0cb8faf\r\n\r\n###
Works with wild-card
matches\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6b47fffc-e922-4e2d-b6aa-3d9a2fc2236c\r\n\r\n###
`METADATA` field
list\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d3bdf4dc-1d0c-4d56-81d7-af6bc4e25a4a\r\n\r\n##
ENRICH\r\n\r\nAutosuggest now helps you
along\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d627484c-e729-4dc7-9e7b-795395a31d4f\r\n\r\nAlso,
fixed this bug (follow on
to\r\nhttps://github.com//issues/187184
)\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/aa62a0c3-6db5-434a-829a-59f14c5c4c85\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<[email protected]>\r\nCo-authored-by: Stratoula
Kalafateli
<[email protected]>","sha":"e404a3992e220735ae51918c532a1a032e7f7993"}}]}]
BACKPORT-->

Co-authored-by: Drew Tate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:ES|QL ES|QL related features in Kibana impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:ESQL ES|QL related features in Kibana
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants