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

Canvas autocomplete is broken in expression editor #146243

Closed
bhavyarm opened this issue Nov 23, 2022 · 3 comments · Fixed by #146425
Closed

Canvas autocomplete is broken in expression editor #146243

bhavyarm opened this issue Nov 23, 2022 · 3 comments · Fixed by #146425
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Canvas impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@bhavyarm
Copy link
Contributor

Kibana version: 8.6.0 BC2

Elasticsearch version: 8.6.0

Server OS version: darwin

Browser version: chrome latest

Browser OS version: OS X

Original install method (e.g. download page, yum, from source, etc.): from staging

Describe the bug: Auto-complete on expression editor is broken on canvas.

auto_complete_broken.mp4
@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Feature:Canvas labels Nov 23, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@kibanamachine kibanamachine added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated labels Nov 23, 2022
@bhavyarm
Copy link
Contributor Author

Please note this works fine on 8.5.2

@bhavyarm
Copy link
Contributor Author

Can we also please get a test? Thanks :)

nickpeihl added a commit that referenced this issue Nov 28, 2022
Fixes #146243 

## Summary

Fixes Canvas expression autocomplete

#143739 upgraded the monaco-editor
dependency which uses a callback to the `onLanguage` method to
initialize the expressions. The PR moved the `monaco.languages.register`
command inside this callback and which was never triggered.

Moving the `monaco.languages.register` command outside the callback
appears to fix the issue.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 28, 2022
Fixes elastic#146243

## Summary

Fixes Canvas expression autocomplete

elastic#143739 upgraded the monaco-editor
dependency which uses a callback to the `onLanguage` method to
initialize the expressions. The PR moved the `monaco.languages.register`
command inside this callback and which was never triggered.

Moving the `monaco.languages.register` command outside the callback
appears to fix the issue.

(cherry picked from commit 19413b7)
kibanamachine added a commit that referenced this issue Nov 28, 2022
…#146465)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[PresentationUtil] Fix Canvas expression autocomplete
(#146425)](#146425)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Nick
Peihl","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-11-28T19:30:37Z","message":"[PresentationUtil]
Fix Canvas expression autocomplete (#146425)\n\nFixes #146243 \r\n\r\n##
Summary\r\n\r\nFixes Canvas expression
autocomplete\r\n\r\nhttps://github.com//pull/143739
upgraded the monaco-editor\r\ndependency which uses a callback to the
`onLanguage` method to\r\ninitialize the expressions. The PR moved the
`monaco.languages.register`\r\ncommand inside this callback and which
was never triggered.\r\n\r\nMoving the `monaco.languages.register`
command outside the callback\r\nappears to fix the
issue.","sha":"19413b7daae983b95dbb9f5c7b39cb8f3578ebfa","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:prev-minor","v8.6.0","v8.7.0"],"number":146425,"url":"https://github.com/elastic/kibana/pull/146425","mergeCommit":{"message":"[PresentationUtil]
Fix Canvas expression autocomplete (#146425)\n\nFixes #146243 \r\n\r\n##
Summary\r\n\r\nFixes Canvas expression
autocomplete\r\n\r\nhttps://github.com//pull/143739
upgraded the monaco-editor\r\ndependency which uses a callback to the
`onLanguage` method to\r\ninitialize the expressions. The PR moved the
`monaco.languages.register`\r\ncommand inside this callback and which
was never triggered.\r\n\r\nMoving the `monaco.languages.register`
command outside the callback\r\nappears to fix the
issue.","sha":"19413b7daae983b95dbb9f5c7b39cb8f3578ebfa"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146425","number":146425,"mergeCommit":{"message":"[PresentationUtil]
Fix Canvas expression autocomplete (#146425)\n\nFixes #146243 \r\n\r\n##
Summary\r\n\r\nFixes Canvas expression
autocomplete\r\n\r\nhttps://github.com//pull/143739
upgraded the monaco-editor\r\ndependency which uses a callback to the
`onLanguage` method to\r\ninitialize the expressions. The PR moved the
`monaco.languages.register`\r\ncommand inside this callback and which
was never triggered.\r\n\r\nMoving the `monaco.languages.register`
command outside the callback\r\nappears to fix the
issue.","sha":"19413b7daae983b95dbb9f5c7b39cb8f3578ebfa"}}]}]
BACKPORT-->

Co-authored-by: Nick Peihl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Canvas impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:needs-research This issue requires some research before it can be worked on or estimated regression Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants