Hi Everyone, We're aiming to improve the Autocomplete & Suggestions mechanism in the Code Editor. We'll love to hear from you any feedback you might have - examples for weird/wrong suggestions, bad functionality, bugs or any improvement ideas you would like to see (e.g Schema Autocomplete).
Feel free to share anything within this thread - examples, screenshot or screen recording.
Thanks,
Yakir.
Hi everyone,
Following your comments in this thread among other we got from different communication channel, I'm happy to share that we are launching a new version for the autocomplete panels.
You can read more about it in the following thread:
The new panels will start rolling out today and should be available to everyone during the next couple of weeks.
Thanks,
Yakir.
Another option to turning it off completely is a key shortcut to activate it like CTRL + SPACE which other editors use.
I agree, we need to be able to turn it off.
This is still not improved. We need the ability to turn it off. I understand that it's a hard problem to solve, and I respect everyone that is working at Wix. I think your company is incredible, but Autocomplete is embarrassingly broken at this point. It makes coding PAINFUL. Please, let us turn it off. Then we can turn it back on when it isn't broken.
Linting and autocompletion is currently broken for the Intl module. It worked before New Years but something seems to have happened between now and then. Do note that the code functions as expected.
Suggestion: schema autocomplete for collection field names and type hinting for their values. I'm not sure if that's exactly what you meant by "Schema Autocomplete," but if so, awesome!
Due to the issues with the autocomplete feature like @polkaset mentioned, I saw some hidden schema files popped up in the suggestions when I was trying to import something else. But was unable to import them and get them working properly.
I hope there's also some type hinting for the values. Right now, I'm using JSDoc annotation to help with completion for small collections. For example:
/** * @param {object} item Item from collection x. * @param {number} item.age The user's age. * @param {string|object} item.appt The appointment object or its ID. * Say, if this was a reference field. */ export function abc(item) { // Hopefully, the generic "object" types can be replaced // with an imported schema from whatever collections they are from. }
Here is another very simple use case. Start with this code:
if (true) { // do something }
Now imagine you want to add an else statement. It is really hard. Try typing:
"else {"
=> then the closing brace pops up (nice!), but after a brief second the auto-complete also pops up and now when you press enter inside "{}" some gibberish is entered. Every time!
Is there a place I can vote for this?
Agree with @polkaset . This happens all day, every day, and has done since I started with Wix.
Please please please - just give us the ability to disable the “helper”, whether or not you can identify and/or fix the issues.
Hi @polkaset ,
Really great feedback! Thanks!
I know the second problem you mentioned happens to other as well, but if you do encounter this again, and available to make a quick recording, that will be much appreciated. Meanwhile, I'll try to reproduce this on my side.
Thanks again :)
Some time ago, the suggest-as-you-type became kind of badly behaved. I've noticed two problems.
1. It makes a suggestion on NO character input (0 length token).
I realize that this is code, so these are tokens, not words, and spacebar isn't necessarily the delineator between tokens. But it seems like there are some conditions where a token of length 0 causes the suggestion menu to come up. Here's a short video. I type the token "function", then hit space, which should be recognized as the boundary between the token "function" and the next token, which I haven't started entering yet. But before I start the next token, I get a context menu with #endregion at the top.
https://www.awesomescreenshot.com/video/5797217?key=3aa009b23d13695c4b96ba2b9fb7f041
There is no next token here, and this is a problem because if my intention is to hit <enter> to go to the next line, I end up taking the suggestion instead. In this way, I've added the first suggestion (#endregion, or whatever suggestion is at the top of the menu) about a million times a day. Then I have to erase it just to hit <enter>.
I realize this might be a poor example, because generally you don't hit <enter> after typing the word function. But this behavior is not limited to that specific token. It happens on MANY tokens that you'd normally hit <return> after. For example, if you're using the fat arrow, inline function/block syntax, it would add some suggestion after the {:
foo((blah) => { <here is where I would normally hit return, but the suggest menu appears and I have to kill it before hitting return> });
It's so obnoxious that I have trained myself to hit <escape> to close the suggestion menu, and then IMMEDIATELY hit <enter> before the code complete can pop up the menu again (nanoseconds, it seems, which brings me to problem #2).
2. It makes a suggestion on no NEW character input.
The suggestion menu pops up WAY TOO AGGRESSIVELY/QUICKLY even if you haven't changed the token being suggested on.
The thing I feel is broken about this is that when you reject with escape, the menu doesn't stay gone. It comes right back with the same suggestion when I have not typed anything new. I have not changed the token being suggested on, I have said to the editor "No, I don't want suggestions right now", but it pops up the suggestor again, before I have changed the token in any way that would indicate to the auto-suggestor that I am ready for a new suggestion. In this way, I have hit escape-enter, only to have the suggestion menu re-appear in literally microseconds and then I hit enter, but end up taking the suggestion that I don't want to take.
This is, by far, the most irritating thing about the code editor's auto suggest behavior. More often than not, it prevents me from doing what I want to do instead of helping me do what I want to do. I have to continually shove it out of the way, only to have it reappear right in my face like that overly talkative, but utterly boring friend of yours who never stops talking and won't get the hint that you're done talking to them. Even if you walk away from the conversation, they follow you from room to room talking at you anyway until you just want to pop them in the chops and scream "SHUT UP! SHUT UP! YOU BORING MORON!!!" (ask me how many times I've said these words to the code editor after the 47th time it's added some code block for me after I told it to shut up. No...don't ask me). But even screaming at them doesn't work, and they continue to follow you around interjecting their boring, irrelevant bloviating when you least want it.
I was going to record this phenomenon for you, but ?maybe? you might be running some experiments, because this morning, I cannot get the obnoxious aggressive behavior to happen. But it has happened MANY MANY MANY times in the recent past. Just not this morning. If you have indeed done some work to recognize token boundaries and reduce the condition where you suggest something on a 0 length token, or on a token that has NOT changed since I rejected the suggestion, please keep it that way! It's infinitely better than having to hit escape every single time I want to type another word or hit enter to go to the next line.
Suggestions:
Autosuggest is really helpful in a code editor, but the behavior needs to be controlled so that it doesn't end up hurting more than it helps.
1. Don't suggest anything unless the current token actually exists/is more than length 0.
2. Use <tab>or <ctrl-enter> or some other key combination that the user is less likely to need to type for another reason (not simply <enter>) to take the suggestion
or
2.a Use enter, but delay the suggestion menu popup so that if someone wants to actually hit enter, they don't end up getting a last minute suggestion and then taking it.
3. Use <esc> to tell the suggestion "I don't want this suggestion. Please go away."
4. The suggestor should NOT reappear after #3 unless you have changed the token in some way that indicates you might actually be receptive to another suggestion.
If you have made some improvements, especially around the second problem, good work, and please keep it this way!!!
Cheers
Tracey