Enhancements to painless autocomplete in monaco#85055
Enhancements to painless autocomplete in monaco#85055alisonelizabeth merged 4 commits intoelastic:masterfrom
Conversation
…complete_enhancements
| * 1. If the preceding word is a primitive type, e.g., "boolean", we assume the user is declaring a variable name | ||
| * 2. If the string contains a "dot" character, we assume the user is attempting to access a property that we do not have information for | ||
| * 3. If the user is defining a variable with a boolean type, e.g., "boolean myBoolean =" | ||
| * 4. If the user is defining a string |
There was a problem hiding this comment.
This entire logic should probably be more sophisticated, but I think we will improve upon this once ANTLR is integrated and we are able to provide contextual autocomplete.
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
jloleysens
left a comment
There was a problem hiding this comment.
Great work @alisonelizabeth ! Thanks for refining the autocomplete on boolean/string values!
I tested locally and was able to get param autocomplete and closing pairs. I am not sure how to properly test the "emit" autocomplete (happy for test coverage though) and I was not sure on how to test "text" field type filtering. I tried in the runtime fields painless editor but was not able to see "emit", and not 100% sure what to look for w.r.t. "text" type.
Let me know if you'd like me to retest, otherwise code looks great! Great work on all these Painless improvements 👏🏻
…complete_enhancements
|
Thanks, @jloleysens for the review!
Sorry about that - I just realized the branch had not yet been updated with #84943. It should be good to go now. Regarding the |
💚 Build SucceededMetrics [docs]Distributable file count
Unknown metric groups@kbn/ui-shared-deps asset size
History
To update your PR or re-run it, just comment with: |

This PR addresses various feedback around the Painless autocomplete functionality.
emitandparamskeywordsemit()is only valid in the context of runtime fieldstextfield types from the field autocomplete suggestions, astextfield types are never in doc values