ipatalas / vscode-postfix-ts

Postfix notation for TypeScript/Javascript - extension for VS Code
MIT License
158 stars 43 forks source link

Don't display choice when only one variant is available #76

Closed zardoy closed 2 years ago

zardoy commented 2 years ago

Hey! Thank you so much for releasing new version, however const and forof templates now always display popup suggestion, not only when there only one inferred variant, but even when the feature is toggled off. And after using new version for a while, I've found out they are distracting a bit.

image

I don't know maybe it's just me, but from POV we shouldn't display choice when there is actually no choice :) I more like the old behavior when it was just inserting the text and cases where it can propose two variants are rare. @ipatalas I saw you removed (see highlighted line) the length check and rewrite to single variant instead. Was this change accidental or intentional?

ipatalas commented 2 years ago

Yeah, that was intentional. I kinda assumed that when only one option available it won't show the popup but forgot to check it :D I'll fix it today, thanks for catching that.

ipatalas commented 2 years ago

Just released a hotfix, thanks again for help!

zardoy commented 2 years ago

Just released a hotfix, thanks again for help!

Thanks! It is definitely fixed, but why did you reopen this? :)

ipatalas commented 2 years ago

Because it automatically closed after my commit and that was too soon because it wasn't released yet 😉