-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] new pattern for SORT
autocomplete
#193595
Conversation
Pinging @elastic/kibana-esql (Team:ESQL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, LGTM!
* @TODO — this string manipulation is crude and can't support all cases | ||
* Checking for a partial word and computing the replacement range should | ||
* really be done using the AST node, but we'll have to refactor further upstream | ||
* to make that available. This is a quick fix to support the most common case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Where are we tracking this refactoring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nowhere except the RFC at this point
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
* main: (176 commits) [ML][Rules] Fixes deletion in Check interval input for anomaly detection rule (elastic#193420) Bump maximum supported package spec version to 3.2 (elastic#193574) [ES|QL] new pattern for `SORT` autocomplete (elastic#193595) [Inventory][ECO] Entities page search bar (elastic#193546) [Synthetics] Remove extra overview route (elastic#192449) [Obs Alerts table] Fix error on clicking alert reason message (elastic#193693) [Migrations] Remove tests that are not applicable in 9.x (elastic#193699) [EDR Workflows] Set Agent Tamper Protection to false on policy unassignment (elastic#193017) [Inventory][ECO] Enable elastic entity model from inventory (elastic#193557) [EDR Workflows] The host isolation exception tab is hidden on the basic license if no artifacts (elastic#192562) [Entity Analytics] Ensuring definition transforms are managed (elastic#193408) [Automatic Import] Do not remove message field for unstructured logs (elastic#193678) [Fleet] Add missing permissions for connector package (elastic#193573) [Fleet] using @kbn/config-schema part 2 (outputs and other apis) (elastic#193326) [Migrations] Provide testing archives + tooling for migrations integration tests (elastic#193328) [ES|QL] Renames the textbased editor to esql editor (elastic#193521) [ES|QL] Update function metadata (elastic#193662) [Security Solution][Entity Analytics] Scoping the entity store to spaces (elastic#193303) [Docs] Update Sharing docs (elastic#190318) [ML] AIOps: Move Log Rate Analysis results callout to help popover. (elastic#192243) ... # Conflicts: # x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx # x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx
I think the backport failed because #193379 hasn't yet merged |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Part of elastic#189662. This PR - updates the autocomplete behavior for `SORT` to be in line with other field-list-based experiences like `KEEP` - introduces a shared function, `handleFragment`, which is used to abstract some of the logic required to support this behavior - bulks up the `SORT` tests - restores the function suggestions which I noticed got lost in elastic#189959 **Before** https://github.com/user-attachments/assets/cad1d073-c010-426f-9628-c0fc6b65eb3c **After** https://github.com/user-attachments/assets/e148ae58-4430-482c-9f8e-c55779c4d822 ### 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: Stratoula Kalafateli <[email protected]> (cherry picked from commit f450e22)
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] new pattern for `SORT` autocomplete (#193595)](#193595) <!--- Backport version: 8.9.8 --> ### 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-23T14:23:23Z","message":"[ES|QL] new pattern for `SORT` autocomplete (#193595)\n\n## Summary\r\n\r\nPart of #189662. This PR\r\n- updates the autocomplete behavior for `SORT` to be in line with other\r\nfield-list-based experiences like `KEEP`\r\n- introduces a shared function, `handleFragment`, which is used to\r\nabstract some of the logic required to support this behavior\r\n- bulks up the `SORT` tests\r\n- restores the function suggestions which I noticed got lost in\r\nhttps://github.com//pull/189959\r\n\r\n**Before**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/cad1d073-c010-426f-9628-c0fc6b65eb3c\r\n\r\n**After**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e148ae58-4430-482c-9f8e-c55779c4d822\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: Stratoula Kalafateli <[email protected]>","sha":"f450e228b38d317a57d906f6c59f6e69d1dd458d","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"],"number":193595,"url":"https://github.com/elastic/kibana/pull/193595","mergeCommit":{"message":"[ES|QL] new pattern for `SORT` autocomplete (#193595)\n\n## Summary\r\n\r\nPart of #189662. This PR\r\n- updates the autocomplete behavior for `SORT` to be in line with other\r\nfield-list-based experiences like `KEEP`\r\n- introduces a shared function, `handleFragment`, which is used to\r\nabstract some of the logic required to support this behavior\r\n- bulks up the `SORT` tests\r\n- restores the function suggestions which I noticed got lost in\r\nhttps://github.com//pull/189959\r\n\r\n**Before**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/cad1d073-c010-426f-9628-c0fc6b65eb3c\r\n\r\n**After**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e148ae58-4430-482c-9f8e-c55779c4d822\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: Stratoula Kalafateli <[email protected]>","sha":"f450e228b38d317a57d906f6c59f6e69d1dd458d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193595","number":193595,"mergeCommit":{"message":"[ES|QL] new pattern for `SORT` autocomplete (#193595)\n\n## Summary\r\n\r\nPart of #189662. This PR\r\n- updates the autocomplete behavior for `SORT` to be in line with other\r\nfield-list-based experiences like `KEEP`\r\n- introduces a shared function, `handleFragment`, which is used to\r\nabstract some of the logic required to support this behavior\r\n- bulks up the `SORT` tests\r\n- restores the function suggestions which I noticed got lost in\r\nhttps://github.com//pull/189959\r\n\r\n**Before**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/cad1d073-c010-426f-9628-c0fc6b65eb3c\r\n\r\n**After**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/e148ae58-4430-482c-9f8e-c55779c4d822\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: Stratoula Kalafateli <[email protected]>","sha":"f450e228b38d317a57d906f6c59f6e69d1dd458d"}}]}] BACKPORT-->
Summary
Part of #189662. This PR
SORT
to be in line with other field-list-based experiences likeKEEP
handleFragment
, which is used to abstract some of the logic required to support this behaviorSORT
testsOrderExpression
forSORT
command arguments #189959Before
Screen.Recording.2024-09-20.at.8.33.19.AM.mov
After
Screen.Recording.2024-09-20.at.8.31.20.AM.mov
Checklist