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

Tab completion is broken for buttons #2547

Closed
pelikhan opened this issue Nov 3, 2020 · 6 comments · May be fixed by microsoft/pxt#7829
Closed

Tab completion is broken for buttons #2547

pelikhan opened this issue Nov 3, 2020 · 6 comments · May be fixed by microsoft/pxt#7829
Labels
bug Something isn't working intellisense p2

Comments

@pelikhan
Copy link
Member

pelikhan commented Nov 3, 2020

Describe the bug
A clear and concise description of what the bug is.
text about the problem here.

Open a new arcade project,
switch to JS
then follow the .gif
2020-11-03 21 10 26

@darzu darzu added grabbable Feel free to grab this issue from the author and assign to yourself (tell them as you do it) and removed grabbable Feel free to grab this issue from the author and assign to yourself (tell them as you do it) labels Jan 7, 2021
@darzu
Copy link
Contributor

darzu commented Jan 12, 2021

starting work

@darzu
Copy link
Contributor

darzu commented Jan 12, 2021

Notes to self:

@darzu
Copy link
Contributor

darzu commented Jan 13, 2021

Note that this repros on the released version of Arcade today. This dates back to before at least Aug 11th.

@darzu
Copy link
Contributor

darzu commented Jan 13, 2021

The issue is pretty subtle. We have an assumption in our language service that each Symbol will have one Snippet.
However this isn't true. Both of these use the same symbol (onEvent) and yet their snippets must be different:

controller.anyButton.onEvent
controller.A.onEvent

In both of these completion cases, we were returning the snippet as: controller.anyButton.onEvent(Pressed, ...)

I'll need to think about the solution.

@darzu
Copy link
Contributor

darzu commented Jan 13, 2021

One possible solution: return the snippet in parts. So instead of one string: controller.anyButton.onEvent(Pressed, ...) we return a series of qualifiers ["controller", "anyButton"] and the function string onEvent(Pressed, ...) then the insert location can choose which qualifiers to include or not. In the case that we're already several "."s in, we discard all the qualifiers.

Doesn't feel particularly principled but might be the smallest fix.

@riknoll
Copy link
Member

riknoll commented Jul 16, 2021

We switched to the stock monaco service

@riknoll riknoll closed this as completed Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working intellisense p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants